diff --git a/api/payment.js b/api/payment.js new file mode 100644 index 0000000..441e510 --- /dev/null +++ b/api/payment.js @@ -0,0 +1,45 @@ +// +---------------------------------------------------------------------- +// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] +// +---------------------------------------------------------------------- +// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved. +// +---------------------------------------------------------------------- +// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 +// +---------------------------------------------------------------------- +// | Author: CRMEB Team +// +---------------------------------------------------------------------- +import request from "@/utils/request.js"; + +/** + * 添加购物车 + */ +export function addCart(data) { + return request.post(`user/cart/create`, data); +} + +/** + * 根据店铺id 获取店铺信息 + */ +export function getProductInfo(data) { + return request.get(`scanPay/product`, data); +} + +/** + * 订单校验 + */ +export function orderCheck(data) { + return request.post(`v2/order/check`, data); +} + +/** + * 生成订单 + */ +export function orderPay(data) { + return request.post(`v2/order/create`, data); +} + +/** + * 生成二维码 + */ +export function qrcode(data) { + return request.get(`scanPay/qrcode`, data); +} \ No newline at end of file diff --git a/pages.json b/pages.json index 60b8029..30d0369 100644 --- a/pages.json +++ b/pages.json @@ -290,6 +290,17 @@ "navigationBarTitleText": "面对面收款", "navigationStyle": "custom" } + }, { + "path": "get_payment", + "style": { + "navigationBarTitleText": "面对面收款", + "navigationStyle": "custom" + } + }, { + "path": "settlement", + "style": { + "navigationBarTitleText": "支付" + } }] }, { "root": "pages/goods_cate", diff --git a/pages/payment/get_payment.vue b/pages/payment/get_payment.vue new file mode 100644 index 0000000..90685a8 --- /dev/null +++ b/pages/payment/get_payment.vue @@ -0,0 +1,347 @@ + + + + + \ No newline at end of file diff --git a/pages/payment/pay.vue b/pages/payment/pay.vue deleted file mode 100644 index eb34fc3..0000000 --- a/pages/payment/pay.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/payment/qrcode.vue b/pages/payment/qrcode.vue index 9ab1774..196c709 100644 --- a/pages/payment/qrcode.vue +++ b/pages/payment/qrcode.vue @@ -70,6 +70,7 @@ + + \ No newline at end of file