diff --git a/src/common/axios.js b/src/common/axios.js index 40ecdda7..785b1f55 100644 --- a/src/common/axios.js +++ b/src/common/axios.js @@ -14,6 +14,8 @@ instance.interceptors.request.use(config => { } else if (/\/project\/police\//.test(location.pathname) || config.module == 'hnjc' || module == "hnjc") { config.baseURL = '/hnjc' config.url = config.url.replace(/(app|auth|admin)\//, "api/") + } else if (module) { + config.baseURL = `/${module}` } else if (sessionStorage.getItem("prj") == "saas" || module == "saas") { config.baseURL = '/online' } else config.baseURL = "/lan" diff --git a/src/manifest.json b/src/manifest.json index 9484005e..86c7a7ad 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -78,6 +78,13 @@ "pathRewrite": { "^/hnjc": "/" } + }, + "/xaxc": { + "target": "http://192.168.1.87:12003/", + "changeOrigin": true, + "pathRewrite": { + "^/xaxc": "/" + } } } }, diff --git a/src/pages/login.vue b/src/pages/login.vue index 87b789de..380b2ee0 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -55,6 +55,8 @@ export default { corpId = 'ww596787bb70f08288' if (/\/project\/police\//.test(libPath)) { module = 'hnjc' + } else if (/\/project\/xicheng\//.test(libPath)) { + module = 'xaxc' } else if (/\/project\/beta\//.test(libPath)) { corpId = 'ww2a667717a70164f1' module = 'wangge'