From efbfe7d3837c250096b5625e27976d68ef574d4d Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 1 Jul 2022 15:25:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A5=BF=E5=AE=89=E6=96=B0?= =?UTF-8?q?=E5=9F=8E=E5=8C=BA=E5=AE=9A=E5=88=B6=E9=A1=B9=E7=9B=AE=E4=BB=A3?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/axios.js | 2 ++ src/manifest.json | 7 +++++++ src/pages/login.vue | 2 ++ 3 files changed, 11 insertions(+) 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'