From ef8c4b45c0deeedbf1f396a9291e558037d6ca62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Mon, 7 Aug 2023 11:40:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AE=80=E5=8C=96=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=97=B6=EF=BC=8C=E5=85=A5=E5=8F=82=E5=8C=85?= =?UTF-8?q?=E5=90=AB+=E5=8F=B7=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/http.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/utils/http.js b/src/utils/http.js index db8860cb..5f588c46 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -17,11 +17,7 @@ axios.interceptors.request.use(config => { 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('+', ' ') - } - } + q = q.replace(/\+/g, ' ') } config.params.q = q }