feat(mock): mock 演进轮——应用列表/代理测试页 + 网关 mock 数据扩充

- views/app/AppList.vue(新)+ views/proxytest/ProxyTest.vue(新):应用列表与代理测试演示页
- router/routes + apiDefinitions + App.vue/layout:新页路由与菜单接线
- assets/mock/gatewayApi.ts:mock 数据扩充(+136 行)
- RouteList:列表页联动增强
- vite.config:mock 相关配置调整
- theme.ts:sync 刷新至 20261006-2013-75c1d10 并补回本仓唯一允许适配(顶部 // @ts-nocheck,strict vue-tsc 契约);typecheck 零错误
This commit is contained in:
chenxing
2026-10-06 20:22:02 +08:00
parent 8a21d85036
commit 77060325ef
10 changed files with 711 additions and 7 deletions
+6 -1
View File
@@ -121,10 +121,15 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
port: 8131,
// 本地联调:/open-gateway/api/* → base 域(Caddy 剥前缀后转发到网关容器网内 10013)
// 走代理而非跨源直连:网关无 CORS,且 10013 仅绑容器网内 127.0.0.1
// 设 YH_GW_PROXY_TARGET(如 http://localhost:10013)= 不经 base 域直打本地网关,
// 此时剥掉 /open-gateway 前缀(原本由 Caddy 剥);不设则行为与线上联调零变化
proxy: {
"/open-gateway/api": {
target: "http://base.yunhaixingtong.com",
target: process.env.YH_GW_PROXY_TARGET || "http://base.yunhaixingtong.com",
changeOrigin: true,
...(process.env.YH_GW_PROXY_TARGET
? { rewrite: (p: string) => p.replace(/^\/open-gateway/, "") }
: {}),
},
// 主题通道本地联调(照 Notice 配方):index.html loader 走同源相对 /static/js/yh-theme-init.js,
// manifest/CSS 经此代理到中央通道;base 域不可达(无 VPN)时由 npm run dev:mock