新增部署发布模块

This commit is contained in:
aixianling
2022-03-30 19:20:44 +08:00
parent 395bc26bb1
commit 5478611712
3 changed files with 141 additions and 2 deletions

View File

@@ -9,10 +9,12 @@ let baseURLs = {
instance.defaults.baseURL = baseURLs[process.env.NODE_ENV]
instance.interceptors.request.eject(0);
instance.interceptors.request.use(config => {
if (/\/xiushan/.test(location.pathname)) {
if (config.url.startsWith("/node")) {
config.baseURL = "/ns"
} else if (/\/xiushan/.test(location.pathname)) {
config.baseURL = "/xsjr"
config.url = config.url.replace(/(app|auth|admin)\//, "")
}else if (/project\/oms/.test(location.pathname)) {
} else if (/project\/oms/.test(location.pathname)) {
config.baseURL = "/omsapi"
config.url = config.url.replace(/(app|auth|admin)\//, "")
}