File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/views/Login/components Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -291,10 +291,16 @@ const doSocialLogin = async (type: number) => {
291
291
await getTenantId ()
292
292
// 如果获取不到,则需要弹出提示,进行处理
293
293
if (! authUtil .getTenantId ()) {
294
- await message .prompt (' 请输入租户名称' , t (' common.reminder' )).then (async ({ value }) => {
295
- const res = await LoginApi .getTenantIdByName (value )
294
+ try {
295
+ const data = await message .prompt (' 请输入租户名称' , t (' common.reminder' ))
296
+ if (data ?.action !== ' confirm' ) throw ' cancel'
297
+ const res = await LoginApi .getTenantIdByName (data .value )
296
298
authUtil .setTenantId (res )
297
- })
299
+ } catch (error ) {
300
+ if (error === ' cancel' ) return
301
+ } finally {
302
+ loginLoading .value = false
303
+ }
298
304
}
299
305
}
300
306
// 计算 redirectUri
You can’t perform that action at this time.
0 commit comments