[体验官活动]
This commit is contained in:
17
app.js
17
app.js
@@ -45,6 +45,18 @@ App({
|
||||
}
|
||||
})
|
||||
|
||||
if(wx.getStorageSync("openid") == '') {
|
||||
// 获取code
|
||||
wx.login({
|
||||
success: res => {
|
||||
// 存储openid
|
||||
api.auth.codeOpenid({code: res.code}).then(openidRes => {
|
||||
wx.setStorageSync('openid', openidRes.data)
|
||||
}).catch(err => {})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 挂载api
|
||||
wx.$api = api
|
||||
},
|
||||
@@ -52,7 +64,8 @@ App({
|
||||
isUser : false,
|
||||
userInfo : null,
|
||||
barHeight : '',
|
||||
inviteText : '', // 邀请好友临时存储
|
||||
isExperience: '' // 体验官身份
|
||||
inviteText : '', // 邀请好友临时存储
|
||||
isExperience: '', // 体验官身份
|
||||
experienceAreaId: '' // 体验官区域
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user