From 35328f3b54e2b05aae72e3ce1fabb996e76acca5 Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 6 Jun 2022 10:15:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B9=96=E5=8D=97=E5=85=AC?= =?UTF-8?q?=E5=AE=89=E9=A1=B9=E7=9B=AE=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/axios.js | 2 +- src/pages/login.vue | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/axios.js b/src/common/axios.js index b448a6f3..c08174b3 100644 --- a/src/common/axios.js +++ b/src/common/axios.js @@ -17,7 +17,7 @@ instance.interceptors.request.use(config => { config.url = config.url.replace(/(app|auth|admin)\//, "api/") } else if (/\/grid\//.test(location.pathname)) { config.baseURL = '/wangge' - } else if (/\/project\/police\//.test(location.pathname)) { + } else if (/\/project\/police\//.test(location.pathname)||config.module=='hnjc') { config.baseURL = '/hnjc' config.url = config.url.replace(/(app|auth|admin)\//, "api/") } else if (sessionStorage.getItem("prj") == "saas") { diff --git a/src/pages/login.vue b/src/pages/login.vue index 672b4c04..459d879f 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -50,7 +50,10 @@ export default { handleLogin() { this.$refs.loginForm.validate(v => { if (v) { - let {name: module} = this.currentApp + let {name: module,libPath} = this.currentApp + if(/\/project\/police\//.test(libPath)){ + module = 'hnjc' + } this.getToken({...this.form, module, corpId: 'wpytYEDgAAcpXjmlYkYwKO60JDGDWrXg'}).then(() => { this.target ? uni.reLaunch({url: this.target}) : uni.navigateBack({}) }).catch(() => 0)