From 98756790af741c103e714d33702ab28d2468c452 Mon Sep 17 00:00:00 2001 From: John <377342263@qq.com> Date: Mon, 20 May 2024 00:46:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/000000.ts | 2 +- src/config/index.ts | 2 +- src/utils/http/axios/index.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/000000.ts b/src/config/000000.ts index 4e9ce1b..4341a48 100644 --- a/src/config/000000.ts +++ b/src/config/000000.ts @@ -2,5 +2,5 @@ import { Config } from '@/config/index'; export const config: Config = { tenantId: '000000', - apiUrl: 'http://124.222.254.188:8889/' + apiUrl: 'http://124.222.254.188:8889' } \ No newline at end of file diff --git a/src/config/index.ts b/src/config/index.ts index d9894d3..17ba2e5 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -10,7 +10,7 @@ export const getConfig = (): Config => { // 配置文件 const t_000000: Config = { tenantId: '000000', - apiUrl: 'http://124.222.254.188:8889/' + apiUrl: 'http://124.222.254.188:8889' } diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index bc3fd21..4af8c0f 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -203,9 +203,9 @@ const transform: AxiosTransform = { headers['Tenant-ID'] = tenantConfig.tenantId if (token && (config as Recordable)?.requestOptions?.withToken !== false) { // jwt token - headers.Authorization = options.authenticationScheme + headers.Authorization = 'Bearer ' + (options.authenticationScheme ? `${options.authenticationScheme} ${token}` - : token; + : token); } return config; },