优化双数据源
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
import { type FormInstance, Message } from '@arco-design/web-vue'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
import { getImageCaptcha } from '@/apis/common'
|
||||
import { useTabsStore, useUserStore } from '@/stores'
|
||||
import { useAppStore, useTabsStore, useUserStore } from '@/stores'
|
||||
import { encryptByRsa } from '@/utils/encrypt'
|
||||
|
||||
const loginConfig = useStorage('login-config', {
|
||||
@@ -106,6 +106,7 @@ const getCaptcha = () => {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const tabsStore = useTabsStore()
|
||||
const appStore = useAppStore()
|
||||
const router = useRouter()
|
||||
const loading = ref(false)
|
||||
// 登录
|
||||
@@ -120,6 +121,8 @@ const handleLogin = async () => {
|
||||
captcha: form.captcha,
|
||||
uuid: form.uuid,
|
||||
})
|
||||
// 登录成功后获取系统配置(根据登录账号显示不同的系统名称)
|
||||
await appStore.initSiteConfig()
|
||||
tabsStore.reset()
|
||||
const { redirect, ...othersQuery } = router.currentRoute.value.query
|
||||
const { rememberMe } = loginConfig.value
|
||||
@@ -204,4 +207,4 @@ onMounted(() => {
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user