This commit is contained in:
yanran200730
2022-05-24 11:14:29 +08:00
parent 72d814c913
commit e01eb4fe28
15 changed files with 168 additions and 48 deletions

View File

@@ -13,6 +13,9 @@ instance.interceptors.request.use(config => {
if (/AppCountryAlbum/.test(location.pathname)) {
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
}
if (sessionStorage.getItem("prj") == "saas") {
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
}
if (!config.withoutToken && store.state.token) {
config.headers["Authorization"] = store.state.token
}