qsh 3 days ago
parent 6ac19b825e
commit f7924d7cb1
  1. BIN
      src/assets/imgs/login2.gif
  2. BIN
      src/assets/imgs/shisong.jpg
  3. 84
      src/views/Login/Login.vue
  4. 7
      src/views/Login/components/LoginForm.vue

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

@ -1,17 +1,35 @@
<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) }}
</h2>
<!-- <img alt="" class="w-48px h-48px mr-10px" :src="appInfo.instanceIcon" /> -->
<!-- <span class="text-20px font-bold">{{ underlineToHump(appInfo.instanceName) }}</span> -->
</div> </div>
<!-- 右边的登录界面 -->
<Transition appear enter-active-class="animate__animated animate__bounceInRight">
<div
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-40px h-auto m-auto" />
<!-- 手机登录 -->
<!-- <MobileForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
<!-- 二维码登录 -->
<!-- <QrCodeForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
<!-- 注册 -->
<!-- <RegisterForm 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>
</Transition>
<!-- 左边的背景图 + 欢迎语 --> <!-- 左边的背景图 + 欢迎语 -->
<div class="flex justify-center"> <div class="flex justify-center">
<TransitionGroup <TransitionGroup
@ -19,8 +37,8 @@
enter-active-class="animate__animated animate__bounceInLeft" enter-active-class="animate__animated animate__bounceInLeft"
tag="div" tag="div"
> >
<img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" /> <!-- <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> --> <img key="1" alt="" class="w-[50%] m-auto" src="@/assets/imgs/login2.gif" />
</TransitionGroup> </TransitionGroup>
</div> </div>
@ -30,35 +48,20 @@
</transition-group> </transition-group>
</div> </div>
</div> </div>
<div class="flex-1 p-30px <sm:p-10px dark:bg-v-dark relative"> <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 justify-between items-center text-white @2xl:justify-end @xl:justify-end">
<div class="flex items-center @2xl:hidden @xl:hidden"> <div class="flex items-center @2xl:hidden @xl:hidden">
<img alt="" class="w-48px h-48px mr-10px" :src="appInfo.instanceIcon" /> <!-- <img alt="" class="w-48px h-48px mr-10px" :src="appInfo.instanceIcon" /> -->
<span class="text-20px font-bold">{{ underlineToHump(appInfo.instanceName) }}</span> <span class="text-20px font-bold text-black">
欢迎使用 {{ underlineToHump(appInfo.instanceName) }}
</span>
</div> </div>
<div class="flex justify-end items-center space-x-10px"> <div class="flex justify-end items-center space-x-10px">
<ThemeSwitch /> <ThemeSwitch />
<!-- <LocaleDropdown class="<xl:text-white dark:text-white" /> --> <!-- <LocaleDropdown class="<xl:text-white dark:text-white" /> -->
</div> </div>
</div> </div>
<!-- 右边的登录界面 -->
<Transition appear enter-active-class="animate__animated animate__bounceInRight">
<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"
>
<!-- 账号登录 -->
<LoginForm 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)" /> -->
<!-- 二维码登录 -->
<!-- <QrCodeForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
<!-- 注册 -->
<!-- <RegisterForm 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>
</Transition>
</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;

@ -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'

Loading…
Cancel
Save