From d9d19519306e41f01e5d80dd7beb84fe7901ac75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sat, 20 Jan 2024 23:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=94=AF=E4=BB=98=E5=AE=9D?= =?UTF-8?q?=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/routes_order.js | 11 +++++++++++ src/views/mdp/mo/moOrder/Form.vue | 7 +++---- src/views/order/alipay.vue | 26 ++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 src/views/order/alipay.vue diff --git a/src/router/routes_order.js b/src/router/routes_order.js index bb43a5d..6f5ad4f 100644 --- a/src/router/routes_order.js +++ b/src/router/routes_order.js @@ -83,7 +83,18 @@ export default { icon: 'component' }, hidden:true, + }, + { + path: 'alipay', + component: _import('order/alipay'), + name: '支付宝支付码页面', + meta: { + title: '支付宝支付码页面', + icon: 'component' + }, + hidden:true, } + ] }, diff --git a/src/views/mdp/mo/moOrder/Form.vue b/src/views/mdp/mo/moOrder/Form.vue index 55e2212..08a9b96 100644 --- a/src/views/mdp/mo/moOrder/Form.vue +++ b/src/views/mdp/mo/moOrder/Form.vue @@ -310,10 +310,9 @@ export default { } aliPay(params).then(res => { if(res.data.tips.isOk) { - const div = document.createElement("divform"); - div.innerHTML = res.data.data.htmlStr; - document.body.appendChild(div); - document.forms[0].submit(); + let routerData = this.$router.resolve({path:'/my/order/alipay',query: {htmlStr: res.data.data.htmlStr}}) + // 打开新页面 + window.open(routerData.href, '_blank') }else { this.$notify.error(res.data.tips.msg); } diff --git a/src/views/order/alipay.vue b/src/views/order/alipay.vue new file mode 100644 index 0000000..e49d327 --- /dev/null +++ b/src/views/order/alipay.vue @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file