|
@@ -60,12 +60,31 @@ export default {
|
60
|
60
|
success () {
|
61
|
61
|
wx.getUserInfo({ // 授权成功时,获取用户信息
|
62
|
62
|
success (res) {
|
|
63
|
+ wx.showToast({
|
|
64
|
+ title: res.userInfo.avatarUrl,
|
|
65
|
+ icon: 'none',
|
|
66
|
+ duration: 2000
|
|
67
|
+ })
|
63
|
68
|
_that.EditUserInfo({ name: 'Icon', value: res.userInfo.avatarUrl })
|
64
|
69
|
_that.EditUserInfo({ name: 'Name', value: res.userInfo.nickName })
|
65
|
70
|
_that.$emit('UserInfoChange')
|
66
|
71
|
_that.Show = false
|
|
72
|
+ },
|
|
73
|
+ fail (res) {
|
|
74
|
+ wx.showToast({
|
|
75
|
+ title: '获取头像授权失败',
|
|
76
|
+ icon: 'none',
|
|
77
|
+ duration: 2000
|
|
78
|
+ })
|
67
|
79
|
}
|
68
|
80
|
})
|
|
81
|
+ },
|
|
82
|
+ fail (res) {
|
|
83
|
+ wx.showToast({
|
|
84
|
+ title: '自动获取头像授权失败',
|
|
85
|
+ icon: 'none',
|
|
86
|
+ duration: 2000
|
|
87
|
+ })
|
69
|
88
|
}
|
70
|
89
|
})
|
71
|
90
|
}
|