@@ -71,7 +71,7 @@ function createPageLoadingGuard(router: Router) {
return true;
}
if (!ventStore.allTableHeaderColumns) {
- ventStore.setAllTableHeaderColumns();
+ await ventStore.setAllTableHeaderColumns();
if (unref(getOpenPageLoading)) {
appStore.setPageLoadingAction(true);
@@ -89,6 +89,11 @@ export const useUserStore = defineStore({
getPassword() {
return getAuthCache<string>(PWD_KEY);
},
+ // 目前用户角色列表为空数组,所以使用既定的用户名判断
+ getIsAutoLogin() {
+ console.log(this.getUserInfo.username === AUTO_LOGIN_USERNAME);
+ return this.getUserInfo.username === AUTO_LOGIN_USERNAME;
+ },
actions: {
/** 设置用户密码并加密,理论上加密、解密的工作应仅在此模块进行 */
@@ -31,8 +31,7 @@ export function checkStatus(status: number, msg: string, errorMessageMode: Error
userStore.setSessionTimeout(true);
} else {
// 经由自动登录的账号需要在登录信息过期之后重新登录
- // 目前用户角色列表为空数组,所以使用既定的用户名判断
- const continuallyLogin = userStore.getUserInfo.username === AUTO_LOGIN_USERNAME;
+ const continuallyLogin = userStore.getIsAutoLogin;
if (continuallyLogin) {
userStore.continuallyLogin();