恢复用户列表功能
This commit is contained in:
@@ -10,7 +10,7 @@ import { API_BASE_URL, TOKEN_HEADER_NAME, LAYOUT_PATH } from '@/config/setting';
|
||||
import { getToken, setToken } from './token-util';
|
||||
import { logout } from './page-tab-util';
|
||||
import type { ApiResult } from '@/api';
|
||||
import { getTenantId } from '@/utils/domain';
|
||||
import { getHostname, getTenantId } from "@/utils/domain";
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: API_BASE_URL
|
||||
@@ -34,6 +34,10 @@ service.interceptors.request.use(
|
||||
if (companyId) {
|
||||
config.headers.common['CompanyId'] = companyId;
|
||||
}
|
||||
// 通过网站域名获取租户ID
|
||||
if (getHostname()){
|
||||
config.headers.common['Domain'] = getHostname();
|
||||
}
|
||||
// 解析二级域名获取租户ID
|
||||
if (getTenantId()) {
|
||||
config.headers.common['TenantId'] = getTenantId();
|
||||
|
||||
Reference in New Issue
Block a user