Browse Source

no message

linwenxin 1 year ago
parent
commit
964383b2f4
1 changed files with 18 additions and 18 deletions
  1. 18 18
      src/views/mallManagement/order/offline_order_list/index.vue

+ 18 - 18
src/views/mallManagement/order/offline_order_list/index.vue

@@ -873,27 +873,27 @@ export default {
     },
 
     checkPay(orderId){
-      this.timer = setTimeout(()=>{
-        if(this.num === undefined){
-          this.num = 0
-        }
-        if(this.num <=10){
-          this.num++
-        }else{
+      if(this.num === undefined){
+        this.num = 0
+      }
+      if(this.num <=10){
+        this.num++
+      }else{
+        this.clear()
+        this.$refs.tabPage.removeTab(this.pageType);
+        return 
+      }
+      getOfflineOrderDetail({orderId}).then(res => {
+        if(res.data.orderStatus != 'NOPAY' && res.data.orderStatus != 'TIMEOUT'){
           this.clear()
+          this.$message.success('支付成功!')
           this.$refs.tabPage.removeTab(this.pageType);
-          return 
-        }
-        getOfflineOrderDetail({orderId}).then(res => {
-          if(res.data.orderStatus != 'NOPAY' && res.data.orderStatus != 'TIMEOUT'){
-            this.clear()
-            this.$message.success('支付成功!')
-            this.$refs.tabPage.removeTab(this.pageType);
-          }else {
+        }else {
+          this.timer = setTimeout(()=>{
             this.checkPay(orderId);
-          }
-        })
-      }, 3000)
+          }, 3000)
+        }
+      })
     },
 
     clear(){