vue.config.js 585 B

123456789101112131415161718
  1. module.exports = {
  2. publicPath: './',
  3. devServer: {
  4. proxy: {
  5. '/api':{
  6. //target:"http://8.136.230.133:8080",//这里设置你要访问的域名(或IP+端口) //测试
  7. target:"http://8.140.188.129:8080",//这里设置你要访问的域名(或IP+端口) //线上
  8. //target:"http://192.168.2.122:8080",//这里设置你要访问的域名(或IP+端口)
  9. changeOrigin:true,
  10. pathRewrite:{
  11. '^/api': '/'
  12. }
  13. }
  14. }
  15. }
  16. }