天府星配置

This commit is contained in:
aixianling
2022-11-01 16:20:13 +08:00
parent 7d111f90e4
commit 3f87bffd17
2 changed files with 11 additions and 1 deletions

View File

@@ -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