chore: 清理冗余配置、优化代码结构

- 移除 SSE 独立代理(VITE_APP_SSE_URL)及相关配置
- 删除 CHANGELOG.md,清理 .env 多余注释
- 重构 permission.ts 路由守卫,用 return 替代 next() 调用
- 优化 useSse.ts:合并重复逻辑、增加中文注释、调整重连参数
- 简化 vite.config.ts 代理和注释
This commit is contained in:
Ray.Hao
2026-03-27 09:03:26 +08:00
parent 8f15098042
commit 764e6582f2
11 changed files with 668 additions and 2000 deletions

View File

@@ -43,12 +43,10 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
port: +env.VITE_APP_PORT,
open: true,
proxy: {
// 代理 /dev-api 的请求
[env.VITE_APP_BASE_API]: {
changeOrigin: true,
// 代理目标地址https://api.youlai.tech
target: env.VITE_APP_API_URL,
rewrite: (path: string) => path.replace(new RegExp("^" + env.VITE_APP_BASE_API), ""),
rewrite: (path: string) => path.replace(new RegExp(`^${env.VITE_APP_BASE_API}`), ""),
},
},
},