master
lion 2 years ago
parent a6f96ab463
commit f5691a90e5

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -35,7 +35,7 @@
store, store,
show, show,
save save
} from "@/api/relic" } from "@/api/guide"
import { import {
Message Message
} from 'element-ui' } from 'element-ui'

@ -1,44 +1,46 @@
<template> <template>
<div class="login-container"> <div class="login-container">
<img src="../../assets/imgs/bg_bottom.png" class="bg_bottom" /> <img src="../../assets/bg.png" alt="" class='bg_left'>
<!-- <img src="../../assets/imgs/bg_bottom.png" class="bg_bottom" />
<img src="../../assets/imgs/bg_left.png" class="bg_left" /> <img src="../../assets/imgs/bg_left.png" class="bg_left" />
<img src="../../assets/imgs/footer_logo.png" class="footer_logo" /> <img src="../../assets/imgs/footer_logo.png" class="footer_logo" />:style="{marginTop:marginTop+'px'}" -->
<div class="formBox" ref="formBox"> <div class="formBox" ref="formBox">
<el-form ref="loginForm" :model="loginForm" :style="{marginTop:marginTop+'px'}" :rules="loginRules" <el-form ref="loginForm" :model="loginForm" :rules="loginRules"
class="login-form" auto-complete="on" label-position="left"> class="login-form" auto-complete="on" label-position="left">
<div class="title-container"> <!-- <div class="title-container">
<h3 class="title">预约管理系统</h3> <h3 class="title">预约管理系统</h3>
</div> </div> -->
<img src="../../assets/imgs/bg_box.png" width="100%" /> <!-- <img src="../../assets/imgs/bg_box.png" width="100%" /> -->
<div class="box_middle"> <div class="box_middle">
<el-form-item prop="username"> <img src="../../assets/loginlogo.png" alt="" class='loginlogo'>
<span class="svg-container"> <el-form-item prop="username" class='username'>
<!-- <span class="svg-container">
<svg-icon icon-class="user" /> <svg-icon icon-class="user" />
</span> </span> -->
<el-input ref="username" v-model="loginForm.username" placeholder="请输入登录名" name="username" type="text" <el-input ref="username" v-model="loginForm.username" placeholder="" name="username" type="text"
tabindex="1" auto-complete="off" /> tabindex="1" auto-complete="off" />
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password" class='password'>
<span class="svg-container"> <!-- <span class="svg-container">
<svg-icon icon-class="password" /> <svg-icon icon-class="password" />
</span> </span> -->
<el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType" <el-input :key="passwordType" show-password ref="password" v-model="loginForm.password" :type="passwordType"
placeholder="请输入密码" name="password" tabindex="2" auto-complete="off" @keyup.enter.native="handleLogin" /> placeholder="" name="password" tabindex="2" auto-complete="off" @keyup.enter.native="handleLogin" />
</el-form-item> </el-form-item>
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" <el-button :loading="loading" type="primary" style="width:50%;margin-bottom:30px;"
@click.native.prevent="handleLogin">登录</el-button> @click.native.prevent="handleLogin">登录</el-button>
</div> </div>
<img src="../../assets/imgs/bg_box_bottom.png" width="100%" /> <!-- <img src="../../assets/imgs/bg_box_bottom.png" width="100%" /> -->
</el-form> </el-form>
</div> </div>
<div class="footer"> <!-- <div class="footer">
2023 © 苏州革命博物馆 2023 © 苏州革命博物馆
</div> </div> -->
</div> </div>
</template> </template>
@ -66,6 +68,7 @@
} }
return { return {
windowHeight: document.documentElement.clientHeight, // windowHeight: document.documentElement.clientHeight, //
windowWidth: document.documentElement.clientWidth,
loginForm: { loginForm: {
username: '', username: '',
password: '' password: ''
@ -99,6 +102,10 @@
windowHeight(val) { windowHeight(val) {
let that = this; let that = this;
console.log("实时屏幕高度:", val, that.windowHeight); console.log("实时屏幕高度:", val, that.windowHeight);
},
windowWidth(val) {
let that = this;
console.log("实时屏幕宽度:", val, that.windowHeight);
} }
}, },
@ -113,12 +120,20 @@
var that = this; var that = this;
let height = this.$refs.formBox.offsetHeight; //100 let height = this.$refs.formBox.offsetHeight; //100
that.formHeight = height; that.formHeight = height;
that.marginTop = (that.windowHeight - height * 1.5) / 2; that.marginTop = (that.windowHeight - height * 1.5) / 3;
window.fullHeight = document.documentElement.clientHeight;
that.windowHeight = window.fullHeight; //
window.fullWidth = document.documentElement.clientWidth;
that.windowWidth = window.fullWidth; //
console.log(that.windowWidth, that.windowHeight)
// <!--window.onresizemounted--> // <!--window.onresizemounted-->
window.onresize = () => { window.onresize = () => {
return (() => { return (() => {
window.fullHeight = document.documentElement.clientHeight; window.fullHeight = document.documentElement.clientHeight;
that.windowHeight = window.fullHeight; // that.windowHeight = window.fullHeight; //
window.fullWidth = document.documentElement.clientWidth;
that.windowWidth = window.fullWidth; //
console.log(that.windowWidth, that.windowHeight)
})() })()
}; };
}, },
@ -161,9 +176,9 @@
/* 修复input 背景不协调 和光标变色 */ /* 修复input 背景不协调 和光标变色 */
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */ /* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
$bg:#ffffff; $bg: #ffffff;
$light_gray:#55320f; $light_gray: #cf995a;
$cursor: #55320f; $cursor: #cf995a;
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) { @supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
.login-container .el-input input { .login-container .el-input input {
@ -186,10 +201,11 @@
} }
.box_middle { .box_middle {
background: url("../../assets/imgs/bg_box_line.png") repeat-y; // background: url("../../assets/imgs/bg_box_line.png") repeat-y;
background-size: 100% 100%; // background-size: 100% 100%;
padding: 20px 60px; padding: 20px 30px;
margin-top: -10px; margin-top: -10px;
text-align: center;
} }
@ -221,18 +237,18 @@
} }
.el-form-item { .el-form-item {
border: 1px solid rgba(255, 255, 255, 0.1); // border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1); // background: rgba(0, 0, 0, 0.1);
border-radius: 5px; // border-radius: 5px;
color: #454545; color: #454545;
} }
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
$bg:#f9efe5; $bg: #fff;
$dark_gray:#55320f; $dark_gray: #55320f;
$light_gray:#55320f; $light_gray: #55320f;
.bg_bottom { .bg_bottom {
position: absolute; position: absolute;
@ -244,7 +260,40 @@
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
height: 90%; height: 100%;
width: 70%
}
.loginlogo {
width: 100%;
max-width: 288px;
margin-bottom: 70px;
}
.formBox {
position: absolute;
top: 50%;
right: 0;
width: 30%;
transform: translate(0%, -50%);
}
.username {
width: 100%;
max-width: 300px;
background-image: url(../../assets/username.png);
background-size: 100% 100%;
display: inline-block;
margin-bottom: 40px;
}
.password {
width: 100%;
max-width: 300px;
background-image: url(../../assets/password.png);
background-size: 100% 100%;
display: inline-block;
margin-bottom: 60px;
} }
.login-container { .login-container {
@ -261,6 +310,10 @@
padding: 20px 35px 0; padding: 20px 35px 0;
margin: 0 auto; margin: 0 auto;
overflow: hidden; overflow: hidden;
.el-input {
line-height: 53px;
}
} }
.tips { .tips {

Loading…
Cancel
Save