修复已知问题
This commit is contained in:
@@ -11,6 +11,7 @@ import { getToken, setToken } from './token-util';
|
||||
import { logout } from './page-tab-util';
|
||||
import type { ApiResult } from '@/api';
|
||||
import { getHostname, getTenantId } from '@/utils/domain';
|
||||
import { getMerchantId } from "@/utils/merchant";
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: API_BASE_URL
|
||||
@@ -34,6 +35,10 @@ service.interceptors.request.use(
|
||||
if (companyId) {
|
||||
config.headers.common['CompanyId'] = companyId;
|
||||
}
|
||||
// 附加商户ID
|
||||
if (getMerchantId()) {
|
||||
config.headers.common['MerchantId'] = getMerchantId();
|
||||
}
|
||||
// 通过网站域名获取租户ID
|
||||
if (getHostname()) {
|
||||
config.headers.common['Domain'] = getHostname();
|
||||
|
||||
Reference in New Issue
Block a user