在config里的index.js 的proxyTable里面配置格式为

dev: {

    // Paths
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    //做本地代理
    proxyTable: {
      '/doctor_sys_api': {
        target: 'http://47.102.194.98:8080/doctor_sys_api',
        changeOrigin: true,
        pathRewrite: {
          '^/doctor_sys_api': ''
        }
      },
    },

vue项目做本地代理
详情参考 https://blog.csdn.net/qq_36772866/article/details/85795111

相关文章:

  • 2022-01-06
  • 2021-12-04
  • 2022-01-18
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2021-08-15
相关资源
相似解决方案