Browse Source

no message

linwenxin 1 year ago
parent
commit
54ba92392e
1 changed files with 14 additions and 18 deletions
  1. 14 18
      src/pages/goods/order.vue

+ 14 - 18
src/pages/goods/order.vue

@@ -70,6 +70,20 @@
           goodsId: this.pam.id,
           userAddress: this.addressInfo
         }, false).then(res => {
+          uni.showModal({
+            title: '支付查询',
+            content: '等待支付结果',
+            showCancel: false,
+            confirmText: "订单管理",
+            success: () => {
+              if (this.timeId) {
+                clearTimeout(this.timeId)
+              }
+              this.$navToPage({
+                url: '/pages/mine/myBuy/list'
+              })
+            }
+          });
           uni.requestPayment({
             provider: 'wxpay',
             timeStamp: res.data.timeStamp,
@@ -80,7 +94,6 @@
             success: () => {},
             fail: () => {},
             complete: () => {
-              var bool_tc = true
               var getList = () => {
                 if (this.timeId) {
                   clearTimeout(this.timeId)
@@ -96,23 +109,6 @@
                       url: '/pages/mine/myBuy/list'
                     })
                   } else {
-                    if (bool_tc) {
-                      bool_tc = false
-                      uni.showModal({
-                        title: '支付查询',
-                        content: '等待支付结果',
-                        showCancel: false,
-                        confirmText: "去订单管理",
-                        success: function() {
-                          if (this.timeId) {
-                            clearTimeout(this.timeId)
-                          }
-                          this.$navToPage({
-                            url: '/pages/mine/myBuy/list'
-                          })
-                        }
-                      });
-                    }
                     this.timeId = setTimeout(getList, 1000)
                   }
                 })