271e4f0d by yangwei

登录页面UI修改

1 parent f222a119

6.84 KB | W: | H:

1.81 MB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
1 <template> 1 <template>
2 <div class="bg"> 2 <div class="bg">
3 <div class="login-inner-bg login"> 3 <div class="login-inner-bg login">
4 <h2>{{ productName }}</h2>
4 <div class="user_style"> 5 <div class="user_style">
5 <h3>欢迎登录</h3> 6 <h3>欢迎登录</h3>
6 <el-form 7 <el-form
...@@ -14,7 +15,7 @@ ...@@ -14,7 +15,7 @@
14 <el-input 15 <el-input
15 class="username" 16 class="username"
16 v-model="user.account" 17 v-model="user.account"
17 placeholder="用户名" 18 placeholder="请输入用户名"
18 ></el-input> 19 ></el-input>
19 </el-form-item> 20 </el-form-item>
20 <el-form-item prop="password"> 21 <el-form-item prop="password">
...@@ -22,16 +23,16 @@ ...@@ -22,16 +23,16 @@
22 type="password" 23 type="password"
23 class="password" 24 class="password"
24 v-model="user.password" 25 v-model="user.password"
25 placeholder="登录密码" 26 placeholder="请输入密码"
26 ></el-input> 27 ></el-input>
27 </el-form-item> 28 </el-form-item>
28 <el-form-item> 29 <!-- <el-form-item>
29 <el-checkbox 30 <el-checkbox
30 label="记住用户名" 31 label="记住用户名"
31 @change="checkUserName" 32 @change="checkUserName"
32 ></el-checkbox> 33 ></el-checkbox>
33 </el-form-item> 34 </el-form-item> -->
34 <el-form-item id="login"> 35 <el-form-item class="login-btn">
35 <el-button type="primary" style="width: 100%" @click="login('user')" 36 <el-button type="primary" style="width: 100%" @click="login('user')"
36 >登录</el-button 37 >登录</el-button
37 > 38 >
...@@ -54,6 +55,7 @@ export default { ...@@ -54,6 +55,7 @@ export default {
54 password: "", 55 password: "",
55 checkStatus: false, 56 checkStatus: false,
56 }, 57 },
58 productName: "",
57 rules: { 59 rules: {
58 account: [{ required: true, message: "请填写帐号", trigger: "blur" }], 60 account: [{ required: true, message: "请填写帐号", trigger: "blur" }],
59 password: [{ required: true, message: "请填写密码", trigger: "blur" }], 61 password: [{ required: true, message: "请填写密码", trigger: "blur" }],
...@@ -78,6 +80,7 @@ export default { ...@@ -78,6 +80,7 @@ export default {
78 //根据子系统code获取子系统详细信息 80 //根据子系统code获取子系统详细信息
79 getAction(api.subsystem, params).then((res) => { 81 getAction(api.subsystem, params).then((res) => {
80 if (res.status === 1) { 82 if (res.status === 1) {
83 this.productName = res.content[0].name;
81 this.$store.dispatch("products/setData", res.content[0]); 84 this.$store.dispatch("products/setData", res.content[0]);
82 } else { 85 } else {
83 this.$message.error({ message: res.message, showClose: true }); 86 this.$message.error({ message: res.message, showClose: true });
...@@ -136,72 +139,126 @@ export default { ...@@ -136,72 +139,126 @@ export default {
136 <style scoped lang="scss"> 139 <style scoped lang="scss">
137 .username, 140 .username,
138 .password { 141 .password {
142 position: relative;
143 &:before {
144 content: "";
145 display: block;
146 width: 16px;
147 height: 16px;
148 position: absolute;
149 left: 10px;
150 top: 7px;
151 background-size: 100% 100%;
152 }
139 /deep/ .el-input__inner { 153 /deep/ .el-input__inner {
140 border: 1px solid #6bc1fc; 154 text-indent: 24px;
141 background-color: transparent !important; 155 border: 1px solid rgba(11, 161, 248, 0.4);
156 background-color: rgba(6, 135, 205, 0.3) !important;
142 } 157 }
143 } 158 }
159 .username::before {
160 background-image: url(../../image/username.png);
161 }
162 .password::before {
163 background-image: url(../../image/password.png);
164 }
144 .bg { 165 .bg {
145 width: 100%; 166 width: 100%;
146 height: 100%; 167 height: 100%;
147 background: url(../../image/loginBg.jpg) no-repeat; 168 min-width: 1440px;
169 min-height: 560px;
170 background: url(../../image/loginBoxBg.png) no-repeat;
148 background-size: 100% 100%; 171 background-size: 100% 100%;
149 overflow: hidden; 172 overflow: hidden;
173 position: relative;
150 } 174 }
151 175
152 .login-inner-bg { 176 .login-inner-bg {
153 background: url(../../image/loginBoxBg.png) no-repeat; 177 background: url(../../image/loginBg.png) no-repeat;
154 width: 400px; 178 width: 21.6%;
155 height: 350px; 179 height: 43%;
156 margin: 35vh auto; 180 min-width: 360px;
157 overflow: hidden; 181 min-height: 380px;
182 top: 30%;
183 right: 20%;
184 position: absolute;
158 background-size: 100% 100%; 185 background-size: 100% 100%;
159 box-sizing: border-box; 186 box-sizing: border-box;
160 padding: 20px; 187 padding: 56px;
188 h2 {
189 width: 100%;
190 font-size: 36px;
191 font-weight: 700;
192 color: #fff;
193 text-align: center;
194 white-space: nowrap;
195 position: absolute;
196 right: 0;
197 top: -70px;
198 background-image: linear-gradient(
199 180deg,
200 rgba(99, 163, 255, 1) 0,
201 rgba(99, 163, 255, 1) 0,
202 rgba(182, 220, 255, 1) 49.731445%,
203 rgba(114, 190, 255, 1) 100%,
204 rgba(114, 190, 255, 1) 100%
205 );
206 overflow-wrap: break-word;
207 color: rgba(255, 255, 255, 1);
208 font-size: 36px;
209 font-family: AlimamaShuHeiTi-Bold;
210 -webkit-background-clip: text;
211 -webkit-text-fill-color: transparent;
212 }
161 } 213 }
162 214 .login {
163 .login .user_style { 215 .user_style {
164 margin: 40px 20px 0;
165 h3 { 216 h3 {
166 color: #fff; 217 color: #fff;
218 font-size: 22px;
167 font-weight: normal; 219 font-weight: normal;
168 text-align: center; 220 text-align: center;
169 margin-bottom: 20px; 221 margin: 16px auto 34px;
222 font-weight: 400;
170 } 223 }
171 } 224 }
172 .login .btn { 225 .btn {
173 width: 100%; 226 width: 100%;
174 height: 6vh; 227 height: 6vh;
175 background-color: #00c2de; 228 background-color: #00c2de;
176 border-radius: 5px; 229 border-radius: 5px;
177 font-size: 1.4vw; 230 font-size: 1.4vw;
178 color: #ffffff; 231 color: #ffffff;
179 } 232 }
180 233 .btn:hover {
181 .login .btn:hover {
182 cursor: pointer; 234 cursor: pointer;
183 background-color: #2d8cf0; 235 background-color: #2d8cf0;
236 }
184 } 237 }
185 238
186 #loginform .el-button { 239 .login #loginform {
187 background: #409eff !important; 240 .el-form-item {
241 margin-bottom: 24px !important;
242 }
243 .login-btn {
244 margin-top: 40px !important;
245 }
246 .el-button {
247 font-size: 18px;
248 background: #0d8cc0 !important;
188 color: #ffffff !important; 249 color: #ffffff !important;
189 }
190
191 #loginform .el-button:hover {
192 cursor: pointer !important; 250 cursor: pointer !important;
193 background-color: #2d8cf0 !important; 251 }
252 .el-input__inner {
253 width: 100% !important;
254 }
255 .el-checkbox__label {
256 color: #fff;
257 }
194 } 258 }
259
195 .inputUser .ivu-input { 260 .inputUser .ivu-input {
196 padding: 6px 24px !important; 261 padding: 6px 24px !important;
197 border: 1px solid #9f9f9f !important; 262 border: 1px solid #9f9f9f !important;
198 } 263 }
199
200 #loginform .el-input__inner {
201 width: 100% !important;
202 }
203
204 .el-checkbox__label {
205 color: #fff;
206 }
207 </style> 264 </style>
......