This commit is contained in:
qsh
2025-01-16 16:06:24 +08:00
parent 6ac19b825e
commit f7924d7cb1
4 changed files with 65 additions and 46 deletions

BIN
src/assets/imgs/login2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

BIN
src/assets/imgs/shisong.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

View File

@@ -1,54 +1,25 @@
<template> <template>
<div <div
:class="prefixCls" :class="prefixCls"
class="h-[100%] relative <xl:bg-v-dark <sm:px-10px <xl:px-10px <md:px-10px" class="h-[100%] relative dark:bg-v-dark <sm:px-10px <xl:px-10px <md:px-10px"
> >
<div class="relative h-full flex mx-auto"> <div class="relative h-full flex mx-auto">
<div <div :class="`${prefixCls}__left w-600px left-box relative p-30px`">
:class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px <xl:hidden`"
>
<!-- 左上角的 logo + 系统标题 --> <!-- 左上角的 logo + 系统标题 -->
<div class="flex items-center relative text-white"> <div class="flex items-center relative">
<img alt="" class="w-48px h-48px mr-10px" :src="appInfo.instanceIcon" /> <h2 class="mb-3 text-2xl font-bold">
<span class="text-20px font-bold">{{ underlineToHump(appInfo.instanceName) }}</span> 欢迎使用 {{ underlineToHump(appInfo.instanceName) }}
</div> </h2>
<!-- 左边的背景图 + 欢迎语 --> <!-- <img alt="" class="w-48px h-48px mr-10px" :src="appInfo.instanceIcon" /> -->
<div class="flex justify-center"> <!-- <span class="text-20px font-bold">{{ underlineToHump(appInfo.instanceName) }}</span> -->
<TransitionGroup
appear
enter-active-class="animate__animated animate__bounceInLeft"
tag="div"
>
<img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" />
<!-- <div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div> -->
</TransitionGroup>
</div>
<div class="landIn">
<transition-group name="text-animation">
<span v-for="(char, index) in chars" :key="index">{{ char }}</span>
</transition-group>
</div>
</div>
<div class="flex-1 p-30px <sm:p-10px dark:bg-v-dark relative">
<!-- 右上角的主题语言选择 -->
<div class="flex justify-between items-center text-white @2xl:justify-end @xl:justify-end">
<div class="flex items-center @2xl:hidden @xl:hidden">
<img alt="" class="w-48px h-48px mr-10px" :src="appInfo.instanceIcon" />
<span class="text-20px font-bold">{{ underlineToHump(appInfo.instanceName) }}</span>
</div>
<div class="flex justify-end items-center space-x-10px">
<ThemeSwitch />
<!-- <LocaleDropdown class="<xl:text-white dark:text-white" /> -->
</div>
</div> </div>
<!-- 右边的登录界面 --> <!-- 右边的登录界面 -->
<Transition appear enter-active-class="animate__animated animate__bounceInRight"> <Transition appear enter-active-class="animate__animated animate__bounceInRight">
<div <div
class="h-full flex items-center m-auto w-[100%] @2xl:max-w-500px @xl:max-w-500px @md:max-w-500px @lg:max-w-500px" class="flex items-center m-auto w-[100%] @2xl:max-w-500px @xl:max-w-500px @md:max-w-500px @lg:max-w-500px <xl:mt-20px"
> >
<!-- 账号登录 --> <!-- 账号登录 -->
<LoginForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> <LoginForm class="p-40px h-auto m-auto" />
<!-- 手机登录 --> <!-- 手机登录 -->
<!-- <MobileForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> --> <!-- <MobileForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
<!-- 二维码登录 --> <!-- 二维码登录 -->
@@ -59,6 +30,38 @@
<!-- <SSOLoginVue class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> --> <!-- <SSOLoginVue class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
</div> </div>
</Transition> </Transition>
<!-- 左边的背景图 + 欢迎语 -->
<div class="flex justify-center">
<TransitionGroup
appear
enter-active-class="animate__animated animate__bounceInLeft"
tag="div"
>
<!-- <img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" /> -->
<img key="1" alt="" class="w-[50%] m-auto" src="@/assets/imgs/login2.gif" />
</TransitionGroup>
</div>
<div class="landIn">
<transition-group name="text-animation">
<span v-for="(char, index) in chars" :key="index">{{ char }}</span>
</transition-group>
</div>
</div>
<div class="login-box flex-1 p-30px <sm:p-10px dark:bg-v-dark <xl:hidden relative">
<!-- 右上角的主题语言选择 -->
<div class="flex justify-between items-center text-white @2xl:justify-end @xl:justify-end">
<div class="flex items-center @2xl:hidden @xl:hidden">
<!-- <img alt="" class="w-48px h-48px mr-10px" :src="appInfo.instanceIcon" /> -->
<span class="text-20px font-bold text-black">
欢迎使用 {{ underlineToHump(appInfo.instanceName) }}
</span>
</div>
<div class="flex justify-end items-center space-x-10px">
<ThemeSwitch />
<!-- <LocaleDropdown class="<xl:text-white dark:text-white" /> -->
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -96,7 +99,7 @@ const chars = computed(() => {
return text.slice(0, currentCharIndex.value) return text.slice(0, currentCharIndex.value)
}) })
async function init() { function init() {
const res = currentRoute.value?.query?.tenantId const res = currentRoute.value?.query?.tenantId
authUtil.setTenantId(res) authUtil.setTenantId(res)
@@ -137,7 +140,7 @@ $prefix-cls: #{$namespace}-login;
z-index: -1; z-index: -1;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/svgs/login-bg.svg'); // background-image: url('@/assets/svgs/login-bg.svg');
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
content: ''; content: '';
@@ -145,6 +148,20 @@ $prefix-cls: #{$namespace}-login;
} }
} }
// .left-box {
// background: #f3f4fb;
// background-image: url('@/assets/imgs/login-left-bg.png');
// background-repeat: no-repeat;
// background-size: 100% 100%;
// }
.login-box {
background-image: url('@/assets/imgs/shisong.jpg');
background-position: center center;
background-repeat: no-repeat;
background-size: 80% 80%;
}
.text-animation-enter-active, .text-animation-enter-active,
.text-animation-leave-active { .text-animation-leave-active {
transition: opacity 0.5s; transition: opacity 0.5s;
@@ -160,12 +177,11 @@ $prefix-cls: #{$namespace}-login;
width: 80%; width: 80%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
font-size: 18px; font-size: 1rem;
line-height: 1.8; line-height: 1.3;
font-family: Lora, serif; font-family: Lora, serif;
white-space: pre; white-space: pre;
font-weight: 600; font-weight: 600;
color: #6ee1f5;
span { span {
animation: landIn 0.8s ease-out both; animation: landIn 0.8s ease-out both;

View File

@@ -11,10 +11,13 @@
> >
<el-row style="margin-left: -10px; margin-right: -10px"> <el-row style="margin-left: -10px; margin-right: -10px">
<el-col :span="24" style="padding-left: 10px; padding-right: 10px"> <el-col :span="24" style="padding-left: 10px; padding-right: 10px">
<slot name="title"></slot>
</el-col>
<!-- <el-col :span="24" style="padding-left: 10px; padding-right: 10px">
<el-form-item> <el-form-item>
<LoginFormTitle style="width: 100%" /> <LoginFormTitle style="width: 100%" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="24" style="padding-left: 10px; padding-right: 10px"> <el-col :span="24" style="padding-left: 10px; padding-right: 10px">
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantId"> <el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantId">
<el-input <el-input
@@ -107,7 +110,7 @@
</template> </template>
<script name="LoginForm" setup> <script name="LoginForm" setup>
import { ElLoading } from 'element-plus' import { ElLoading } from 'element-plus'
import LoginFormTitle from './LoginFormTitle.vue' // import LoginFormTitle from './LoginFormTitle.vue'
import { useIcon } from '@/hooks/web/useIcon' import { useIcon } from '@/hooks/web/useIcon'