Commit 00abbd32 authored by Morson's avatar Morson

新用户登录手机号绑定不通过问题修复

parent ee3fb5c7
...@@ -67,6 +67,7 @@ export default { ...@@ -67,6 +67,7 @@ export default {
methods: { methods: {
// 微信授权用户信息 // 微信授权用户信息
getUserProfile() { getUserProfile() {
debugger
var that = this var that = this
if(uni.getUserProfile) { if(uni.getUserProfile) {
// 每次触发 uni.getUserProfile 均会弹出授权窗口,用户授权后可成功获取用户信息 // 每次触发 uni.getUserProfile 均会弹出授权窗口,用户授权后可成功获取用户信息
...@@ -125,13 +126,14 @@ export default { ...@@ -125,13 +126,14 @@ export default {
signupLogin(e) { signupLogin(e) {
var that = this var that = this
if (!e || !e.detail || e.detail.errMsg.indexOf('user deny') > -1) { if(e && e.detail) {
if(e.detail.errMsg.indexOf('user deny') > -1) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
showCancel: false, showCancel: false,
content: '用户未授权不能完成注册' content: '用户未授权不能完成注册'
}); });
} else if(!e.detail.errMsg && e.detail.encryptedData && e.detail.iv) { } else if(e.detail.encryptedData && e.detail.iv) {
let params = { let params = {
nickname: app.globalData.authUserInfo.nickName, nickname: app.globalData.authUserInfo.nickName,
avatar: app.globalData.authUserInfo.avatarUrl, avatar: app.globalData.authUserInfo.avatarUrl,
...@@ -161,7 +163,14 @@ export default { ...@@ -161,7 +163,14 @@ export default {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
showCancel: false, showCancel: false,
content: e.detail.errMsg || '授权失败,请重新授权' content: e.detail.errMsg
});
}
} else {
uni.showModal({
title: '提示',
showCancel: false,
content: '授权失败,请重新授权'
}); });
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment