feat: 增加多租户Id配置。
parent
6550441bc9
commit
d849859c2d
3
.env
3
.env
|
|
@ -19,3 +19,6 @@ SHOPRO_STATIC_URL = https://file.sheepjs.com
|
|||
|
||||
# 是否开启直播 1 开启直播 | 0 关闭直播 (小程序官方后台未审核开通直播权限时请勿开启)
|
||||
SHOPRO_MPLIVE_ON = 0
|
||||
|
||||
# 多租户配置
|
||||
TENANT_ID = 162
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import { baseUrl, apiPath } from '@/sheep/config';
|
||||
import { apiPath, baseUrl } from '@/sheep/config';
|
||||
|
||||
const tenantId = import.meta.env.TENANT_ID;
|
||||
|
||||
const FileApi = {
|
||||
// 上传文件
|
||||
|
|
@ -15,8 +17,8 @@ const FileApi = {
|
|||
name: 'file',
|
||||
header: {
|
||||
// Accept: 'text/json',
|
||||
Accept : '*/*',
|
||||
'tenant-id' :'1',
|
||||
Accept: '*/*',
|
||||
'tenant-id': tenantId,
|
||||
// Authorization: 'Bearer test247',
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ import {
|
|||
} from '@/sheep/hooks/useModal';
|
||||
import AuthUtil from '@/sheep/api/member/auth';
|
||||
|
||||
const tenantId = import.meta.env.TENANT_ID;
|
||||
|
||||
const options = {
|
||||
// 显示操作成功消息 默认不显示
|
||||
showSuccess: false,
|
||||
|
|
@ -97,8 +99,8 @@ http.interceptors.request.use(
|
|||
}
|
||||
// TODO 芋艿:特殊处理
|
||||
config.header['Accept'] = '*/*'
|
||||
config.header['tenant-id'] = '1';
|
||||
config.header['terminal'] = '20';
|
||||
config.header['tenant-id'] = tenantId;
|
||||
config.header['terminal'] = '10';
|
||||
// config.header['Authorization'] = 'Bearer test247';
|
||||
return config;
|
||||
},
|
||||
|
|
@ -299,4 +301,4 @@ const request = (config) => {
|
|||
return http.middleware(config);
|
||||
};
|
||||
|
||||
export default request;
|
||||
export default request;
|
||||
|
|
|
|||
Loading…
Reference in New Issue