|
@@ -4,7 +4,7 @@ import { iFromValues } from '@/types/login'
|
|
|
import { ProjectInfo } from '@/types/project'
|
|
|
import { iGroup, iUserInfo } from '@/types/setting'
|
|
|
import { apiGetGroupList, apiProjectInfo, apiUserInfo } from '@/utils/common/api'
|
|
|
-import { delUserInfo, getUserInfo, saveUserInfo } from '@/utils/common/user'
|
|
|
+import { saveUserInfo } from '@/utils/common/user'
|
|
|
import consts from '@/utils/consts'
|
|
|
import history from '@/utils/history'
|
|
|
import { action, computed, observable } from 'mobx'
|
|
@@ -79,7 +79,10 @@ class UserState {
|
|
|
history.replace('/login')
|
|
|
}
|
|
|
|
|
|
- @action async check() {
|
|
|
+ @action async check(pathname?: string) {
|
|
|
+ if (pathname && consts.ROUTES_WHILE.includes(pathname)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.userInfo?.id) {
|
|
|
this.toggleLoading()
|
|
|
await this.getUserInfo()
|