恢复:框架层对接芋道后端

- vite.config.mts: 移除 /admin-api/system/* 5 条转发至 8000 的规则,
  system/infra 等基础接口回归兜底 /admin-api → 48080;
  保留 AIoT 业务必需的代理(/admin-api/aiot/*、/uploads、/captures)
- store/auth.ts: 移除 hideMenuItems/renameMenuItems 菜单后处理,
  恢复 accessStore.setAccessMenus 直接写入后端原始菜单
- .env: VITE_APP_TITLE / VITE_APP_TENANT_ENABLE / VITE_APP_API_ENCRYPT_ENABLE
  三项恢复 upstream 默认值(芋道管理系统 / true / true)

保留项(AIoT 业务):/work-order 公开路由、AIoT API & 视图、
WVP 代理规则、packages/@core/preferences 默认主题

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
lzh
2026-04-17 09:14:00 +08:00
parent 09fb8ebc61
commit c7b2ad1e79
3 changed files with 8 additions and 71 deletions

View File

@@ -69,39 +69,12 @@ export default defineConfig(async () => {
path.replace('/admin-api/aiot/device', '/api/ai'),
},
// ==================== 系统基础路由 ====================
// 认证相关接口 -> 告警平台(测试阶段提供模拟认证)
'/admin-api/system/auth': {
changeOrigin: true,
target: 'http://127.0.0.1:8000',
ws: true,
},
// 租户相关接口 -> 告警平台(测试阶段返回默认值)
'/admin-api/system/tenant': {
changeOrigin: true,
target: 'http://127.0.0.1:8000',
},
// 验证码接口 -> 告警平台(测试阶段返回禁用状态)
'/admin-api/system/captcha': {
changeOrigin: true,
target: 'http://127.0.0.1:8000',
},
// 字典数据接口 -> 告警平台(测试阶段返回空)
'/admin-api/system/dict-data': {
changeOrigin: true,
target: 'http://127.0.0.1:8000',
},
// 消息通知接口 -> 告警平台(测试阶段返回空)
'/admin-api/system/notify-message': {
changeOrigin: true,
target: 'http://127.0.0.1:8000',
},
// 其他接口 -> 芋道主平台(未来对接)
// 测试阶段:这些接口会 404但不影响核心功能
// ==================== 芋道主平台 ====================
// 所有 system/*、infra/* 等基础接口 -> 芋道后端 48080
'/admin-api': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/admin-api/, ''),
// mock代理目标地址
target: 'http://localhost:48080/admin-api',
ws: true,
},