From 069279c4e08425e0d77ab71aaba0f6aaa40a530d Mon Sep 17 00:00:00 2001 From: lbw Date: Sun, 8 Oct 2023 01:28:34 +0000 Subject: [PATCH] =?UTF-8?q?ref=EF=BC=9A=20AxiosInstance=20paramsSerializer?= =?UTF-8?q?=20repeat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lbw --- src/utils/request.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index 66c2c983..227e625d 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -10,9 +10,11 @@ import other from './other'; const service: AxiosInstance = axios.create({ baseURL: import.meta.env.VITE_API_URL, timeout: 50000, // 全局超时时间 - paramsSerializer: (params: any) => { - return qs.stringify(params, { arrayFormat: 'repeat' }); - } + paramsSerializer: { + serialize: (params: any) => { + return qs.stringify(params, {arrayFormat: 'repeat'}); + } + } }); /**