Browse Source

添加函数返回 (#478)

wx.naviageTo是异步的。这里需要返回语句。
uuz.vva 4 years ago
parent
commit
bd5e56abc4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      litemall-wx/pages/coupon/coupon.js

+ 2 - 1
litemall-wx/pages/coupon/coupon.js

@@ -106,6 +106,7 @@ Page({
       wx.navigateTo({
       wx.navigateTo({
         url: "/pages/auth/login/login"
         url: "/pages/auth/login/login"
       });
       });
+      return;
     }
     }
 
 
     let couponId = e.currentTarget.dataset.index
     let couponId = e.currentTarget.dataset.index
@@ -146,4 +147,4 @@ Page({
     });
     });
     this.getCouponList();
     this.getCouponList();
   }
   }
-})
+})