去除wx.getUserProfile接口

This commit is contained in:
linfeng 2022-10-31 09:21:06 +08:00
parent ce6d6cffc3
commit 7653cd6e64
2 changed files with 14 additions and 15 deletions

View File

@ -40,12 +40,12 @@
title: '正在登陆'
});
var that = this;
let userInfo = await this.getUserProfile();
// let userInfo = await this.getUserProfile();
let code = await this.getLoginCode();
that.$H.post('user/miniWxlogin', {
code: code,
username: userInfo.nickName,
avatar: userInfo.avatarUrl,
// username: userInfo.nickName,
// avatar: userInfo.avatarUrl,
}).then(res => {
if (res.code === 0) {
@ -79,17 +79,17 @@
});
});
},
getUserProfile() {
return new Promise((resolve, reject) => {
wx.getUserProfile({
lang: 'zh_CN',
desc: '用于完善会员资料',
success: res => {
resolve(res.userInfo);
}
});
});
}
// getUserProfile() {
// return new Promise((resolve, reject) => {
// wx.getUserProfile({
// lang: 'zh_CN',
// desc: '',
// success: res => {
// resolve(res.userInfo);
// }
// });
// });
// }
}
}

View File

@ -111,7 +111,6 @@
} else {
this.hasLogin = false;
}
// this.getMsgNum();
},
onShareAppMessage(res) {
let imgURL = 'http://pic.linfeng.tech/logo.png';