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