This commit is contained in:
2025-12-12 01:44:41 +08:00
parent 21abcaff53
commit 2f1d732a36
46 changed files with 7756 additions and 484 deletions

27
vue.config.js Normal file
View File

@@ -0,0 +1,27 @@
/**
* Vue CLI 配置文件
* 用于配置开发服务器代理,解决跨域问题
*/
module.exports = {
devServer: {
proxy: {
// 代理所有 /api 开头的请求
'/api': {
target: 'http://localhost:8123', // 后端服务地址
changeOrigin: true, // 改变请求源
ws: true, // 支持websocket
pathRewrite: {
// 将 /api 重写为空,因为后端没有 /api 前缀
'^/api': ''
}
}
}
},
// 确保 transpileDependencies 配置正确
transpileDependencies: [],
// 生产环境配置
productionSourceMap: false
}