登录页

This commit is contained in:
2025-01-08 17:19:39 +08:00
parent a140df1d13
commit fc5f51495a
5 changed files with 21 additions and 22 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 KiB

+5
View File
@@ -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;
+11 -11
View File
@@ -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;
},
+5 -11
View File
@@ -4,19 +4,13 @@
'login-wrapper',
['', 'login-form-right', 'login-form-left'][direction]
]"
:style="{
backgroundImage: 'url(' + config?.loginBgImg + ')'
}"
>
<div class="logo-login" v-if="config?.siteName">
<div class="logo-login">
<img
:src="
config.sysLogo ||
'https://oss.wsdns.cn/20240822/0252ad4ed46449cdafe12f8d3d96c2ea.svg'
"
src="https://oss.wsdns.cn/20240822/0252ad4ed46449cdafe12f8d3d96c2ea.svg"
class="logo"
/>
<h4>{{ config.siteName }}</h4>
<h4>广西体育中心</h4>
</div>
<div class="company-name" v-if="config?.loginTitle"
>{{ config?.loginTitle }}
@@ -486,9 +480,10 @@
padding: 48px 16px 0 16px;
position: relative;
box-sizing: border-box;
background-image: url('@/assets/bg-2.jpeg');
background-image: url('@/assets/bg_bg.jpg');
background-color: var(--grey-5);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
min-height: 100vh;
@@ -499,7 +494,6 @@
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.2);
}
}