fix: 修复登录拒绝也存token
This commit is contained in:
@@ -10,10 +10,17 @@ export const goBack = () => uni.navigateBack({ delta: 1 });
|
||||
|
||||
// 登录逻辑
|
||||
export const onLogin = async (e) => {
|
||||
return new Promise(async (resolve) => {
|
||||
await loginAuth().then(async () => {
|
||||
console.info("onLogin code: ", e.detail);
|
||||
|
||||
return new Promise(async (resolve, reject) => {
|
||||
// 判断用户拒绝
|
||||
if (e.detail.errno === 104) {
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
|
||||
await loginAuth(e).then(async () => {
|
||||
const { code } = e.detail;
|
||||
console.info("onLogin code: ", code);
|
||||
|
||||
// 绑定手机号
|
||||
const params = { wechatPhoneCode: code, clientId: clientId };
|
||||
|
||||
Reference in New Issue
Block a user