From 35bf0dfb3452b464be7c025219c2d31eb0f4467e Mon Sep 17 00:00:00 2001 From: Wang YiHang <3060234389@qq.com> Date: Fri, 30 Aug 2024 18:57:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/market/apitype.js | 6 +++--- src/views/market/apitype/index.vue | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/api/market/apitype.js b/src/api/market/apitype.js index 724019a..0321592 100644 --- a/src/api/market/apitype.js +++ b/src/api/market/apitype.js @@ -1,11 +1,11 @@ import request from '@/utils/request' -export function pay(query) { +export function pay(data) { return request({ url: '/pay/alipay/pay', - method: 'get', - params: query + method: 'poat', + params: data }) } // 查询接口列表 diff --git a/src/views/market/apitype/index.vue b/src/views/market/apitype/index.vue index e3cb83e..52e62fc 100644 --- a/src/views/market/apitype/index.vue +++ b/src/views/market/apitype/index.vue @@ -159,8 +159,14 @@ export default { this.pay.subject=customer.sysIntro this.pay.traceNo=Math.floor(Math.random() * 900000) + 100000 this.pay.totalAmount=customer.sysNumber - const url = `http://47.116.173.119:80/pay/alipay/pay?traceNo=${this.pay.traceNo}`; - window.open(url, '_self'); // 如果您想在当前页面加载新 URL,这样是正确的 + this.pay.returnUrl = `http://47.116.173.119:80/pay/alipay/pay?subject=${this.pay.subject}&traceNo=${this.pay.traceNo}&totalAmount=${this.pay.totalAmount}`; + pay(this.pay).then(res => { + if(res.code==200){ + window.location.href=res.data + }else{ + this.$message.error(res.msg) + } + }) }, getType(activeNameL){ this.activeNameL=activeNameL