配置文件

This commit is contained in:
John
2024-05-20 00:46:54 +08:00
parent 55f495f930
commit 98756790af
3 changed files with 4 additions and 4 deletions

View File

@@ -2,5 +2,5 @@ import { Config } from '@/config/index';
export const config: Config = { export const config: Config = {
tenantId: '000000', tenantId: '000000',
apiUrl: 'http://124.222.254.188:8889/' apiUrl: 'http://124.222.254.188:8889'
} }

View File

@@ -10,7 +10,7 @@ export const getConfig = (): Config => {
// 配置文件 // 配置文件
const t_000000: Config = { const t_000000: Config = {
tenantId: '000000', tenantId: '000000',
apiUrl: 'http://124.222.254.188:8889/' apiUrl: 'http://124.222.254.188:8889'
} }

View File

@@ -203,9 +203,9 @@ const transform: AxiosTransform = {
headers['Tenant-ID'] = tenantConfig.tenantId headers['Tenant-ID'] = tenantConfig.tenantId
if (token && (config as Recordable)?.requestOptions?.withToken !== false) { if (token && (config as Recordable)?.requestOptions?.withToken !== false) {
// jwt token // jwt token
headers.Authorization = options.authenticationScheme headers.Authorization = 'Bearer ' + (options.authenticationScheme
? `${options.authenticationScheme} ${token}` ? `${options.authenticationScheme} ${token}`
: token; : token);
} }
return config; return config;
}, },