Browse Source

no message

linwenxin 1 year ago
parent
commit
7fdc2b7bd4
1 changed files with 19 additions and 20 deletions
  1. 19 20
      src/pages/goods/order.vue

+ 19 - 20
src/pages/goods/order.vue

@@ -70,29 +70,28 @@
           goodsId: this.pam.id,
           userAddress: this.addressInfo
         }, false).then(res => {
-          console.log(res)
+          uni.showModal({
+            title: '支付查询',
+            content: '等待支付结果,或直接去订单管理',
+            showCancel: false,
+            confirmText: "订单管理",
+            success: function() {
+              if (this.timeId) {
+                clearTimeout(this.timeId)
+              }
+              this.$navToPage({
+                url: '/pages/mine/myBuy/list'
+              })
+            }
+          });
           uni.requestPayment({
             provider: 'wxpay',
             timeStamp: res.data.timeStamp,
             nonceStr: res.data.nonceStr,
-            package: res.data.package,
-            signType: res.data.signType,
+            package: res.data.payPackage,
+            signType: "MD5",
             paySign: res.data.paySign,
             success: () => {
-              uni.showModal({
-                title: '支付查询',
-                content: '等待支付结果,或直接去订单管理',
-                showCancel: false,
-                confirmText: "订单管理",
-                success: function() {
-                  if (this.timeId) {
-                    clearTimeout(this.timeId)
-                  }
-                  this.$navToPage({
-                    url: '/pages/mine/myBuy/list'
-                  })
-                }
-              });
               var getList = () => {
                 if (this.timeId) {
                   clearTimeout(this.timeId)
@@ -114,11 +113,11 @@
               }
               getList()
             },
-            fail: () => {
-
+            fail: (ress) => {
+              console.log(ress)
             },
             complete: () => {
-
+              console.log("失败")
             }
           });
         })