1:找到config下面的index.js 在dev下面的proxyTable添加如下
'/': {
target: 'http://www.zgddyc.com.cn/api/', //你要访问的服务器域名
changeOrigin: true, //允许跨域
pathRewrite: {
'^/': ''
}
}
修改完后
proxyTable: {
'/': {
target: 'http://www.zgddyc.com.cn/api/', //你要访问的服务器域名
changeOrigin: true, //允许跨域
pathRewrite: {
'^/': ''
}
}
},