|
@@ -102,6 +102,11 @@ Page({
|
|
app.globalData.userInfo.phoneNumber = res.data.phoneNumber
|
|
app.globalData.userInfo.phoneNumber = res.data.phoneNumber
|
|
if (!res.data.isNeedPhone && res.data.headImg !== '') {
|
|
if (!res.data.isNeedPhone && res.data.headImg !== '') {
|
|
app.globalData.userInfo.login = true
|
|
app.globalData.userInfo.login = true
|
|
|
|
+ that.setData({
|
|
|
|
+ isNeedHeadImgBtn: true,
|
|
|
|
+ confirmAvatarUrl: app.globalData.userInfo.headImg,
|
|
|
|
+ confirmNickname: app.globalData.userInfo.userName,
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
if (res.data.isNeedPhone) { // true 代表需要手机号授权
|
|
if (res.data.isNeedPhone) { // true 代表需要手机号授权
|
|
that.setData({
|
|
that.setData({
|
|
@@ -118,6 +123,7 @@ Page({
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
that.setData({
|
|
that.setData({
|
|
|
|
+ isNeedHeadImgBtn: true,
|
|
confirmAvatarUrl: app.globalData.userInfo.headImg,
|
|
confirmAvatarUrl: app.globalData.userInfo.headImg,
|
|
confirmNickname: app.globalData.userInfo.userName,
|
|
confirmNickname: app.globalData.userInfo.userName,
|
|
})
|
|
})
|
|
@@ -183,6 +189,7 @@ Page({
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
that.setData({
|
|
that.setData({
|
|
|
|
+ isNeedHeadImgBtn: true,
|
|
confirmAvatarUrl: app.globalData.userInfo.headImg,
|
|
confirmAvatarUrl: app.globalData.userInfo.headImg,
|
|
confirmNickname: app.globalData.userInfo.userName,
|
|
confirmNickname: app.globalData.userInfo.userName,
|
|
})
|
|
})
|
|
@@ -204,7 +211,6 @@ Page({
|
|
},
|
|
},
|
|
// 绑定用户头像和昵称
|
|
// 绑定用户头像和昵称
|
|
handleConfirmNickname () {
|
|
handleConfirmNickname () {
|
|
- console.log(that.data.avatarUrl, that.data.nickname);
|
|
|
|
var that = this
|
|
var that = this
|
|
if (that.data.avatarUrl == '') {
|
|
if (that.data.avatarUrl == '') {
|
|
wx.showToast({
|
|
wx.showToast({
|