This commit is contained in:
zk
2024-05-17 16:10:51 +08:00
parent ce2b8f5837
commit 7444e6ff75
18 changed files with 125 additions and 76 deletions
+9 -4
View File
@@ -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>