支持组件自适应项目
This commit is contained in:
@@ -3,18 +3,18 @@ import instance from './http'
|
||||
|
||||
instance.interceptors.request.use(config => {
|
||||
store.commit('initWaterMarker')
|
||||
|
||||
let {module} = store.state
|
||||
if (/\/node\//.test(config.url)) {
|
||||
config.baseURL = '/ns'
|
||||
} else if (/AppCountryAlbum/.test(location.pathname) || config.module == 'AppCountryAlbum') {
|
||||
} else if (/AppCountryAlbum/.test(location.pathname) || config.module == 'AppCountryAlbum' || module == "AppCountryAlbum") {
|
||||
config.baseURL = '/aca'
|
||||
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
|
||||
} else if (/\/project\/beta\//.test(location.pathname) || config.module == 'wangge' || store.state.config.corpid == 'ww2a667717a70164f1') {
|
||||
} else if (/\/project\/beta\//.test(location.pathname) || config.module == 'wangge' || module == "wangge") {
|
||||
config.baseURL = '/wangge'
|
||||
} else if (/\/project\/police\//.test(location.pathname) || config.module == 'hnjc') {
|
||||
} 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 (sessionStorage.getItem("prj") == "saas") {
|
||||
} else if (sessionStorage.getItem("prj") == "saas" || module == "saas") {
|
||||
config.baseURL = '/online'
|
||||
} else config.baseURL = "/lan"
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user