正在显示
1 个修改的文件
包含
7 行增加
和
0 行删除
@@ -29,6 +29,13 @@ module.exports = { | @@ -29,6 +29,13 @@ module.exports = { | ||
29 | assetsSubDirectory: 'static', | 29 | assetsSubDirectory: 'static', |
30 | assetsPublicPath: '/', | 30 | assetsPublicPath: '/', |
31 | proxyTable: { | 31 | proxyTable: { |
32 | + '/api/static':{ | ||
33 | + target: 'http://localhost:12021',//设置你调用的接口域名和端口号 别忘了加http | ||
34 | + changeOrigin: false, | ||
35 | + pathRewrite: { | ||
36 | + '^/api/static': '/static', //这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可 | ||
37 | + } | ||
38 | + }, | ||
32 | '/api':{ | 39 | '/api':{ |
33 | target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http | 40 | target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http |
34 | // target: 'http://192.168.1.189:12343',//设置你调用的接口域名和端口号 别忘了加http | 41 | // target: 'http://192.168.1.189:12343',//设置你调用的接口域名和端口号 别忘了加http |
-
请 注册 或 登录 后发表评论