feat: 增加租户ID自定义配置支持

This commit is contained in:
downeyin
2024-07-26 00:11:07 +08:00
parent 3d7f63868f
commit 20f937a4ed
4 changed files with 14 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
*/
import Request from 'luch-request';
import { baseUrl, apiPath } from '@/sheep/config';
import { baseUrl, apiPath, tenantId } from '@/sheep/config';
import $store from '@/sheep/store';
import $platform from '@/sheep/platform';
import {
@@ -96,8 +96,8 @@ http.interceptors.request.use(
config.header['Authorization'] = token;
}
// TODO 芋艿:特殊处理
config.header['Accept'] = '*/*'
config.header['tenant-id'] = '1';
config.header['Accept'] = '*/*';
config.header['tenant-id'] = tenantId;
config.header['terminal'] = '20';
// config.header['Authorization'] = 'Bearer test247';
return config;
@@ -299,4 +299,4 @@ const request = (config) => {
return http.middleware(config);
};
export default request;
export default request;