refactor: ♻️ 用户信息不再本地持久化,改为内存态:刷新页面后需要重新请求用户信息

This commit is contained in:
Ray.Hao
2025-08-15 09:35:58 +08:00
parent d9b2f55a5e
commit a5da8d5788
8 changed files with 31 additions and 65 deletions

View File

@@ -115,7 +115,7 @@ import AuthAPI, { type LoginFormData } from "@/api/auth.api";
import router from "@/router";
import { useUserStore } from "@/store";
import CommonWrapper from "@/components/CommonWrapper/index.vue";
import { Auth } from "@/utils/auth";
import { AuthStorage } from "@/utils/auth";
const { t } = useI18n();
const userStore = useUserStore();
@@ -130,7 +130,7 @@ const isCapsLock = ref(false);
// 验证码图片Base64字符串
const captchaBase64 = ref();
// 记住我
const rememberMe = Auth.getRememberMe();
const rememberMe = AuthStorage.getRememberMe();
const loginFormData = ref<LoginFormData>({
username: "admin",