!400 fix(LoginForm): update doSocialLogin

Merge pull request !400 from AhJindeg/dev
This commit is contained in:
芋道源码 2024-03-09 07:35:04 +00:00 committed by Gitee
commit a6e29c5615
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -291,10 +291,16 @@ const doSocialLogin = async (type: number) => {
await getTenantId() await getTenantId()
// //
if (!authUtil.getTenantId()) { if (!authUtil.getTenantId()) {
await message.prompt('请输入租户名称', t('common.reminder')).then(async ({ value }) => { try {
const res = await LoginApi.getTenantIdByName(value) const data = await message.prompt('请输入租户名称', t('common.reminder'))
if (data?.action !== 'confirm') throw 'cancel'
const res = await LoginApi.getTenantIdByName(data.value)
authUtil.setTenantId(res) authUtil.setTenantId(res)
}) } catch (error) {
if(error === 'cancel') return
} finally {
loginLoading.value = false
}
} }
} }
// redirectUri // redirectUri