From a660c24128041c273bbd8b039592d1dff6042dc8 Mon Sep 17 00:00:00 2001 From: wx-jincw Date: Sat, 28 Mar 2026 11:29:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/request.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/utils/request.js b/app/utils/request.js index c488ede..41ebac9 100644 --- a/app/utils/request.js +++ b/app/utils/request.js @@ -98,8 +98,11 @@ request.uploadFile = (filePath, name = 'file', formData = {}, options = {}) => { uid: store.state.app.uid, ...(options.params || {}) } - if (queryObj) { - uploadUrl += '?' + new URLSearchParams(queryObj).toString(); + if (Object.keys(queryObj).length > 0) { + const queryString = Object.entries(queryObj) + .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`) + .join('&'); + uploadUrl += '?' + queryString; } // 添加token,