bug修改

This commit is contained in:
姚亚男
2021-10-27 15:49:56 +08:00
parent dc2282b498
commit fbf5a0fd0e
3 changed files with 81 additions and 39 deletions
+19 -7
View File
@@ -115,7 +115,10 @@ Page({
url: '../home/home',
})
wx.setStorageSync('authorize', true) // 设置有过微信授权
wx.setStorageSync('avatarUrl', that.data.userInfoTemp.avatarUrl)
wx.setStorage({
key: 'avatarUrl',
data: result.avatarUrl
})
}else{ // 首次登录不能直接用微信快捷登录
wx.showToast({
title: '暂无授权手机号',
@@ -267,7 +270,21 @@ Page({
UserApi.wxBind(params).then(res=>{})
})
},
onLoad(){
// onLoad(){
// const that = this
// wx.getStorage({
// key: 'userInfoTemp',
// success(res){
// that.setData({
// userInfoTemp: res.data
// })
// }
// })
// },
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
const that = this
wx.getStorage({
key: 'userInfoTemp',
@@ -277,11 +294,6 @@ Page({
})
}
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
UserApi.getRSAPublicKey().then(res => {
if (res.success) {
this.setData({