fix(项目设置): 尝试修改三方认证回调登录页面闪现问题
This commit is contained in:
parent
6f135be7fc
commit
1b2dfd6203
|
@ -1,5 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login-form" :style="props.isPreview ? 'height: inherit' : 'height: 100vh'">
|
<div v-if="preheat" class="login-form" :style="props.isPreview ? 'height: inherit' : 'height: 100vh'">
|
||||||
|
<a-spin v-if="preheat" :loading="preheat" tip="This may take a while..."> </a-spin>
|
||||||
|
</div>
|
||||||
|
<div v-if="!preheat" class="login-form" :style="props.isPreview ? 'height: inherit' : 'height: 100vh'">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
<img :src="innerLogo" class="h-[60px] w-[290px]" />
|
<img :src="innerLogo" class="h-[60px] w-[290px]" />
|
||||||
|
@ -132,7 +135,7 @@
|
||||||
import { useAppStore, useUserStore } from '@/store';
|
import { useAppStore, useUserStore } from '@/store';
|
||||||
import useLicenseStore from '@/store/modules/setting/license';
|
import useLicenseStore from '@/store/modules/setting/license';
|
||||||
import { encrypted } from '@/utils';
|
import { encrypted } from '@/utils';
|
||||||
import { getLongType, setLoginExpires, setLongType } from '@/utils/auth';
|
import { getLongType, isLogin, setLoginExpires, setLongType } from '@/utils/auth';
|
||||||
import { getFirstRouteNameByPermission, routerNameHasPermission } from '@/utils/permission';
|
import { getFirstRouteNameByPermission, routerNameHasPermission } from '@/utils/permission';
|
||||||
|
|
||||||
import type { LoginData } from '@/models/user';
|
import type { LoginData } from '@/models/user';
|
||||||
|
@ -150,6 +153,8 @@
|
||||||
|
|
||||||
const orgOptions = ref<SelectOptionData[]>([]);
|
const orgOptions = ref<SelectOptionData[]>([]);
|
||||||
|
|
||||||
|
const preheat = ref(false);
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
isPreview?: boolean;
|
isPreview?: boolean;
|
||||||
slogan?: string;
|
slogan?: string;
|
||||||
|
@ -308,9 +313,11 @@
|
||||||
}
|
}
|
||||||
getAuthDetailByType(authType).then((res) => {
|
getAuthDetailByType(authType).then((res) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
|
preheat.value = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!res.enable) {
|
if (!res.enable) {
|
||||||
|
preheat.value = false;
|
||||||
Message.error(t('login.auth_not_enable'));
|
Message.error(t('login.auth_not_enable'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -362,6 +369,13 @@
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
userStore.getAuthentication();
|
userStore.getAuthentication();
|
||||||
initPlatformInfo();
|
initPlatformInfo();
|
||||||
|
try {
|
||||||
|
isLogin().then((res) => {
|
||||||
|
preheat.value = res;
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
preheat.value = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue