登录页
This commit is contained in:
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 |
@@ -30,6 +30,11 @@ export function getOriginDomain(): string {
|
|||||||
* @return 10140
|
* @return 10140
|
||||||
*/
|
*/
|
||||||
export function getDomainPart1(): any {
|
export function getDomainPart1(): any {
|
||||||
|
const host = window.location.host;
|
||||||
|
console.log(host);
|
||||||
|
if (host === 'admin.gxtyzx.cn') {
|
||||||
|
return 10150;
|
||||||
|
}
|
||||||
const split = getHost();
|
const split = getHost();
|
||||||
if (split[0] == '127') {
|
if (split[0] == '127') {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
+11
-11
@@ -10,8 +10,8 @@ import { API_BASE_URL, TOKEN_HEADER_NAME, LAYOUT_PATH } from '@/config/setting';
|
|||||||
import { getToken, setToken } from './token-util';
|
import { getToken, setToken } from './token-util';
|
||||||
import { logout } from './page-tab-util';
|
import { logout } from './page-tab-util';
|
||||||
import type { ApiResult } from '@/api';
|
import type { ApiResult } from '@/api';
|
||||||
import { getHostname, getTenantId } from '@/utils/domain';
|
import { getHostname } from '@/utils/domain';
|
||||||
import { getMerchantId } from "@/utils/merchant";
|
import { getMerchantId } from '@/utils/merchant';
|
||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: API_BASE_URL
|
baseURL: API_BASE_URL
|
||||||
@@ -22,7 +22,6 @@ const service = axios.create({
|
|||||||
*/
|
*/
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
const TENANT_ID = localStorage.getItem('TenantId');
|
|
||||||
const token = getToken();
|
const token = getToken();
|
||||||
// 添加 token 到 header
|
// 添加 token 到 header
|
||||||
if (token && config.headers) {
|
if (token && config.headers) {
|
||||||
@@ -43,15 +42,16 @@ service.interceptors.request.use(
|
|||||||
if (getHostname()) {
|
if (getHostname()) {
|
||||||
config.headers.common['Domain'] = getHostname();
|
config.headers.common['Domain'] = getHostname();
|
||||||
}
|
}
|
||||||
|
config.headers.common['TenantId'] = 10150;
|
||||||
// 解析二级域名获取租户ID
|
// 解析二级域名获取租户ID
|
||||||
if (getTenantId()) {
|
// if (getTenantId()) {
|
||||||
config.headers.common['TenantId'] = getTenantId();
|
// config.headers.common['TenantId'] = getTenantId();
|
||||||
return config;
|
// return config;
|
||||||
}
|
// }
|
||||||
if (TENANT_ID) {
|
// if (TENANT_ID) {
|
||||||
config.headers.common['TenantId'] = TENANT_ID;
|
// config.headers.common['TenantId'] = TENANT_ID;
|
||||||
return config;
|
// return config;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,19 +4,13 @@
|
|||||||
'login-wrapper',
|
'login-wrapper',
|
||||||
['', 'login-form-right', 'login-form-left'][direction]
|
['', '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
|
<img
|
||||||
:src="
|
src="https://oss.wsdns.cn/20240822/0252ad4ed46449cdafe12f8d3d96c2ea.svg"
|
||||||
config.sysLogo ||
|
|
||||||
'https://oss.wsdns.cn/20240822/0252ad4ed46449cdafe12f8d3d96c2ea.svg'
|
|
||||||
"
|
|
||||||
class="logo"
|
class="logo"
|
||||||
/>
|
/>
|
||||||
<h4>{{ config.siteName }}</h4>
|
<h4>广西体育中心</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="company-name" v-if="config?.loginTitle"
|
<div class="company-name" v-if="config?.loginTitle"
|
||||||
>{{ config?.loginTitle }}
|
>{{ config?.loginTitle }}
|
||||||
@@ -486,9 +480,10 @@
|
|||||||
padding: 48px 16px 0 16px;
|
padding: 48px 16px 0 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-image: url('@/assets/bg-2.jpeg');
|
background-image: url('@/assets/bg_bg.jpg');
|
||||||
background-color: var(--grey-5);
|
background-color: var(--grey-5);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|
||||||
@@ -499,7 +494,6 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user