From 0c334ff4d69c3c5aff3bb08a6f11a217b092d9f3 Mon Sep 17 00:00:00 2001 From: linr <1101734174@qq.com> Date: Wed, 2 Aug 2023 16:55:28 +0800 Subject: [PATCH] =?UTF-8?q?request=E6=94=AF=E6=8C=81=E4=BC=A0=E9=80=92axio?= =?UTF-8?q?s=E5=8E=9F=E7=94=9F=E5=8F=82=E6=95=B0=EF=BC=8C=E4=BE=8B?= =?UTF-8?q?=E5=A6=82=E8=B6=85=E6=97=B6=EF=BC=9Arequest(method:'GET',url:''?= =?UTF-8?q?,timeout:1000)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/axios/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/axios/index.ts b/src/config/axios/index.ts index e6c6af8d..79e558da 100644 --- a/src/config/axios/index.ts +++ b/src/config/axios/index.ts @@ -5,12 +5,13 @@ import { config } from './config' const { default_headers } = config const request = (option: any) => { - const { url, method, params, data, headersType, responseType } = option + const { url, method, params, data, headersType, responseType, ...config } = option return service({ url: url, method, params, data, + ...config, responseType: responseType, headers: { 'Content-Type': headersType || default_headers