diff --git a/public/favicon.ico b/public/favicon.ico index 56625ef..757f71b 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/assets/bg_bg.jpg b/src/assets/bg_bg.jpg new file mode 100644 index 0000000..6d4ae88 Binary files /dev/null and b/src/assets/bg_bg.jpg differ diff --git a/src/utils/domain.ts b/src/utils/domain.ts index d1f53b2..291b7d4 100644 --- a/src/utils/domain.ts +++ b/src/utils/domain.ts @@ -30,6 +30,11 @@ export function getOriginDomain(): string { * @return 10140 */ export function getDomainPart1(): any { + const host = window.location.host; + console.log(host); + if (host === 'admin.gxtyzx.cn') { + return 10150; + } const split = getHost(); if (split[0] == '127') { return undefined; diff --git a/src/utils/request.ts b/src/utils/request.ts index 2edae00..fb57393 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -10,8 +10,8 @@ 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 { getHostname, getTenantId } from '@/utils/domain'; -import { getMerchantId } from "@/utils/merchant"; +import { getHostname } from '@/utils/domain'; +import { getMerchantId } from '@/utils/merchant'; const service = axios.create({ baseURL: API_BASE_URL @@ -22,7 +22,6 @@ const service = axios.create({ */ service.interceptors.request.use( (config) => { - const TENANT_ID = localStorage.getItem('TenantId'); const token = getToken(); // 添加 token 到 header if (token && config.headers) { @@ -43,15 +42,16 @@ service.interceptors.request.use( if (getHostname()) { config.headers.common['Domain'] = getHostname(); } + config.headers.common['TenantId'] = 10150; // 解析二级域名获取租户ID - if (getTenantId()) { - config.headers.common['TenantId'] = getTenantId(); - return config; - } - if (TENANT_ID) { - config.headers.common['TenantId'] = TENANT_ID; - return config; - } + // if (getTenantId()) { + // config.headers.common['TenantId'] = getTenantId(); + // return config; + // } + // if (TENANT_ID) { + // config.headers.common['TenantId'] = TENANT_ID; + // return config; + // } } return config; }, diff --git a/src/views/passport/login/index.vue b/src/views/passport/login/index.vue index aea9ded..f6a6d60 100644 --- a/src/views/passport/login/index.vue +++ b/src/views/passport/login/index.vue @@ -4,19 +4,13 @@ 'login-wrapper', ['', 'login-form-right', 'login-form-left'][direction] ]" - :style="{ - backgroundImage: 'url(' + config?.loginBgImg + ')' - }" > -