适应乡村相册,接口自适应
This commit is contained in:
@@ -10,6 +10,9 @@ let instance = axios.create({
|
|||||||
})
|
})
|
||||||
instance.interceptors.request.use(config => {
|
instance.interceptors.request.use(config => {
|
||||||
store.commit('initWaterMarker')
|
store.commit('initWaterMarker')
|
||||||
|
if (/AppCountryAlbum/.test(location.pathname)) {
|
||||||
|
config.url = config.url.replace(/(app|auth|admin)\//, "api/")
|
||||||
|
}
|
||||||
if (!config.withoutToken && store.state.token) {
|
if (!config.withoutToken && store.state.token) {
|
||||||
config.headers["Authorization"] = store.state.token
|
config.headers["Authorization"] = store.state.token
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user