天府星配置
This commit is contained in:
@@ -13,6 +13,8 @@ instance.interceptors.request.use(config => {
|
||||
config.baseURL = "/wg"
|
||||
} else if (/\/project\/sass/.test(location.pathname)) {
|
||||
config.baseURL = "/saas"
|
||||
} else if (/\/tianfuxing/.test(location.pathname)) {
|
||||
config.baseURL = "/tfx"
|
||||
} else if (/\/xiushan/.test(location.pathname)) {
|
||||
config.baseURL = "/xsjr"
|
||||
} else if (/project\/oms/.test(location.pathname)) {
|
||||
@@ -20,7 +22,7 @@ instance.interceptors.request.use(config => {
|
||||
} else if (/#url-/.test(location.hash)) {
|
||||
config.baseURL = location.hash.replace(/#url-/, '/')
|
||||
}
|
||||
if (["/xsjr", "/omsapi"].includes(config.baseURL)) {
|
||||
if (["/xsjr", "/omsapi", "/tfx"].includes(config.baseURL)) {
|
||||
config.url = config.url.replace(/(app|auth|admin)\//, "")
|
||||
}
|
||||
return config
|
||||
|
||||
@@ -119,6 +119,14 @@ module.exports = {
|
||||
//地址重写
|
||||
'^/wg': '/'
|
||||
}
|
||||
},
|
||||
'/tfx': {
|
||||
target: 'http://192.168.1.87:12421',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
//地址重写
|
||||
'^/tfx': '/api'
|
||||
}
|
||||
}
|
||||
},
|
||||
disableHostCheck: true
|
||||
|
||||
Reference in New Issue
Block a user