优化报销管理增加挂靠
This commit is contained in:
1 parent
7b1c94b5ff
commit
ee49ef15b5
24 files changed
+1267
-70
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { getCurrentUser } from '@/api/login'
|
||||
import { logoutSSO } from '@/utils/authClient'
|
||||
import { logoutSSO, isAuthHandoff } from '@/utils/authClient'
|
||||
|
||||
// 用户信息类型
|
||||
const defaultUser = {
|
||||
@@ -53,8 +53,9 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
|
||||
// 初始化时加载用户信息
|
||||
loadUserFromCache()
|
||||
// 若已登录但缺少租户名称,异步从后端补齐
|
||||
if (token.value) {
|
||||
// 若已登录但缺少租户名称,异步从后端补齐;
|
||||
// 认证交接页除外(此时 token 是旧的,请求会 401 并干扰换码)
|
||||
if (token.value && !isAuthHandoff()) {
|
||||
fetchCurrentUser()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user