Pārlūkot izejas kodu

fix(修改) 修改免费领取的问题

xing.li 3 gadi atpakaļ
vecāks
revīzija
a62aa3fa48
1 mainītis faili ar 7 papildinājumiem un 4 dzēšanām
  1. 7 4
      pages/welfareMall/activityInfo/activityInfo.js

+ 7 - 4
pages/welfareMall/activityInfo/activityInfo.js

@@ -203,7 +203,9 @@ Page({
       } else {
         _self.setData({
           hideWindowValue:true,
-          preventDup:true
+          preventDup:true,
+          orderSn:_self.data.orderInfo.orderSn,
+          isPay:this.data.detail.isPay
         })
       }
 
@@ -265,10 +267,11 @@ Page({
   //type 1  是未支付带过去的    2 是已支付带过去的
    async goToOrderInfo(){
    
-    if(this.data.orderSn){
-      let res = await WelfareMall.getPayStatus(this.data.orderSn);
-      console.log(res);
+    //如果是支付的订单才去查询订单状态
+    if(this.data.isPay){
+       await WelfareMall.getPayStatus(this.data.orderSn);
     }
+
     wx.redirectTo({
       url: '/pages/welfareMall/order/orderCompletion?ordersn='+this.data.orderSn
     })