From 0b35a92b016666698017b5814414c0e96fec34b5 Mon Sep 17 00:00:00 2001 From: YunaiV <> Date: Sun, 21 Apr 2019 02:00:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=20+=20=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=EF=BC=9A=E6=94=AF=E4=BB=98=E7=95=8C=E9=9D=A2~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile-web/src/api/pay.js | 24 +++++++++++ mobile-web/src/config/request.js | 6 +-- mobile-web/src/config/router.js | 7 ++++ mobile-web/src/page/pay/index.vue | 42 +++++++++---------- mobile-web/src/page/user/order/list.vue | 8 +++- pay/pay-application/pom.xml | 5 +++ .../users/PayTransactionController.java | 15 ++++--- .../mall/pay/api/PayTransactionService.java | 4 +- .../pay/api/constant/PayErrorCodeEnum.java | 4 +- .../mall/pay/biz/service/PayServiceImpl.java | 12 +++++- 10 files changed, 91 insertions(+), 36 deletions(-) create mode 100644 mobile-web/src/api/pay.js 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 @@