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) {