mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:23:25 +08:00
【调整】取消微信授权获取头像及昵称功能。
This commit is contained in:
@@ -60,9 +60,6 @@
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="coreshop-margin-left-10 coreshop-padding-10" @click="syncWeChatInfo()">
|
||||
<u-icon name="reload" color="#fff" size="16"></u-icon>
|
||||
</view>
|
||||
<view class="coreshop-margin-left-10 coreshop-padding-10" @tap="navigateToHandle('/pages/member/setting/userInfo/index')">
|
||||
<u-icon name="arrow-right" color="#fff" size="16"></u-icon>
|
||||
</view>
|
||||
@@ -570,35 +567,7 @@
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
this.$u.route('/pages/member/customerService/index');
|
||||
// #endif
|
||||
},
|
||||
//同步微信昵称数据
|
||||
syncWeChatInfo() {
|
||||
let _this = this
|
||||
wx.getUserProfile({
|
||||
desc: "获取你的昵称、头像、地区及性别",
|
||||
success: e => {
|
||||
console.log(e)
|
||||
if (e.errMsg == 'getUserProfile:ok') {
|
||||
_this.$u.api.syncWeChatInfo(e.userInfo).then(res => {
|
||||
if (res.status) {
|
||||
_this.$refs.uToast.show({ message: '同步成功', type: 'success', });
|
||||
if (res.data) {
|
||||
_this.hasLogin = true
|
||||
//_this.$store.commit('userInfo', res.data);
|
||||
}
|
||||
} else {
|
||||
_this.$u.toast('登录失败,请重试')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
//拒绝授权
|
||||
this.$refs.uToast.show({ message: '您拒绝了请求', type: 'error' })
|
||||
return;
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
hasLogin() {
|
||||
|
||||
Reference in New Issue
Block a user