Selaa lähdekoodia

用户体系优化V1.0.0

zhengjinyi 5 vuotta sitten
vanhempi
commit
f51ff57b3f
2 muutettua tiedostoa jossa 19 lisäystä ja 13 poistoa
  1. 3 1
      components/module/noLogin/nologin.vue
  2. 16 12
      pages/user-module/login-accont.vue

+ 3 - 1
components/module/noLogin/nologin.vue

@@ -65,12 +65,14 @@
 				let url;
 				if(self.alertType =='3'){
 					url =`/pages/user-module/login-accont?type=1`
+					this.$parent.isShowNoLogin=false;
 				}else if(self.alertType =='4'){
 					url =`/pages/user-module/login-accont?type=2`
+					this.$parent.isShowNoLogin=true;
 				}else{
 					url=`/pages/user-module/login-accont?type=detilType&id=${self.productids}`
+					this.$parent.isShowNoLogin=false;
 				}
-				this.$parent.isShowNoLogin=false;
 				uni.navigateTo ({
 					url
 				})

+ 16 - 12
pages/user-module/login-accont.vue

@@ -14,13 +14,9 @@
 				/>
 			</view>
 			<view class="login-input">
-				<input :type="inputType"
-					   v-model="password"  
-					   maxlength="18" 
-					   class="input" 
-					   placeholder="请输入密码"
-				/>
-				<view class="iconfont" :class="passIconType"  @click.stop="changePasswordType($event)"></view>
+				<input v-show="isShowEye" type="text" v-model="password"  maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
+				<input v-show="!isShowEye" type="password" v-model="password"  :password="true" maxlength="18" class="input" placeholder="请输入密码" autocomplete="new-password"/>
+				<view class="iconfont" :class="isShowEye ? iconEyen : iconEyes"  @click="passwordClick"></view>
 			</view>
 			<view class="login-input link">
 				<view class="login-reg" @click.stop="this.$api.navigateTo('/pages/user-module/register')">免费注册</view>
@@ -62,8 +58,9 @@
 	export default{
 		data() {
 			return{
-				inputType:'password',
-				passIconType:'icon-yanjing_yincang_o',
+				isShowEye:false,
+				iconEyes:'icon-yanjing_yincang_o',
+				iconEyen:'icon-yanjing_xianshi_o',
 				accountCode:'',  //用户登录账号
 				password:'',	 //用户登录密码	
 				isToast:false,	 //控制显示未输入邀请码提示	
@@ -218,6 +215,9 @@
 			hideModel(){
 				self.isUserInfo = false;
 			},
+			passwordClick() { //密码显隐操作
+				this.isShowEye = !this.isShowEye;
+			},
 			changePasswordType(e){
 				if(this.inputType ==='password'){
 					this.inputType = 'text'
@@ -282,12 +282,16 @@
 			}
 			.iconfont{
 				position: absolute;
-				right: 24rpx;
-				top: 20rpx;
+				right: 0;
+				top: 0;
 				font-size: 46rpx;
-				color: $color-system;;
+				color: $color-system;
 				font-weight: bold;
 				z-index: 99;
+				width: 96rpx;
+				height: 96rpx;
+				line-height: 96rpx;
+				text-align: center;
 			}
 			&.link{
 				background: #FFFFFF;