登录页背景图及布局替换
Showing
4 changed files
with
20 additions
and
10 deletions
src/image/loginBg.jpg
0 → 100644
78.8 KB
src/image/loginBoxBg.png
0 → 100644
6.84 KB
src/image/loginInnerBg.png
deleted
100644 → 0
32.5 KB
... | @@ -2,6 +2,7 @@ | ... | @@ -2,6 +2,7 @@ |
2 | <div class="bg"> | 2 | <div class="bg"> |
3 | <div class="login-inner-bg login"> | 3 | <div class="login-inner-bg login"> |
4 | <div class="user_style"> | 4 | <div class="user_style"> |
5 | <h3>欢迎登录</h3> | ||
5 | <el-form | 6 | <el-form |
6 | :model="user" | 7 | :model="user" |
7 | :rules="rules" | 8 | :rules="rules" |
... | @@ -82,7 +83,7 @@ export default { | ... | @@ -82,7 +83,7 @@ export default { |
82 | //存储token | 83 | //存储token |
83 | sessionStorage.setItem("token", `Bearer ${res.content}`); | 84 | sessionStorage.setItem("token", `Bearer ${res.content}`); |
84 | //登录成功后需判断有无重定向,没有重定向则跳转首页 | 85 | //登录成功后需判断有无重定向,没有重定向则跳转首页 |
85 | this.$router.replace(this.$route.query.redirect || '/') | 86 | this.$router.replace(this.$route.query.redirect || "/"); |
86 | } else { | 87 | } else { |
87 | //错误处理 | 88 | //错误处理 |
88 | } | 89 | } |
... | @@ -97,25 +98,34 @@ export default { | ... | @@ -97,25 +98,34 @@ export default { |
97 | components: {}, | 98 | components: {}, |
98 | }; | 99 | }; |
99 | </script> | 100 | </script> |
100 | <style scoped> | 101 | <style scoped lang="scss"> |
101 | .bg { | 102 | .bg { |
102 | width: 100%; | 103 | width: 100%; |
103 | height: 100%; | 104 | height: 100%; |
104 | background: url(../../image/bg.png) no-repeat; | 105 | background: url(../../image/loginBg.jpg) no-repeat; |
105 | background-size: 100% 100%; | 106 | background-size: 100% 100%; |
106 | overflow: hidden; | 107 | overflow: hidden; |
107 | } | 108 | } |
108 | 109 | ||
109 | .login-inner-bg { | 110 | .login-inner-bg { |
110 | background: url(../../image/loginInnerBg.png) no-repeat; | 111 | background: url(../../image/loginBoxBg.png) no-repeat; |
111 | width: 393px; | 112 | width: 400px; |
112 | height: 348px; | 113 | height: 350px; |
113 | margin: 35vh auto 0; | 114 | margin: 35vh 40vw; |
114 | overflow: hidden; | 115 | overflow: hidden; |
116 | background-size: 100% 100%; | ||
117 | box-sizing: border-box; | ||
118 | padding: 20px; | ||
115 | } | 119 | } |
116 | 120 | ||
117 | .login .user_style { | 121 | .login .user_style { |
118 | margin: 90px 20px 0; | 122 | margin: 40px 20px 0; |
123 | h3{ | ||
124 | color: #fff; | ||
125 | font-weight: normal; | ||
126 | text-align: center; | ||
127 | margin-bottom: 20px; | ||
128 | } | ||
119 | } | 129 | } |
120 | 130 | ||
121 | .login .btn { | 131 | .login .btn { |
... | @@ -141,8 +151,6 @@ export default { | ... | @@ -141,8 +151,6 @@ export default { |
141 | cursor: pointer !important; | 151 | cursor: pointer !important; |
142 | background-color: #2d8cf0 !important; | 152 | background-color: #2d8cf0 !important; |
143 | } | 153 | } |
144 | </style> | ||
145 | <style> | ||
146 | .inputUser .ivu-input { | 154 | .inputUser .ivu-input { |
147 | padding: 6px 24px !important; | 155 | padding: 6px 24px !important; |
148 | border: 1px solid #9f9f9f !important; | 156 | border: 1px solid #9f9f9f !important; |
... | @@ -166,3 +174,5 @@ export default { | ... | @@ -166,3 +174,5 @@ export default { |
166 | color: #fff; | 174 | color: #fff; |
167 | } | 175 | } |
168 | </style> | 176 | </style> |
177 | <style> | ||
178 | </style> | ... | ... |
-
Please register or sign in to post a comment