| | |
| | | |
| | | </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> |
| | |
| | | <u-button @click="loginOut" type="primary" text="退出登录" style="width: 80%" shape="circle"></u-button> |
| | | </view> |
| | | </view> |
| | | <u-modal :show="showModal" title="重置密码" :showConfirmButton="false" :closeOnClickOverlay="true" ref="uModal" :asyncClose="true" @close="closeModal()"> |
| | | <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> |
| | |
| | | examList: [], |
| | | totalPage: 0, |
| | | user: {}, |
| | | avator: '', |
| | | avator: avatorPic, |
| | | showModal: false, |
| | | pwdForm:{ |
| | | id: null, |
| | |
| | | } |
| | | ] |
| | | }, |
| | | codeType1: 'password', |
| | | codeType2: 'password' |
| | | isPwd1: true, |
| | | isPwd2: true |
| | | } |
| | | |
| | | }, |
| | |
| | | // 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: { |
| | |
| | | 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 => { |
| | |
| | | if(r.code == 200){ |
| | | t.$refs.uToast.show({ |
| | | type: 'default', |
| | | message: '密码已重置,请重新登录', |
| | | message: '密码已修改,请重新登录', |
| | | duration: 1000 |
| | | }) |
| | | loginOut().then(res=>{ |
| | |
| | | password: '', |
| | | rePassword: '' |
| | | } |
| | | this.isPwd1 = true |
| | | this.isPwd2 = true |
| | | } |
| | | } |
| | | } |