增加西安新城区定制项目代理

This commit is contained in:
aixianling
2022-07-01 15:25:53 +08:00
parent eedde26986
commit efbfe7d383
3 changed files with 11 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ instance.interceptors.request.use(config => {
} else if (/\/project\/police\//.test(location.pathname) || config.module == 'hnjc' || module == "hnjc") { } else if (/\/project\/police\//.test(location.pathname) || config.module == 'hnjc' || module == "hnjc") {
config.baseURL = '/hnjc' config.baseURL = '/hnjc'
config.url = config.url.replace(/(app|auth|admin)\//, "api/") config.url = config.url.replace(/(app|auth|admin)\//, "api/")
} else if (module) {
config.baseURL = `/${module}`
} else if (sessionStorage.getItem("prj") == "saas" || module == "saas") { } else if (sessionStorage.getItem("prj") == "saas" || module == "saas") {
config.baseURL = '/online' config.baseURL = '/online'
} else config.baseURL = "/lan" } else config.baseURL = "/lan"

View File

@@ -78,6 +78,13 @@
"pathRewrite": { "pathRewrite": {
"^/hnjc": "/" "^/hnjc": "/"
} }
},
"/xaxc": {
"target": "http://192.168.1.87:12003/",
"changeOrigin": true,
"pathRewrite": {
"^/xaxc": "/"
}
} }
} }
}, },

View File

@@ -55,6 +55,8 @@ export default {
corpId = 'ww596787bb70f08288' corpId = 'ww596787bb70f08288'
if (/\/project\/police\//.test(libPath)) { if (/\/project\/police\//.test(libPath)) {
module = 'hnjc' module = 'hnjc'
} else if (/\/project\/xicheng\//.test(libPath)) {
module = 'xaxc'
} else if (/\/project\/beta\//.test(libPath)) { } else if (/\/project\/beta\//.test(libPath)) {
corpId = 'ww2a667717a70164f1' corpId = 'ww2a667717a70164f1'
module = 'wangge' module = 'wangge'