From 5e92053f6062fa6f4dff483d8a06af09b6014639 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 18 May 2022 14:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E5=BA=94=E4=B9=A1=E6=9D=91=E7=9B=B8?= =?UTF-8?q?=E5=86=8C,=E6=8E=A5=E5=8F=A3=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/axios.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/axios.js b/src/common/axios.js index f80871ca..3b9ee8f1 100644 --- a/src/common/axios.js +++ b/src/common/axios.js @@ -10,6 +10,9 @@ let instance = axios.create({ }) instance.interceptors.request.use(config => { store.commit('initWaterMarker') + if (/AppCountryAlbum/.test(location.pathname)) { + config.url = config.url.replace(/(app|auth|admin)\//, "api/") + } if (!config.withoutToken && store.state.token) { config.headers["Authorization"] = store.state.token }