فهرست منبع

fixup! fix: 😀修复租户id为空时无法跳转的问题

喵你个旺呀 1 سال پیش
والد
کامیت
76187425d7
2فایلهای تغییر یافته به همراه1 افزوده شده و 7 حذف شده
  1. 1 0
      Web/src/stores/userInfo.ts
  2. 0 7
      Web/src/utils/axios-utils.ts

+ 1 - 0
Web/src/stores/userInfo.ts

@@ -83,6 +83,7 @@ export const useUserInfo = defineStore('userInfo', {
 							tenantId: d.tenantId,
 							tenantId: d.tenantId,
 							time: new Date().getTime(),
 							time: new Date().getTime(),
 						};
 						};
+						Local.remove('t');
 						Local.set('t', userInfos.tenantId);
 						Local.set('t', userInfos.tenantId);
 
 
 						// vue-next-admin 提交Id:225bce7 提交消息:admin-23.03.26:发布v2.4.32版本
 						// vue-next-admin 提交Id:225bce7 提交消息:admin-23.03.26:发布v2.4.32版本

+ 0 - 7
Web/src/utils/axios-utils.ts

@@ -35,14 +35,7 @@ export const getHeader = () => {
 
 
 // 清除 token
 // 清除 token
 export const clearAccessAfterReload = () => {
 export const clearAccessAfterReload = () => {
-	const tenantId = useUserInfo().userInfos.tenantId;
-
 	clearTokens();
 	clearTokens();
-	if (tenantId) {
-		Local.remove('t');
-		Local.set('t', tenantId);
-	}
-
 	// 刷新浏览器
 	// 刷新浏览器
 	window.location.reload();
 	window.location.reload();
 };
 };