From 9d5b4d650e5b01081d3537c750e7469db4d161e3 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期二, 29 四月 2025 08:53:20 +0800 Subject: [PATCH] 提交 --- pages/tabBar/count/count.vue | 65 ++++++++++---------------------- 1 files changed, 21 insertions(+), 44 deletions(-) diff --git a/pages/tabBar/count/count.vue b/pages/tabBar/count/count.vue index 7849718..a246841 100644 --- a/pages/tabBar/count/count.vue +++ b/pages/tabBar/count/count.vue @@ -30,7 +30,7 @@ </view> <view class="info-id" @click="resetPwd()"> - <span>修改密码</span><u-icon name="edit-pen" color="#e6e6e6" size="16"></u-icon> + <u-icon name="edit-pen" color="#e6e6e6" size="16"></u-icon><span>修改密码</span> </view> </view> </view> @@ -59,38 +59,30 @@ </view> <u-modal :show="showModal" title="修改密码" :showConfirmButton="false" :closeOnClickOverlay="true" ref="uModal" :asyncClose="true" @close="closeModal()"> <view> - <u--form labelPosition="top" labelWidth="120" :model="pwdForm" :rules="rules" ref="uForm"> + <u-form labelPosition="top" labelWidth="120" :model="pwdForm" :rules="rules" ref="uForm"> <u-form-item prop="password" ref="password" label="新密码" > - <u--input - v-model="pwdForm.password" - placeholder="请输入新密码" - :type="codeType1" - > + <u-input v-model="pwdForm.password" placeholder="请输入新密码" :password="isPwd1"> <template slot="suffix"> - <u-icon v-show="codeType1 == 'password'" name="eye" color="#999" size="20" @click="viewCode(1)"></u-icon> - <u-icon v-show="codeType1 == 'text'" name="eye-off" color="#999" size="20" @click="viewCode(1)"></u-icon> + <u-icon :name="isPwd1?'eye':'eye-off'" color="#999" size="20" @click="isPwd1 = !isPwd1"></u-icon> </template> - </u--input> + </u-input> </u-form-item> <u-form-item prop="rePassword" ref="rePassword" label="确认密码" > - <u--input - v-model="pwdForm.rePassword" - placeholder="请确认密码" - :type="codeType2" - ><template slot="suffix"> - <u-icon v-show="codeType2 == 'password'" name="eye" color="#999" size="20" @click="viewCode(2)"></u-icon> - <u-icon v-show="codeType2 == 'text'" name="eye-off" color="#999" size="20" @click="viewCode(2)"></u-icon> - </template></u--input> + <u-input v-model="pwdForm.rePassword" placeholder="请输入新密码" :password="isPwd2"> + <template slot="suffix"> + <u-icon :name="isPwd2?'eye':'eye-off'" color="#999" size="20" @click="isPwd2 = !isPwd2"></u-icon> + </template> + </u-input> </u-form-item> - </u--form> + </u-form> <u-button type="primary" style="margin-top: 20px" text="确认" @click="confirmPwd()"></u-button> </view> </u-modal> @@ -121,7 +113,7 @@ examList: [], totalPage: 0, user: {}, - avator: '', + avator: avatorPic, showModal: false, pwdForm:{ id: null, @@ -160,8 +152,8 @@ } ] }, - codeType1: 'password', - codeType2: 'password' + isPwd1: true, + isPwd2: true } }, @@ -174,11 +166,11 @@ // uni.hideTabBar(); // this.getUserInfo() this.user = uni.getStorageSync('userSet') - if(this.user.logoPath && this.user.logoPath !== ''){ - this.avator = VUE_APP_BASE_URL + '/api/' + this.user.logoPath - }else{ - this.avator = avatorPic - } + // if(this.user.logoPath && this.user.logoPath !== ''){ + // this.avator = VUE_APP_BASE_URL + '/api/' + this.user.logoPath + // }else{ + // this.avator = avatorPic + // } }, methods: { @@ -233,23 +225,6 @@ t.showModal = true }, - viewCode(type){ - const t = this - if(type == 1){ - if(this.codeType1 == 'password'){ - this.codeType1 = 'text' - } else{ - this.codeType1 = 'password' - } - }else{ - if(this.codeType2 == 'password'){ - this.codeType2 = 'text' - } else{ - this.codeType2 = 'password' - } - } - }, - confirmPwd(){ const t = this t.$refs.uForm.validate().then(res => { @@ -299,6 +274,8 @@ password: '', rePassword: '' } + this.isPwd1 = true + this.isPwd2 = true } } } -- Gitblit v1.9.2