登录页修改
This commit is contained in:
parent
81b1f057b2
commit
7d1edd7639
Binary file not shown.
|
Before Width: | Height: | Size: 441 KiB After Width: | Height: | Size: 1.0 MiB |
|
|
@ -1,62 +1,68 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<div class="login-container">
|
||||||
<h3 class="title">欢迎登录</h3>
|
<div class="login-header">
|
||||||
<h3 class="title">{{title}}</h3>
|
<h1 class="main-title">
|
||||||
<el-form-item prop="username">
|
<img src="../assets/logo/logo.png" alt="logo" class="logo"/>
|
||||||
<el-input
|
<span>智能投标系统</span>
|
||||||
v-model="loginForm.username"
|
</h1>
|
||||||
type="text"
|
<h2 class="sub-title">欢迎登录 welcome to login in</h2>
|
||||||
auto-complete="off"
|
</div>
|
||||||
placeholder="账号"
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
>
|
<el-form-item prop="username">
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="password">
|
|
||||||
<el-input
|
|
||||||
v-model="loginForm.password"
|
|
||||||
type="password"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="密码"
|
|
||||||
@keyup.enter.native="handleLogin"
|
|
||||||
>
|
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="code" v-if="captchaEnabled">
|
|
||||||
<div class="code-wrapper">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.code"
|
v-model="loginForm.username"
|
||||||
|
type="text"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="验证码"
|
placeholder="请输入用户名"
|
||||||
|
>
|
||||||
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password">
|
||||||
|
<el-input
|
||||||
|
v-model="loginForm.password"
|
||||||
|
type="password"
|
||||||
|
auto-complete="off"
|
||||||
|
placeholder="请输入登录密码"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
</el-form-item>
|
||||||
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
<el-form-item prop="code" v-if="captchaEnabled">
|
||||||
|
<div class="code-wrapper">
|
||||||
|
<el-input
|
||||||
|
v-model="loginForm.code"
|
||||||
|
auto-complete="off"
|
||||||
|
placeholder="验证码"
|
||||||
|
@keyup.enter.native="handleLogin"
|
||||||
|
>
|
||||||
|
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||||
|
</el-input>
|
||||||
|
<div class="login-code">
|
||||||
|
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<div class="form-options">
|
||||||
|
<el-checkbox v-model="loginForm.rememberMe">记住密码</el-checkbox>
|
||||||
|
<a href="#" class="forgot-password">忘记密码?</a>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
<el-form-item style="width:100%;">
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
<el-button
|
||||||
<el-form-item style="width:100%;">
|
:loading="loading"
|
||||||
<el-button
|
size="medium"
|
||||||
:loading="loading"
|
type="primary"
|
||||||
size="medium"
|
style="width:100%;"
|
||||||
type="primary"
|
@click.native.prevent="handleLogin"
|
||||||
style="width:100%;"
|
>
|
||||||
@click.native.prevent="handleLogin"
|
<span v-if="!loading">登录</span>
|
||||||
>
|
<span v-else>登 录 中...</span>
|
||||||
<span v-if="!loading">登 录</span>
|
</el-button>
|
||||||
<span v-else>登 录 中...</span>
|
</el-form-item>
|
||||||
</el-button>
|
</el-form>
|
||||||
<!-- <div style="float: right;" v-if="register">
|
</div>
|
||||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
|
||||||
</div> -->
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -165,12 +171,12 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100vh;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
background-image: url("../assets/images/login-background.jpg");
|
background-image: url("../assets/images/login-background.jpg");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: left center;
|
background-position: center center;
|
||||||
background-size: contain;
|
// background-size: contain;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
|
|
@ -180,73 +186,74 @@ export default {
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
// background: linear-gradient(135deg, rgba(0, 110, 107, 0.1) 0%, rgba(0, 110, 107, 0.05) 100%);
|
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.login-container {
|
||||||
margin: 0px auto 20px auto;
|
width: 100%;
|
||||||
font-weight: bold;
|
max-width: 480px;
|
||||||
text-align: left;
|
padding: 0 20px;
|
||||||
color: #060F2E;
|
|
||||||
font-size: 28px;
|
|
||||||
text-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
||||||
position: relative;
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-header {
|
||||||
border-radius: 12px;
|
text-align: center;
|
||||||
background: #ffffff;
|
margin-bottom: 40px;
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
width: 600px;
|
|
||||||
padding: 40px 30px 30px 30px;
|
|
||||||
z-index: 1;
|
|
||||||
margin-left: 58%;
|
|
||||||
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
|
|
||||||
border: 1px solid rgba(0, 110, 107, 0.1);
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&::before {
|
.main-title {
|
||||||
content: '';
|
font-size: 32px;
|
||||||
position: absolute;
|
font-weight: 700;
|
||||||
top: 0;
|
color: #060F2E;
|
||||||
left: 0;
|
margin-bottom: 12px;
|
||||||
right: 0;
|
letter-spacing: 1px;
|
||||||
height: 4px;
|
|
||||||
background: linear-gradient(90deg, #0A57E7 0%, #1E6BFF 100%);
|
|
||||||
border-radius: 12px 12px 0 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sub-title {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #666;
|
||||||
|
font-weight: 500;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
border-radius: 16px;
|
||||||
|
background: #ffffff;
|
||||||
|
width: 100%;
|
||||||
|
padding: 40px 35px;
|
||||||
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
.el-input {
|
.el-input {
|
||||||
height: 42px;
|
height: 48px;
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.el-input__inner {
|
.el-input__inner {
|
||||||
height: 42px;
|
height: 48px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 2px solid #d8e2ff; /* 柔和蓝色描边 */
|
border: 1px solid #e1e5e9;
|
||||||
padding-left: 40px;
|
padding-left: 45px;
|
||||||
font-size: 14px;
|
font-size: 15px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
background: #ffffff;
|
background: #f9fafb;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
border-color: #1E6BFF;
|
border-color: #1E6BFF;
|
||||||
box-shadow: 0 0 0 3px rgba(30, 107, 255, 0.15);
|
box-shadow: 0 0 0 3px rgba(30, 107, 255, 0.1);
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: #0A57E7;
|
border-color: #c0c4cc;
|
||||||
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input__prefix {
|
.el-input__prefix {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 12px;
|
left: 15px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
@ -254,8 +261,8 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-icon {
|
.input-icon {
|
||||||
height: 16px;
|
height: 18px;
|
||||||
width: 16px;
|
width: 18px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
color: #999;
|
color: #999;
|
||||||
transition: color 0.3s ease;
|
transition: color 0.3s ease;
|
||||||
|
|
@ -266,12 +273,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-checkbox {
|
.el-checkbox {
|
||||||
margin-bottom: 20px;
|
|
||||||
|
|
||||||
.el-checkbox__label {
|
.el-checkbox__label {
|
||||||
color: #666;
|
color: #666;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
@ -284,7 +289,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
height: 42px;
|
height: 48px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
@ -303,8 +308,15 @@ export default {
|
||||||
box-shadow: 0 2px 6px rgba(30, 107, 255, 0.25);
|
box-shadow: 0 2px 6px rgba(30, 107, 255, 0.25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-options {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
|
||||||
.link-type {
|
.forgot-password {
|
||||||
color: #1E6BFF;
|
color: #1E6BFF;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
@ -317,15 +329,9 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-tip {
|
|
||||||
font-size: 13px;
|
|
||||||
text-align: center;
|
|
||||||
color: #bfbfbf;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-wrapper {
|
.code-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 12px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.el-input {
|
.el-input {
|
||||||
|
|
@ -335,10 +341,10 @@ export default {
|
||||||
|
|
||||||
.login-code {
|
.login-code {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 42px;
|
height: 48px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 2px solid #e1e5e9;
|
border: 1px solid #e1e5e9;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
@ -357,62 +363,53 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-login-footer {
|
|
||||||
height: 60px;
|
|
||||||
line-height: 60px;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
color: rgba(255, 255, 255, 0.9);
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
background: rgba(0, 110, 107, 0.1);
|
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
z-index: 1;
|
|
||||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-code-img {
|
.login-code-img {
|
||||||
height: 42px;
|
height: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 响应式优化
|
// 响应式优化
|
||||||
@media (max-width: 1200px) {
|
|
||||||
.login-form {
|
|
||||||
margin-left: 50%;
|
|
||||||
width: 500px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.login {
|
.login {
|
||||||
background-position: center;
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-container {
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
margin-left: 0;
|
padding: 30px 25px;
|
||||||
width: 90%;
|
|
||||||
max-width: 400px;
|
|
||||||
padding: 30px 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.login-header {
|
||||||
font-size: 24px;
|
.main-title {
|
||||||
text-align: center;
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.login-form {
|
.login-form {
|
||||||
width: 95%;
|
padding: 25px 20px;
|
||||||
padding: 25px 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.login-header {
|
||||||
font-size: 20px;
|
.main-title {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-title {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.logo{
|
||||||
|
width: 56px;
|
||||||
|
height: 65px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue