fenggang 5 gadi atpakaļ
vecāks
revīzija
ed741c97eb
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  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 => {