From f0c95332697538a6efeb2a9773d29a4e1c13f548 Mon Sep 17 00:00:00 2001 From: rainbro <33367671@qq.com> Date: Thu, 3 Jul 2025 16:00:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98=E5=AE=9D?= =?UTF-8?q?=20=E6=94=B6=E6=AC=BE=E4=BA=8C=E7=BB=B4=E7=A0=81=E9=A2=84?= =?UTF-8?q?=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/agent/payInfoSetting.vue | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/views/agent/payInfoSetting.vue b/src/views/agent/payInfoSetting.vue index 7b3fa36..a1aa7e1 100644 --- a/src/views/agent/payInfoSetting.vue +++ b/src/views/agent/payInfoSetting.vue @@ -58,6 +58,8 @@

预览支付二维码

+ 请先配置收款信息 + {{ payinfo.qrcode_error }}
@@ -65,8 +67,6 @@ 微信扫码支付
- 暂未配置 -
@@ -113,7 +113,15 @@

预览支付二维码

- + 请先配置收款信息 + {{ payinfo.qrcode_error }} + + +
+ + 支付宝扫码支付 +
+
@@ -223,16 +231,19 @@ export default { store.commit('SET_PAGETITLE', '支付授权'); this.getPayment(); - // 模拟生成二维码 - QRCode.toDataURL('https://your-payment-link.com') + + }, + methods: { + getQrCodeUrl(mydata) { + // 模拟生成二维码 + QRCode.toDataURL(mydata) .then(url => { this.qrCodeDataUrl = url }) .catch(err => { console.error(err) }) - }, - methods: { + }, getPayment() { this.$http('POST', '/agentnew/ajax_get_payinfo', { payid: this.$route.query.payid, @@ -244,6 +255,13 @@ export default { this.$nextTick(() => { this.payinfo = response.data this.payType = response.data.type + if (this.payType == PAY_TYPE_WEIXIN && response.data.qrcode_url) { + this.getQrCodeUrl(response.data.qrcode_url); + } + if (this.payType == PAY_TYPE_ALIPAY && response.data.qrcode_url) { + this.getQrCodeUrl(response.data.qrcode_url); + } + if (this.payType == PAY_TYPE_TAOBAO || this.payType == PAY_TYPE_JINGDONG) { this.confirmText = '去授权'; } else if (this.payType == PAY_TYPE_PDD) {