Pārlūkot izejas kodu

登录页修改

常志远 2 gadi atpakaļ
vecāks
revīzija
833320a7e9
2 mainītis faili ar 58 papildinājumiem un 18 dzēšanām
  1. 2 3
      pages/homePage/homePage.vue
  2. 56 15
      pages/login/login.vue

+ 2 - 3
pages/homePage/homePage.vue

@@ -139,7 +139,7 @@
 
 
 			},
-
+d
 		},
 
 
@@ -163,7 +163,6 @@
 		border-bottom: 1px solid #fff;
 		padding: 16rpx 40rpx;
 		background-color: #fff;
-
 		uni-input {
 			background-color: #E8E8E8;
 			height: 32px;
@@ -251,7 +250,7 @@
 			display: flex;
 			align-items: center;
 			margin-bottom: 40rpx;
-font-family: 'SemiBold';
+           font-family: 'SemiBold';
 			img {
 				width: 40rpx;
 				height: 40rpx;

+ 56 - 15
pages/login/login.vue

@@ -14,27 +14,32 @@
 
 			<view class="login">
 				<view class="login-box">
-					<view class="tel highlight" >
-						<view class="icon">
-							<u-icon name="account-fill" size="40" color="#1F4A99 "></u-icon>
-
+					
+						<view :class="['tel',telHighlight==true?'highlight':'']" >
+						<view class="icon" >
+							<u-icon name="account-fill" size="40" ></u-icon>
+						</view>
+						
+						
+						<view class="line">
 						</view>
-						<u-line color="red" direction="col" length="40rpx" margin="auto 0" />
 						<view class="tips">
-							<u-input type="number" placeholder="请填写系统预留手机号码" />
+							<u-input  @focus="handleTelFocus" @blur="handleTelBlur" class="telInput" type="number" placeholder="请填写系统预留手机号码" />
 						</view>
 					</view>
-					<view class="pwd">
+					
+					<view :class="['pwd',pwdHighlight==true?'highlight':'']" >
 						<view class="icon">
 							<u-icon name="chat-fill" size="40"></u-icon>
 
 						</view>
-						<u-line color="red" direction="col" length="40rpx" margin="auto 0" />
+						<view class="line">
+						</view>
 						<view class="tips">
 							<view class="input">
-								<u-input type="number" placeholder="请输入验证码" />
+								<u-input  @focus="handlePwdFocus" @blur="handlePwdBlur" type="number"  placeholder="请输入验证码" />
 							</view>
-							<view class="verification-code">获取验证码</view>
+							<view class="verification-code">获取验证码</view> 
 
 						</view>
 					</view>
@@ -54,10 +59,27 @@
 	export default {
 		data() {
 			return {
-                show:true
+                show:true,
+			    telHighlight:false,
+				pwdHighlight:false
+				
 			}
 		},
 		methods: {
+			// 帐号框聚焦失焦
+			handleTelFocus(){
+				this.telHighlight=true
+			},
+			handleTelBlur(){
+				this.telHighlight=false
+			},
+			// 密码框聚焦失焦
+			handlePwdFocus(){
+				this.pwdHighlight=true
+			},
+			handlePwdBlur(){
+				this.pwdHighlight=false
+			}
                
 		}
 	}
@@ -69,6 +91,8 @@
 	}
 
 	
+	
+	
 
 	.main {
 		width: 100%;
@@ -103,9 +127,19 @@
 				width: 400rpx;
 			}
 		}
-
+		
+          .line{
+			  width: 2rpx;
+			  height: 40rpx;
+			  background-color: #C1CCDF;
+			  position: absolute;
+			  top: 20rpx;
+			  left: 70rpx;
+		  }
+		  
 		.tel,
 		.pwd {
+			position: relative;
 			display: flex;
 			width: 74.4%;
 			height: 80rpx;
@@ -114,7 +148,6 @@
 			margin: auto;
 			margin-bottom: 36rpx;
 			border: 1px solid rgba(193, 204, 223, 1);
-			
 			border-radius: 8px;
            /deep/.u-input__input{
 			   font-size: 32rpx;
@@ -122,7 +155,7 @@
 			.icon {
 				width: 14%;
 				text-align: center;
-
+                color: #B0B8C8;
 				img {
 					vertical-align: middle;
 				}
@@ -130,6 +163,7 @@
 
 
 			.tips {
+				
 				text-indent: 16rpx;
 				padding-right: 16rpx;
 				display: flex;
@@ -152,14 +186,21 @@
 				font-family: 'Regular';
 			}
 		}
-
+        // 高亮
 		.highlight {
 			border: 1px solid rgba(31, 74, 153, 1);
 			box-shadow: 0px 0px 8rpx 0px rgba(0, 90, 217, 50);
 			/deep/.u-input__input{
 				color: rgba(0, 90, 217, 1);
 			}
+			.icon{
+				color: #1F4A99;
+			}
+			.line{
+						  background-color: #005AD9;
+			}
 		}
+		
 	}
 
   .btn{