mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-27 14:57:08 +08:00
refactor: 登录页面,h5端排版更换
This commit is contained in:
BIN
src/assets/images/login_h5.jpg
Normal file
BIN
src/assets/images/login_h5.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<div class="login pc">
|
||||
<h3 class="login-logo">
|
||||
<img v-if="logo" :src="logo" alt="logo" />
|
||||
<img v-else src="/logo.svg" alt="logo" />
|
||||
@@ -15,8 +15,8 @@
|
||||
<a-col :xs="24" :sm="12" :md="11">
|
||||
<div class="login-right">
|
||||
<h3 class="login-right__title" v-if="isEmailLogin">邮箱登录</h3>
|
||||
<EmailLogin v-if="isEmailLogin" />
|
||||
<a-tabs v-else class="login-right__form" destroy-on-hide>
|
||||
<EmailLogin v-show="isEmailLogin" />
|
||||
<a-tabs v-show="!isEmailLogin" class="login-right__form">
|
||||
<a-tab-pane title="账号登录" key="1">
|
||||
<AccountLogin />
|
||||
</a-tab-pane>
|
||||
@@ -50,6 +50,42 @@
|
||||
<GiThemeBtn class="theme-btn" />
|
||||
<Background />
|
||||
</div>
|
||||
<div class="login h5">
|
||||
<div class="login-logo">
|
||||
<img v-if="logo" :src="logo" alt="logo" />
|
||||
<img v-else src="/logo.svg" alt="logo" />
|
||||
<span>{{ title }}</span>
|
||||
</div>
|
||||
<a-row align="stretch" class="login-box">
|
||||
<a-col :xs="24" :sm="12" :md="11">
|
||||
<div class="login-right">
|
||||
<h3 class="login-right__title" v-if="isEmailLogin">邮箱登录</h3>
|
||||
<EmailLogin v-show="isEmailLogin" />
|
||||
<a-tabs v-show="!isEmailLogin" class="login-right__form">
|
||||
<a-tab-pane title="账号登录" key="1">
|
||||
<AccountLogin />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane title="手机号登录" key="2">
|
||||
<PhoneLogin />
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div class="login-right__oauth">
|
||||
<a-divider orientation="center">其他登录方式</a-divider>
|
||||
<div class="list">
|
||||
<div v-if="isEmailLogin" class="mode item" @click="toggleLoginMode"><icon-user /> 账号/手机号登录</div>
|
||||
<div v-else class="mode item" @click="toggleLoginMode"><icon-email /> 邮箱登录</div>
|
||||
<a class="item" title="使用 Gitee 账号登录" @click="onOauth('gitee')">
|
||||
<GiSvgIcon name="gitee" :size="24" />
|
||||
</a>
|
||||
<a class="item" title="使用 GitHub 账号登录" @click="onOauth('github')">
|
||||
<GiSvgIcon name="github" :size="24" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -82,181 +118,350 @@ const onOauth = async (source: string) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: var(--color-bg-5);
|
||||
&-logo {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
left: 30px;
|
||||
z-index: 9999;
|
||||
color: var(--color-text-1);
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
line-height: 32px;
|
||||
margin-bottom: 20px;
|
||||
@media screen and (max-width: 570px) {
|
||||
.pc {
|
||||
display: none !important;
|
||||
background-color: white !important;
|
||||
}
|
||||
.login {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
&-box {
|
||||
width: 86%;
|
||||
max-width: 850px;
|
||||
height: 490px;
|
||||
display: flex;
|
||||
z-index: 999;
|
||||
box-shadow: 0 2px 4px 2px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
}
|
||||
|
||||
.login-left {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(60deg, rgb(var(--primary-6)), rgb(var(--primary-3)));
|
||||
&__img {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
transition: all 0.3s;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.login-right {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: var(--color-bg-1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 30px 30px 0;
|
||||
box-sizing: border-box;
|
||||
&__title {
|
||||
color: var(--color-text-1);
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
line-height: 32px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
&__form {
|
||||
:deep(.arco-tabs-nav-tab) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
:deep(.arco-tabs-tab) {
|
||||
color: var(--color-text-2);
|
||||
}
|
||||
:deep(.arco-tabs-tab-title) {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 22px;
|
||||
}
|
||||
:deep(.arco-tabs-content) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
:deep(.arco-tabs-tab-active),
|
||||
:deep(.arco-tabs-tab-title:hover) {
|
||||
color: rgb(var(--arcoblue-6));
|
||||
}
|
||||
:deep(.arco-tabs-nav::before) {
|
||||
display: none;
|
||||
}
|
||||
:deep(.arco-tabs-tab-title:before) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&__oauth {
|
||||
margin-top: auto;
|
||||
margin-bottom: 20px;
|
||||
:deep(.arco-divider-text) {
|
||||
color: var(--color-text-4);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
}
|
||||
.list {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-color: var(--color-bg-5);
|
||||
&-logo {
|
||||
width: 100%;
|
||||
.item {
|
||||
margin-right: 15px;
|
||||
height: 104px;
|
||||
display: flex;
|
||||
padding: 0px 20px;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
background-image: url('/src/assets/images/login_h5.jpg');
|
||||
background-size: 100% 100%;
|
||||
box-sizing: border-box;
|
||||
img {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.mode {
|
||||
}
|
||||
&-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
.login-right {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: var(--color-bg-1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 30px 30px 0;
|
||||
box-sizing: border-box;
|
||||
&__title {
|
||||
color: var(--color-text-1);
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
line-height: 32px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
&__form {
|
||||
:deep(.arco-tabs-nav-tab) {
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
}
|
||||
:deep(.arco-tabs-tab) {
|
||||
color: var(--color-text-2);
|
||||
margin-right: 20px;
|
||||
margin-top: 0px;
|
||||
margin-left: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
:deep(.arco-tabs-tab-title) {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 22px;
|
||||
}
|
||||
:deep(.arco-tabs-content) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
:deep(.arco-tabs-tab-active),
|
||||
:deep(.arco-tabs-tab-title:hover) {
|
||||
color: rgb(var(--arcoblue-6));
|
||||
}
|
||||
:deep(.arco-tabs-nav::before) {
|
||||
display: none;
|
||||
}
|
||||
:deep(.arco-tabs-tab-title:before) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&__oauth {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding-bottom: 20px;
|
||||
// margin-top: auto;
|
||||
// margin-bottom: 20px;
|
||||
:deep(.arco-divider-text) {
|
||||
color: var(--color-text-4);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
padding: 6px 10px;
|
||||
}
|
||||
.list {
|
||||
align-items: center;
|
||||
border: 1px solid var(--color-border-3);
|
||||
border-radius: 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
height: 32px;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
.icon {
|
||||
width: 21px;
|
||||
height: 20px;
|
||||
width: 100%;
|
||||
.item {
|
||||
margin-right: 15px;
|
||||
}
|
||||
.mode {
|
||||
color: var(--color-text-2);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
padding: 6px 10px;
|
||||
align-items: center;
|
||||
border: 1px solid var(--color-border-3);
|
||||
border-radius: 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
height: 32px;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
.icon {
|
||||
width: 21px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
.mode svg {
|
||||
font-size: 16px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.mode:hover,
|
||||
.mode svg:hover {
|
||||
background: rgba(var(--primary-6), 0.05);
|
||||
border: 1px solid rgb(var(--primary-3));
|
||||
color: rgb(var(--arcoblue-6));
|
||||
}
|
||||
}
|
||||
.mode svg {
|
||||
font-size: 16px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.theme-btn {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 30px;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.footer {
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
z-index: 999;
|
||||
.beian {
|
||||
.text {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.2px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.mode:hover,
|
||||
.mode svg:hover {
|
||||
background: rgba(var(--primary-6), 0.05);
|
||||
border: 1px solid rgb(var(--primary-3));
|
||||
color: rgb(var(--arcoblue-6));
|
||||
.below {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.theme-btn {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 30px;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.footer {
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
z-index: 999;
|
||||
.beian {
|
||||
.text {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.2px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.below {
|
||||
align-items: center;
|
||||
@media screen and (min-width: 571px) {
|
||||
.h5 {
|
||||
display: none !important;
|
||||
}
|
||||
.login {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: var(--color-bg-5);
|
||||
&-logo {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
left: 30px;
|
||||
z-index: 9999;
|
||||
color: var(--color-text-1);
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
line-height: 32px;
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
&-box {
|
||||
width: 86%;
|
||||
max-width: 850px;
|
||||
height: 490px;
|
||||
display: flex;
|
||||
z-index: 999;
|
||||
box-shadow: 0 2px 4px 2px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
}
|
||||
|
||||
.login-left {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(60deg, rgb(var(--primary-6)), rgb(var(--primary-3)));
|
||||
&__img {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
transition: all 0.3s;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.login-right {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: var(--color-bg-1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 30px 30px 0;
|
||||
box-sizing: border-box;
|
||||
&__title {
|
||||
color: var(--color-text-1);
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
line-height: 32px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
&__form {
|
||||
:deep(.arco-tabs-nav-tab) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
:deep(.arco-tabs-tab) {
|
||||
color: var(--color-text-2);
|
||||
}
|
||||
:deep(.arco-tabs-tab-title) {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 22px;
|
||||
}
|
||||
:deep(.arco-tabs-content) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
:deep(.arco-tabs-tab-active),
|
||||
:deep(.arco-tabs-tab-title:hover) {
|
||||
color: rgb(var(--arcoblue-6));
|
||||
}
|
||||
:deep(.arco-tabs-nav::before) {
|
||||
display: none;
|
||||
}
|
||||
:deep(.arco-tabs-tab-title:before) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&__oauth {
|
||||
margin-top: auto;
|
||||
margin-bottom: 20px;
|
||||
:deep(.arco-divider-text) {
|
||||
color: var(--color-text-4);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
}
|
||||
.list {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
.item {
|
||||
margin-right: 15px;
|
||||
}
|
||||
.mode {
|
||||
color: var(--color-text-2);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
padding: 6px 10px;
|
||||
align-items: center;
|
||||
border: 1px solid var(--color-border-3);
|
||||
border-radius: 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
height: 32px;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
.icon {
|
||||
width: 21px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
.mode svg {
|
||||
font-size: 16px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.mode:hover,
|
||||
.mode svg:hover {
|
||||
background: rgba(var(--primary-6), 0.05);
|
||||
border: 1px solid rgb(var(--primary-3));
|
||||
color: rgb(var(--arcoblue-6));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.theme-btn {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 30px;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.footer {
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
z-index: 999;
|
||||
.beian {
|
||||
.text {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.2px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.below {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user