This commit is contained in:
2025-09-23 09:10:48 +08:00
parent 3e59b70f7d
commit 9476b8c43c
6 changed files with 86 additions and 90 deletions

View File

@@ -6,7 +6,7 @@ module.exports = {
open:true,//启动时自动打开浏览器
proxy:{//配置代理解决跨域问题
[process.env.VUE_APP_BASE_API]:{//环境变量定义代理路径前缀
target: 'http://192.168.0.10:8000',//后端项目真实地址
target: 'http://192.168.0.100:8000',//后端项目真实地址
changeOrigin:true,//开启origin伪装,绕过跨域限制
pathRewrite: {//路径重写规则
['^' + process.env.VUE_APP_BASE_API]: ''//去除请求路径中的代理前缀