|
@@ -85,7 +85,7 @@ Page({
|
|
|
return {
|
|
|
title: '抽奖:' + title + ' X ' + winner_count,
|
|
|
imageUrl: cover_images[0],
|
|
|
- path: '/pages/award-detail/award-detail?id=' + id + '&from=share&friendID=' + wx.getStorageSync('USER_INFO').user.id
|
|
|
+ path: '/pages/award-detail/award-detail?id=' + id + '&from=share&friendID=' + wx.getStorageSync('USER_INFO') ? wx.getStorageSync('USER_INFO').user.id : null
|
|
|
}
|
|
|
},
|
|
|
onLoad(query) {
|
|
@@ -93,6 +93,9 @@ Page({
|
|
|
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 => {
|
|
@@ -183,5 +186,8 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ test(){
|
|
|
+ wx.navigateTo({url: '/pages/article/article'})
|
|
|
}
|
|
|
})
|