feat: 区分开发和生产环境配置并完善加载与回归测试

This commit is contained in:
zhanjunhao
2026-10-27 15:55:20 +08:00
parent 7ba07f8696
commit a44590a6ab
9 changed files with 271 additions and 113 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ loadUsers(0, pageSize)
- 删除 `public/config.js`。
- 删除 `index.html` 中的 `<script src="/config.js"></script>`。
- `getServerURL()` 不再访问 `window.__APP_CONFIG__`,只读取构建变量并回退到同源。
- `.env.example` 增加后端地址示例,`src/helpers/config.test.js` 覆盖缺省、空值、绝对地址以及 HTML 不再加载旧脚本。
- 环境配置提供后端地址(现使用 `.env.development` / `.env.production`,原 `.env.example` 已移除),`src/helpers/config.test.js` 覆盖缺省、空值、绝对地址以及 HTML 不再加载旧脚本。
现在的地址选择只有两级: