Skip to content

Commit

Permalink
🥬fix:更改一些设置
Browse files Browse the repository at this point in the history
  • Loading branch information
durunsong committed Nov 20, 2024
1 parent a6aa553 commit e101fd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -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'
4 changes: 1 addition & 3 deletions src/store/modules/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e101fd4

Please sign in to comment.