feat: 完善登录角色切换和本地代理

This commit is contained in:
湛兮
2026-06-12 10:20:10 +08:00
parent da3bbb09e1
commit 0503ec2e0a
6 changed files with 160 additions and 7 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ pnpm install
pnpm dev
```
The local web app listens on `http://localhost:4301` by default. Set `VITE_API_BASE_URL=http://localhost:4300` to point the web app at the local API.
本地前端默认监听 `http://localhost:4301`。如使用 `VITE_API_BASE_URL=http://localhost:4300`,浏览器会直接请求本地 API;如不设置该变量,Vite 会把 `/api` 默认代理到 `http://localhost:4300`,并自动去掉 `/api` 前缀。需要通过 `/api` 代理联调远端 API 时,可临时设置 `DEVOPS_API_PROXY_TARGET=https://devops.mrzhan.top/api`
## 构建检查