feat(web):重构前端路由和配置管理

- 移除旧版全局变量定义,采用Vue Router管理页面跳转
- 新增配置文件统一管理游戏名称和注册码设置
-优化加载条逻辑,使用onMounted确保DOM元素正确获取
- 添加服务端配置接口,动态加载游戏配置信息
- 升级依赖包,引入vue-router支持单页应用
- 调整项目结构,分离服务器端代码至独立目录
- 配置Vite代理转发API请求到本地开发服务器
- 更新package.json脚本命令,支持前后端联合调试
- 引入pnpm workspace管理模式,提升多包协作效率
This commit is contained in:
kubbo
2025-09-30 18:39:51 +08:00
parent 39f7598b02
commit 5d20a7def3
14 changed files with 249 additions and 100 deletions

View File

@@ -4,4 +4,13 @@ import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
})
server: {
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
})