登录页面修改

This commit is contained in:
shilixia 2021-03-23 09:09:00 +08:00
parent 5069df82e9
commit 664bc9aada
3 changed files with 71 additions and 119 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
client/src/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 KiB

View File

@ -1,10 +1,17 @@
<template>
<div class="login-container">
<div class="login-form">
<div class="title-container">
<h3 class="title">国检集团检验检测能力共享平台</h3>
</div>
<el-tabs v-model="activeName" :stretch="true">
<div class="login">
<div class="login-form">
<img class="logo" src="../../assets/logo.png">
<h3 class="title">检验检测能力共享和质量管理平台</h3>
<el-tabs v-model="activeName" :stretch="true" >
<el-tab-pane label="验证码登录" name="msg">
<el-form
ref="loginForm2"
@ -13,10 +20,8 @@
auto-complete="on"
label-position="left"
>
<el-form-item prop="mail">
<span class="svg-container">
<svg-icon icon-class="email" />
</span>
<el-input
ref="mail"
v-model="loginForm2.mail"
@ -25,13 +30,11 @@
type="text"
tabindex="1"
auto-complete="on"
/>
> <svg-icon slot="prefix" icon-class="email" class="el-input__icon input-icon" /></el-input>
</el-form-item>
<el-form-item prop="msg">
<span class="svg-container">
<svg-icon icon-class="message" />
</span>
<el-input
ref="msg"
v-model="loginForm2.msg"
@ -41,13 +44,14 @@
tabindex="2"
auto-complete="on"
@keyup.enter.native="handleLogin"
/>
<span class="show-pwd" @click="sendMsg" style="color:white">
> <svg-icon slot="prefix" icon-class="message" class="el-input__icon input-icon" /></el-input>
<span class="show-pwd" @click="sendMsg" style="color:black">
<template>{{buttonmsg}}</template>
<!-- <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" /> -->
</span>
</el-form-item>
<el-button
:loading="loading2"
@ -68,9 +72,7 @@
label-position="left"
>
<el-form-item prop="username">
<span class="svg-container">
<svg-icon icon-class="user" />
</span>
<el-input
ref="username"
v-model="loginForm.username"
@ -79,13 +81,11 @@
type="text"
tabindex="1"
auto-complete="on"
/>
><svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /></el-input>
</el-form-item>
<el-form-item prop="password">
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
<el-input
:key="passwordType"
ref="password"
@ -96,7 +96,7 @@
tabindex="2"
auto-complete="on"
@keyup.enter.native="handleLogin"
/>
><svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /></el-input>
<span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
</span>
@ -284,118 +284,70 @@ export default {
</script>
<style lang="scss">
/* 修复input 背景不协调 和光标变色 */
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
$bg: #283443;
$light_gray: #fff;
$cursor: #fff;
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
.login-container .el-input input {
color: $cursor;
}
.login {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
background-image: url("../../assets/beijing.jpg");
background-size: cover;
}
.title {
margin: 30px auto 30px auto;
text-align: center;
color: #0174d7;
}
.logo{
width:350px;
height:93px;
}
/* reset element-ui css */
.login-container {
.login-form {
border-radius: 6px;
background: #ffffff;
width: 400px;
padding: 25px 25px 5px 25px;
.el-input {
display: inline-block;
height: 47px;
width: 85%;
height: 45px;
input {
background: transparent;
border: 0px;
-webkit-appearance: none;
border-radius: 0px;
padding: 12px 5px 12px 15px;
color: $light_gray;
height: 47px;
caret-color: $cursor;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: $cursor !important;
}
height: 45px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1);
border-radius: 5px;
color: #454545;
.show-pwd {
height: 39px;
margin-right: 2px;
}
.el-tabs__item {
color: #fff;
}
.el-tabs__item.is-active {
color: #409eff;
.login-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.login-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
</style>
<style lang="scss" scoped>
$bg: #2d3a4b;
$dark_gray: #889aa4;
$light_gray: #eee;
.login-container {
min-height: 100%;
width: 100%;
background-color: $bg;
overflow: hidden;
.login-form {
position: relative;
width: 520px;
max-width: 100%;
padding: 160px 35px 0;
margin: 0 auto;
overflow: hidden;
}
.tips {
font-size: 14px;
color: #fff;
margin-bottom: 10px;
span {
&:first-of-type {
margin-right: 16px;
}
}
}
.svg-container {
padding: 6px 5px 6px 15px;
color: $dark_gray;
vertical-align: middle;
width: 30px;
display: inline-block;
}
.title-container {
position: relative;
.title {
font-size: 26px;
color: $light_gray;
margin: 0px auto 40px auto;
text-align: center;
font-weight: bold;
}
}
.show-pwd {
.show-pwd {
position: absolute;
right: 10px;
top: 7px;
font-size: 16px;
color: $dark_gray;
cursor: pointer;
user-select: none;
}
.login-code-img {
height: 38px;
}
</style>