| | |
| | | <u-divider></u-divider> --> |
| | | <u-form-item :label-position="labelPosition" label="新密码" prop="password" label-width="150"> |
| | | <u-input :password-icon="false" :border="border" :type="showPassword1?'text':'password'" |
| | | v-model="model.password" placeholder="请输入新密码"> |
| | | v-model="password" placeholder="请输入新密码"> |
| | | <template slot="suffix"> |
| | | <uni-icons color="#20613D" :type="showPassword1 ? 'eye-filled' : 'eye-slash-filled'" size="24" |
| | | @click="()=>{ |
| | | showPassword1=!showPassword1; |
| | | $forceUpdate() |
| | | }"></uni-icons> |
| | | </template> |
| | | </u-input> |
| | |
| | | <u-divider></u-divider> |
| | | <u-form-item :label-position="labelPosition" label="确认密码" label-width="150" prop="rePassword"> |
| | | <u-input :password-icon="false" :border="border" :type="showPassword2?'text':'password'" |
| | | v-model="model.rePassword" placeholder="请确认密码"> |
| | | v-model="rePassword" placeholder="请确认密码"> |
| | | <template slot="suffix"> |
| | | <uni-icons color="#20613D" :type="showPassword2 ? 'eye-filled' : 'eye-slash-filled'" size="24" |
| | | @click="()=>{ |
| | | showPassword2=!showPassword2; |
| | | $forceUpdate() |
| | | }"></uni-icons> |
| | | </template> |
| | | </u-input> |
| | |
| | | password: '', |
| | | rePassword: '' |
| | | }, |
| | | password: '', |
| | | rePassword: '', |
| | | showPassword1: false, |
| | | showPassword2: false, |
| | | rules: { |
| | |
| | | }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | return value === this.model.password; |
| | | // return value === this.model.password; |
| | | return value === this.password; |
| | | }, |
| | | message: '两次输入的密码不相等', |
| | | trigger: ['change', 'blur'] |
| | |
| | | }) |
| | | }, |
| | | submit() { |
| | | if (!this.model.password) { |
| | | if (!this.password) { |
| | | this.$message.showToast('密码未填写'); |
| | | |
| | | return |
| | | } |
| | | if (this.model.rePassword === this.model.password) { |
| | | if (this.rePassword === this.password) { |
| | | this.updatePwd(); |
| | | } else { |
| | | this.$message.showToast('两次密码不一样'); |
| | |
| | | data: { |
| | | // password: this.model.oldpassword, |
| | | // newpassword: this.model.password |
| | | oldPassword: this.model.oldPassword, |
| | | password: this.model.password |
| | | oldPassword: this.oldPassword, |
| | | password: this.password |
| | | } |
| | | }); |
| | | if (resp && resp.code == 0) { |
| | | this.model.password = '' |
| | | this.model.rePassword = '' |
| | | this.model.oldPassword = '' |
| | | this.password = '' |
| | | this.rePassword = '' |
| | | this.oldPassword = '' |
| | | this.$message.showToast('修改成功'); |
| | | let tmp = this |
| | | setTimeout(() => { |
| | |
| | | }, 1500) |
| | | } |
| | | }, |
| | | // 点击actionSheet回调 |
| | | actionSheetCallback(index) { |
| | | uni.hideKeyboard(); |
| | | this.model.sex = this.actionSheetList[index].text; |
| | | }, |
| | | // checkbox选择发生变化 |
| | | checkboxGroupChange(e) { |
| | | this.model.likeFruit = e; |
| | | }, |
| | | // radio选择发生变化 |
| | | radioGroupChange(e) { |
| | | this.model.payType = e; |
| | | }, |
| | | // 勾选版权协议 |
| | | checkboxChange(e) { |
| | | this.model.agreement = e.value; |
| | | }, |
| | | |
| | | |
| | | |
| | | // 选择地区回调 |
| | | regionConfirm(e) { |
| | | this.model.region = e.province.label + '-' + e.city.label + '-' + e.area.label; |
| | |
| | | borderChange(index) { |
| | | this.border = !index; |
| | | }, |
| | | radioCheckboxChange(index) { |
| | | if (index == 0) { |
| | | this.radioCheckWrap = false; |
| | | this.radioCheckWidth = 'auto'; |
| | | } else if (index == 1) { |
| | | this.radioCheckWrap = true; |
| | | this.radioCheckWidth = 'auto'; |
| | | } else if (index == 2) { |
| | | this.radioCheckWrap = false; |
| | | this.radioCheckWidth = '50%'; |
| | | } |
| | | }, |
| | | |
| | | labelPositionChange(index) { |
| | | this.labelPosition = index == 0 ? 'left' : 'top'; |
| | | }, |