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; },