diff --git a/.env.development b/.env.development index 7c60ff9..48f9f2e 100644 --- a/.env.development +++ b/.env.development @@ -12,7 +12,7 @@ VITE_MODE = 'development' ## 变量必须以 VITE_ 为前缀才能暴露给外部读取 # 本地运行后端 -VITE_BASE_API = 'http://localhost:4500' +VITE_BASE_API = 'http://localhost:4000' # 部署到 vercel # VITE_BASE_API = 'https://kilyicms-server.vercel.app' diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 0100ce2..1cb3840 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -34,8 +34,6 @@ export const useUserStore: any = defineStore("user", () => { const res: any = await loginApi({ user_name, password }); // 判断登录结果 if (res.status === 200) { - console.log("登录成功", res.token); - setToken(res.token); // 登录成功notify标记 setLocalData(CACHE_KEY.IS_LOGIN_KEY, true); @@ -77,7 +75,7 @@ export const useUserStore: any = defineStore("user", () => { /** 模拟角色变化 */ const changeRoles = async (role: string) => { try { - // 这里user_name和password具体是什么,需要看后端SQL表设计和接口约束,这里只是个示例 + // 这里user_name和password具体是什么,需要看后端SQL设计和接口约束,这里只是个示例 const newRole = role == "admin" ? "admin" : "user"; const params = { user_name: newRole,