| | |
| | | <view class="password_list_item_box"> |
| | | <input type="password" v-model="form.originalPassword" maxlength="20" placeholder="请输入原密码"> |
| | | </view> |
| | | <text class="password_list_item_btn" @click="forgotPassword">忘记密码</text> |
| | | </view> |
| | | <view class="password_list_item"> |
| | | <text>新密码</text> |
| | |
| | | methods: { |
| | | // 忘记密码 |
| | | forgotPassword() { |
| | | uni.navigateTo({ |
| | | url: '/pages_adjust/pages/forgotPassword/forgotPassword' |
| | | }); |
| | | |
| | | }, |
| | | // 提交修改 |
| | | submit() { |
| | |
| | | uni.showToast({ title: '原密码不能为空', icon: 'none', duration: 2000 }); |
| | | } else if (!this.form.newPassword) { |
| | | uni.showToast({ title: '新密码不能为空', icon: 'none', duration: 2000 }); |
| | | } else if (!/^([a-z0-9\.\@\!\#\(/)/$\%\^\&\*\(\)]){6,20}$/i.test(this.form.newPassword)) { |
| | | } else if (!/^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{6,}$/.test(this.form.newPassword)) { |
| | | uni.showToast({ title: '密码格式不正确', icon: 'none', duration: 2000 }); |
| | | } else if (!this.form.confirmPassword) { |
| | | uni.showToast({ title: '确认密码不能为空', icon: 'none', duration: 2000 }); |
| | |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .password_list_item_btn { |
| | | text-align: right; |
| | | font-size: 26rpx; |
| | | font-family: PingFangSC-Regular, PingFang SC; |
| | | font-weight: 400; |
| | | color: #4275FC; |
| | | } |
| | | .password_list_item_box { |
| | | display: flex; |
| | | justify-content: space-between; |