From 656696be4b70513e94f1341db8d1c2d3f43b3e6d Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Wed, 13 Jul 2022 09:18:47 +0800
Subject: [PATCH] 登录跳转首页
---
src/views/login/component/account.vue | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/views/login/component/account.vue b/src/views/login/component/account.vue
index 29b40dd..08b28f0 100644
--- a/src/views/login/component/account.vue
+++ b/src/views/login/component/account.vue
@@ -76,9 +76,6 @@
setup() {
const { t } = useI18n();
const userInfo = useUserInfo()
- const { userInfos } = storeToRefs(userInfo);
- const storesThemeConfig = useThemeConfig();
- const { themeConfig } = storeToRefs(storesThemeConfig);
const route = useRoute();
const router = useRouter();
const state = reactive({
@@ -101,11 +98,11 @@
// 存储 token 到浏览器缓存
let res = await useLoginApi().signIn(state.ruleForm)
if(res.data.code === '200'){
- Session.set('ifMenu',false)
- Session.set('projectId','')
+ userInfo.setUserInfos(res.data.data)
Session.set('token', res.data.data.accessToken);
- Session.set('sign',res.data.data.id)
- await initFrontEndControlRoutes();
+ Session.set('projectId','');
+ Session.set('uid',res.data.data.uid);
+ await initBackEndControlRoutes();
signInSuccess();
}else{
state.loading.signIn = false
--
Gitblit v1.9.2