fix: 问题修复
This commit is contained in:
parent
c54d44b57e
commit
ad6b3f208c
@ -94,7 +94,7 @@ async function changeTeam({ teamId, corpId, corpUserId, externalUserId, qrid, re
|
|||||||
qrid,
|
qrid,
|
||||||
referenceCustomerId: referenceCustomerId || ''
|
referenceCustomerId: referenceCustomerId || ''
|
||||||
});
|
});
|
||||||
await login()
|
await login('', { forceVerify: true })
|
||||||
if (account.value && account.value.mobile) {
|
if (account.value && account.value.mobile) {
|
||||||
bindTeam({ corpUserId, externalUserId })
|
bindTeam({ corpUserId, externalUserId })
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export default defineStore("accountStore", () => {
|
|||||||
|
|
||||||
async function login(phoneCode = '', options = {}) {
|
async function login(phoneCode = '', options = {}) {
|
||||||
if (loading.value) return;
|
if (loading.value) return;
|
||||||
if (account.value && account.value.mobile) {
|
if (account.value && account.value.mobile && !options.forceVerify) {
|
||||||
return account.value
|
return account.value
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@ -54,6 +54,12 @@ export default defineStore("accountStore", () => {
|
|||||||
|
|
||||||
// initIMAfterLogin(openid.value)
|
// initIMAfterLogin(openid.value)
|
||||||
return normalizedAccount
|
return normalizedAccount
|
||||||
|
} else {
|
||||||
|
account.value = null;
|
||||||
|
openid.value = '';
|
||||||
|
uni.removeStorageSync('account');
|
||||||
|
uni.removeStorageSync('openid');
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!options.silent) toast('登录失败,请重新登录');
|
if (!options.silent) toast('登录失败,请重新登录');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user