🎨优化ui

This commit is contained in:
不做码农 2023-08-26 17:18:09 +08:00
parent e40da9d7cd
commit b2d7a3fc14
4 changed files with 70 additions and 65 deletions

View File

@ -1,4 +1,4 @@
.login { .login-wrap {
background: radial-gradient(220% 105% at top center, #1b2947 10%, #4b76a7 40%, #81acae 65%, #f7f7b6); background: radial-gradient(220% 105% at top center, #1b2947 10%, #4b76a7 40%, #81acae 65%, #f7f7b6);
background-attachment: fixed; background-attachment: fixed;
overflow: hidden; overflow: hidden;
@ -8,6 +8,14 @@
height: 100%; height: 100%;
// background-image: url('@/assets/images/login-bg.jpg'); // background-image: url('@/assets/images/login-bg.jpg');
background-size: cover; background-size: cover;
flex-direction: column;
.login {
margin: 0 auto;
background: #ffffff;
border-radius: 6px;
width: var(--base-login-width);
}
} }
.title { .title {
@ -17,13 +25,9 @@
} }
.login-form { .login-form {
border-radius: 6px;
background: #ffffff;
// background-color: hsla(0, 0%, 100%, 0.3);
width: var(--base-login-width);
height: 300px;
padding: 35px 15px 5px 15px; padding: 35px 15px 5px 15px;
position: relative; position: relative;
height: 300px;
.input-icon { .input-icon {
height: 39px; height: 39px;

View File

@ -19,7 +19,7 @@ $panGreen: #30b08f;
--base-tags-height: 34px; --base-tags-height: 34px;
--base-header-height: 50px; --base-header-height: 50px;
//登录框宽度 //登录框宽度
--base-login-width: 280px; --base-login-width: 320px;
} }
/***侧边栏深色配置***/ /***侧边栏深色配置***/

View File

@ -80,7 +80,7 @@ export default {
connection.on('welcome', (data) => { connection.on('welcome', (data) => {
ElNotification.info(data) ElNotification.info(data)
}) })
connection.on('getConnId', (data) => { connection.on('connId', (data) => {
// useUserStore().saveConnId(data) // useUserStore().saveConnId(data)
}) })
// 接收后台手动推送消息 // 接收后台手动推送消息

View File

@ -1,5 +1,6 @@
<template> <template>
<starBackground></starBackground> <starBackground></starBackground>
<div class="login-wrap">
<div class="login"> <div class="login">
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form" v-if="!showQrLogin"> <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form" v-if="!showQrLogin">
<h3 class="title">{{ defaultSettings.title }}</h3> <h3 class="title">{{ defaultSettings.title }}</h3>
@ -48,14 +49,7 @@
<span v-else> 中...</span> <span v-else> 中...</span>
</el-button> </el-button>
</el-form-item> </el-form-item>
<div class="other-login" v-if="defaultSettings.showOtherLogin">
<el-divider>{{ $t('login.otherLoginWay') }}</el-divider>
<span @click="onAuth('GITHUB')" title="github"><svg-icon name="github" className="login-icon"></svg-icon></span>
<span @click="onAuth('GITEE')" title="gitee"><svg-icon name="gitee" className="login-icon"></svg-icon></span>
</div>
</el-form> </el-form>
<div class="qr-wrap login-form" v-else> <div class="qr-wrap login-form" v-else>
<h3 class="title">移动端扫码登录</h3> <h3 class="title">移动端扫码登录</h3>
<div class="scan-wrap" @click="handleShowQrLogin()"> <div class="scan-wrap" @click="handleShowQrLogin()">
@ -68,6 +62,13 @@
</div> </div>
</div> </div>
<div class="other-login" v-if="defaultSettings.showOtherLogin">
<el-divider>{{ $t('login.otherLoginWay') }}</el-divider>
<span @click="onAuth('GITHUB')" title="github"><svg-icon name="github" className="login-icon"></svg-icon></span>
<span @click="onAuth('GITEE')" title="gitee"><svg-icon name="gitee" className="login-icon"></svg-icon></span>
</div>
</div>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<div v-html="defaultSettings.copyright"></div> <div v-html="defaultSettings.copyright"></div>
@ -222,7 +223,7 @@ function generateCode() {
} }
}) })
interval.value = setInterval(() => { interval.value = setInterval(() => {
verifyScan({ uuid: uuid }) verifyScan({ uuid: uuid, deviceId: visitorId })
.then((res) => { .then((res) => {
const { code, data } = res const { code, data } = res
if (data.status == -1) { if (data.status == -1) {