diff --git a/mobile-web/src/api/pay.js b/mobile-web/src/api/pay.js new file mode 100644 index 000000000..569dec197 --- /dev/null +++ b/mobile-web/src/api/pay.js @@ -0,0 +1,24 @@ +import request from "../config/request"; + +export function getTransaction(appId, orderId) { + return request({ + url: '/pay-api/users/transaction/get', + method: 'get', + params: { + appId, + orderId + } + }); +} + +export function submitTransaction(appId, orderId, payChannel) { + return request({ + url: '/pay-api/users/transaction/submit', + method: 'post', + params: { + appId, + orderId, + payChannel + } + }); +} diff --git a/mobile-web/src/config/request.js b/mobile-web/src/config/request.js index ff39806fc..5e0a412df 100644 --- a/mobile-web/src/config/request.js +++ b/mobile-web/src/config/request.js @@ -21,11 +21,11 @@ const serviceRouter = function(requestUrl) { }, '/promotion-api': { prefix: '/promotion-api', - target: 'http://127.0.0.1:18085//promotion-api', + target: 'http://127.0.0.1:18085/promotion-api', }, '/pay-api': { prefix: '/pay-api', - target: 'http://127.0.0.1:18084//promotion-api', + target: 'http://127.0.0.1:18084/pay-api', }, }; @@ -48,7 +48,7 @@ const serviceRouter = function(requestUrl) { }, '/pay-api': { prefix: '/pay-api', - target: 'http://api.shop.iocoder.cn:18099/promotion-api', + target: 'http://api.shop.iocoder.cn:18099/pay-api', }, }; diff --git a/mobile-web/src/config/router.js b/mobile-web/src/config/router.js index 759f7183b..859b7fcb3 100644 --- a/mobile-web/src/config/router.js +++ b/mobile-web/src/config/router.js @@ -203,6 +203,13 @@ const routes = [ meta: { title: '优惠劵领取' } + }, + { + path: '/pay', + component: () => import('../page/pay/index'), + meta: { + title: '收银台' + } } ]; diff --git a/mobile-web/src/page/pay/index.vue b/mobile-web/src/page/pay/index.vue index 441a57616..7678f1327 100644 --- a/mobile-web/src/page/pay/index.vue +++ b/mobile-web/src/page/pay/index.vue @@ -1,50 +1,46 @@