update
This commit is contained in:
@@ -98,12 +98,14 @@
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { t } from '/@/hooks/locales/useLocales.ts';
|
||||
import { encipher } from '/@/utils/jsencrypt';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { getAuthCache } from '/@/utils/auth.ts';
|
||||
import { TOKEN_KEY } from '/@/enum/cacheEnum.ts';
|
||||
import { PageEnum, setBaseLogin } from '/@/enum/pageEnum.ts';
|
||||
|
||||
const router = useRouter();
|
||||
// console.log(t('login'));
|
||||
const route = useRoute();
|
||||
console.log('route', route);
|
||||
const prefixCls = 'mini-login';
|
||||
const { notification, createMessage } = useMessage();
|
||||
const userStore = useUserStore();
|
||||
@@ -188,7 +190,10 @@
|
||||
description: `${t('login.loginSuccessDesc')}: ${userInfo.realname}`,
|
||||
duration: 3,
|
||||
});
|
||||
router.replace({ path: '/home' });
|
||||
|
||||
let path = route.path == PageEnum.BASE_LOGIN_YINCHUAN ? PageEnum.YINCHUAN_HOME : PageEnum.BASE_HOME;
|
||||
setBaseLogin(route.path);
|
||||
router.replace({ path: path });
|
||||
}
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
@@ -312,4 +317,4 @@
|
||||
.ant-btn-primary:not(.ant-btn-background-ghost):not([disabled]) {
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user