优化登录页背景放大缩小

This commit is contained in:
熊丽君
2021-10-26 14:25:00 +08:00
parent 84d4f3261d
commit 270eb56fe6
7 changed files with 56 additions and 43 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 53 KiB

BIN
src/assets/login_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -120,7 +120,12 @@ export default {
}); });
}, },
handlePage(flag) { handlePage(flag) {
this.$router.push({ path: '/login', query: { status: flag } }); // this.$router.push({ path: '/login', query: { status: flag } });
let routerJump = this.$router.resolve({
path: '/login',
query: { status: flag }
});
window.open(routerJump.href, '_blank');
}, },
handlePath(path) { handlePath(path) {
this.path = path; this.path = path;

View File

@ -58,7 +58,7 @@
}" }"
> >
<div class="title text_hidden_two"> <div class="title text_hidden_two">
<span>{{ item.title }}</span> <span style="text-align:left">{{ item.title }}</span>
</div> </div>
<div v-html="item.text" class="text text_hidden_four"></div> <div v-html="item.text" class="text text_hidden_four"></div>
@ -277,6 +277,7 @@ export default {
justify-content: space-between; justify-content: space-between;
height: 100%; height: 100%;
.title { .title {
text-align: left;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
color: #333; color: #333;

View File

@ -1,24 +1,22 @@
<template> <template>
<div class="login"> <div class="login">
<div class="login-title"> <div class="login-title">
<router-link to="/home"> <!-- <router-link to="/home">
<span>嘉策科技创新服务平台</span> <span>嘉策科技创新服务平台</span>
<br /> <br />
<span>欢迎来到嘉策</span> <span>欢迎</span>
</router-link> </router-link> -->
</div> </div>
<div class="my-box"> <div class="my-box">
<div class="my-left"> <div class="my-left">
<div class="bg-img"> <div class="bg-img">
<img src="@/assets/login.png" alt="" /> <!-- <img src="@/assets/login.png" alt="" /> -->
</div> </div>
</div> </div>
<div class="my-right"> <div class="my-right">
<!-- 登录 --> <!-- 登录 -->
<div <!-- min-width: 360px; max-width: 360px; padding-bottom: 55px -->
style="min-width: 360px; max-width: 360px; padding-bottom: 55px" <div class="right_box" v-show="status">
v-show="status"
>
<div class="m-title"> <div class="m-title">
<div> <div>
欢迎登录<i 欢迎登录<i
@ -121,10 +119,8 @@
</div> </div>
</div> </div>
<!-- 注册 --> <!-- 注册 -->
<div <!-- min-width: 360px; max-width: 360px; padding-bottom: 55px -->
style="min-width: 360px; max-width: 360px; padding-bottom: 55px" <div class="right_box" v-show="!status">
v-show="!status"
>
<div class="m-title"> <div class="m-title">
<div> <div>
欢迎注册<i class="el-icon-sort" @click="status = true"></i> 欢迎注册<i class="el-icon-sort" @click="status = true"></i>
@ -347,6 +343,9 @@ export default {
}, },
created() { created() {
this.getCookie(); this.getCookie();
let { status } = this.$route.query;
status = status === 'true' ? true : false;
this.status = status;
}, },
methods: { methods: {
disagree() { disagree() {
@ -489,10 +488,6 @@ export default {
} }
}); });
} }
},
created() {
const { status } = this.$route.query;
this.status = status;
} }
}; };
</script> </script>
@ -602,7 +597,7 @@ $loginForm: 383px;
height: 38px; height: 38px;
} }
.my-box { .my-box {
min-height: 454px; min-height: 460px;
display: flex; display: flex;
border-radius: 10px; border-radius: 10px;
position: absolute; position: absolute;
@ -613,29 +608,40 @@ $loginForm: 383px;
border-radius: 10px; border-radius: 10px;
overflow: hidden; overflow: hidden;
.my-left { .my-left {
min-width: 500px; // padding: 137px 48px 96px;
.bg-img {
height: 100%;
background-color: #3494ff; background-color: #3494ff;
display: flex; // min-width: 500px;
justify-content: center; .bg-img {
align-items: center;
img {
width: 405px; width: 405px;
height: 325px; height: 100%;
} // background-color: #3494ff;
// display: flex;
// justify-content: center;
// align-items: center;
background: url('../assets/login.png') no-repeat center center;
background-size: 80%;
// img {
// width: 405px;
// height: 325px;
// }
} }
} }
.my-right { .my-right {
min-width: 550px; // min-width: 550px;
// padding: 84px 100px 0;
margin: 50px auto 15px;
display: flex; display: flex;
justify-content: center; justify-content: center;
.right_box {
margin: 0 100px;
min-width: 325px;
.m-title { .m-title {
color: #333; color: #333;
font-size: 26px; font-size: 26px;
font-weight: 700; font-weight: 700;
text-align: center; text-align: center;
margin: 55px auto 45px; // margin: 55px auto 45px;
margin-bottom: 45px;
div { div {
position: relative; position: relative;
i { i {
@ -647,6 +653,7 @@ $loginForm: 383px;
} }
} }
} }
}
.el-form { .el-form {
.el-form-item { .el-form-item {
.el-form-item__content { .el-form-item__content {