|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="login">
|
|
|
|
|
|
|
+ <div class="login" :style="loginBackgroundStyle">
|
|
|
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
|
|
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
|
|
|
<div class="title-box">
|
|
<div class="title-box">
|
|
|
<h3 class="title">{{ title }}</h3>
|
|
<h3 class="title">{{ title }}</h3>
|
|
@@ -82,6 +82,7 @@
|
|
|
import { getCodeImg, getTenantList } from '@/api/login';
|
|
import { getCodeImg, getTenantList } from '@/api/login';
|
|
|
import { authRouterUrl } from '@/api/system/social/auth';
|
|
import { authRouterUrl } from '@/api/system/social/auth';
|
|
|
import { useUserStore } from '@/store/modules/user';
|
|
import { useUserStore } from '@/store/modules/user';
|
|
|
|
|
+import { useWebsiteStore } from '@/store/modules/website';
|
|
|
import { LoginData, TenantVO } from '@/api/types';
|
|
import { LoginData, TenantVO } from '@/api/types';
|
|
|
import { to } from 'await-to-js';
|
|
import { to } from 'await-to-js';
|
|
|
import { HttpStatus } from '@/enums/RespEnum';
|
|
import { HttpStatus } from '@/enums/RespEnum';
|
|
@@ -89,11 +90,23 @@ import { useI18n } from 'vue-i18n';
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
|
|
-const title = import.meta.env.VITE_APP_TITLE;
|
|
|
|
|
|
|
+const websiteStore = useWebsiteStore();
|
|
|
|
|
+const title = computed(() => websiteStore.websiteConfig.loginTitle || import.meta.env.VITE_APP_TITLE);
|
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
|
|
|
|
|
|
|
+const loginBackgroundStyle = computed(() => {
|
|
|
|
|
+ const url = websiteStore.websiteConfig.loginBackgroundUrl;
|
|
|
|
|
+ if (url) {
|
|
|
|
|
+ return {
|
|
|
|
|
+ backgroundImage: `url(${url})`,
|
|
|
|
|
+ backgroundSize: 'cover'
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+ return {};
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
const loginForm = ref<LoginData>({
|
|
const loginForm = ref<LoginData>({
|
|
|
platformId: 1,
|
|
platformId: 1,
|
|
|
tenantId: '000000',
|
|
tenantId: '000000',
|