两种方式:
1、manifest.json中配置
"h5" : {"template" : "static/index.html","devServer" : {"port" : 9090,"https" : false,"proxy":{"/prod-api":{"target":"http://192.168.30.226:8997","changeOrigin":true,"pathRewrite":{"^/prod-api":""}}}},"title" : "RuoYi-App","router" : {"mode" : "hash","base" : "./"}}
2、项目中增加vue.config.js
添加以上代码。