oms接入3.0产品库

This commit is contained in:
aixianling
2022-03-14 11:38:06 +08:00
parent fcb6bbf956
commit 66fad244d9
17 changed files with 2666 additions and 7 deletions

View File

@@ -12,6 +12,9 @@ instance.interceptors.request.use(config => {
if (/\/xiushan/.test(location.pathname)) {
config.baseURL = "/xsjr"
config.url = config.url.replace(/(app|auth|admin)\//, "")
}else if (/project\/oms/.test(location.pathname)) {
config.baseURL = "/omsapi"
config.url = config.url.replace(/(app|auth|admin)\//, "")
}
if (!config.withoutToken && localStorage.getItem("ui-token")) {
config.headers['Authorization'] = ["Bearer", localStorage.getItem("ui-token")].join(" ")