axios封装

This commit is contained in:
仲么了
2023-12-26 10:28:29 +08:00
parent fea95de2da
commit 653a32c1ce
4 changed files with 244 additions and 70 deletions

View File

@@ -10,19 +10,13 @@ export default defineConfig({
'/api': {
// target: "http://192.168.1.115:10215", //黄正剑
// target: "http://192.168.1.22:10215", //超高压
target: "http://192.168.1.9:10215", //数据中心
target: 'http://192.168.1.9:10215', //数据中心
// target: "http://192.168.1.13:10215", //治理
// target: 'http://192.168.1.18:10215', // 河北
// target: "http://192.168.1.31:10215", // 海南
// target: "http://192.168.1.29:10215", // 冀北
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), //路径重写,把'/api'替换为''
},
'/api1': {
//target: "http://192.168.1.65:7300/mock/6384a6175854f20022dc9300/jibei",
target: 'http://192.168.1.9:8088',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api1/, ''), //路径重写,把'/api'替换为''
rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为''
}
}
},