浏览代码

添加函数返回 (#478)

wx.naviageTo是异步的。这里需要返回语句。
uuz.vva 4 年之前
父节点
当前提交
bd5e56abc4
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      litemall-wx/pages/coupon/coupon.js

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

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