fenggang 5 years ago
parent
commit
ed741c97eb
1 changed files with 3 additions and 3 deletions
  1. 3 3
      pages/award-detail/award-detail.js

+ 3 - 3
pages/award-detail/award-detail.js

@@ -90,12 +90,12 @@ Page({
   },
 	onLoad(query) {
     wx.showLoading({title: '加载中', mask: true})
+    if(!USER_INFO) {
+      wx.navigateTo({url: '/pages/login/login'})
+    }
     const { id } = query
     // 当用户是从分享页面进入时调用邀请接口
     if(query.from && query.from === 'share' && query.friendID) {
-      if(!USER_INFO) {
-        wx.navigateTo({url: '/pages/login/login'})
-      }
       if(query.friendID !== USER_INFO.user.id) {
         invite(id, query.friendID)
         .then(data => {