瀏覽代碼

充值功能bug修改

sunlupeng 1 年之前
父節點
當前提交
715006c6c9
共有 2 個文件被更改,包括 12 次插入10 次删除
  1. 6 5
      src/views/HomeView/RedeemView.vue
  2. 6 5
      src/views/Ipay.vue

+ 6 - 5
src/views/HomeView/RedeemView.vue

@@ -579,9 +579,12 @@ export default {
                 this.timer = setInterval(() => {    // 通过定时器每间隔一会去请求查询微信支付状态(具体参数根据项目需要而定)
                     this.handleQueryWxPayStatus(data.orderNo);
                 }, 1000);
-                // this.timerPayWxQRcode = setInterval(() => {    // 刷新微信支付二维码
-                //     this.handlePayWxQRcode();
-                // }, 180000);
+                this.timerPayWxQRcode = setInterval(() => {    // 刷新微信支付二维码
+                    console.log('刷新微信支付二维码');
+                    clearInterval(this.timer);    // 清除定时器;   
+                    clearInterval(this.timerPayWxQRcode);
+                    this.handlePayWxQRcode();
+                }, 60000);
             })
         },
         handleQueryWxPayStatus(orderNo) {  // 查询微信支付状态
@@ -599,8 +602,6 @@ export default {
                     this.recharge = false;
                     clearInterval(this.timer);    // 清除定时器;   
                     clearInterval(this.timerPayWxQRcode);
-                }else{
-                    this.handlePayWxQRcode();
                 }
             }).catch(err => {
                 console.log(err)

+ 6 - 5
src/views/Ipay.vue

@@ -152,9 +152,12 @@ export default {
         this.timer = setInterval(() => {    // 通过定时器每间隔一会去请求查询微信支付状态(具体参数根据项目需要而定)
           this.handleQueryWxPayStatus(data.orderNo);
         }, 1000);
-        // this.timerPayWxQRcode = setInterval(() => {    // 刷新微信支付二维码
-        //   this.handlePayWxQRcode();
-        // }, 180000);
+        this.timerPayWxQRcode = setInterval(() => {    // 刷新微信支付二维码
+          console.log('刷新微信支付二维码');
+          clearInterval(this.timer);    // 清除定时器;   
+          clearInterval(this.timerPayWxQRcode);
+          this.handlePayWxQRcode();
+        }, 60000);
       }).catch(err => {
         this.fullscreenLoading = false;
         console.log(err)
@@ -173,8 +176,6 @@ export default {
           });
           clearInterval(this.timer);    // 清除定时器;   
           clearInterval(this.timerPayWxQRcode);
-        }else{
-          this.handlePayWxQRcode();
         }
       }).catch(err => {
         console.log(err)