From 1e83ca75da7615842e3983730c44e0d506dbd5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Wed, 2 Aug 2023 16:04:03 +0800 Subject: [PATCH] =?UTF-8?q?CN-1198:=20=E7=99=BB=E5=BD=95=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E7=99=BB=E5=BD=95=E5=90=8E=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/http.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/utils/http.js b/src/utils/http.js index 02b4988a..39a8e599 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -13,6 +13,17 @@ axios.interceptors.request.use(config => { arr.push(c) store.commit('setHttpCancel', arr) }) + // 登录超时,将参数q的+变为空格 + if (config.params && config.params.q && config.params.q.length > 0) { + let q = config.params.q + if (q.indexOf('+') > -1) { + for (let i = 0; i < q.length; i++) { + if (q[i] === '+') { + q = q.replace('+', ' ') + } + } + } + } config.cancelToken = cancelToken if (token) {