diff --git a/src/pages/personalCenter.vue b/src/pages/personalCenter.vue index 325f772..e8a3758 100644 --- a/src/pages/personalCenter.vue +++ b/src/pages/personalCenter.vue @@ -339,10 +339,11 @@ export default { if(this.passwordForm.newPassword.length < 6 || this.passwordForm.reNewPassword.length < 6) return this.$message.warning('请输入6位数以上的密码') if(this.passwordForm.newPassword !== this.passwordForm.reNewPassword) return this.$message.warning('输入的新密码不一致,请重新确认') if(this.curPassword === this.passwordForm.newPassword) return this.$message.warning('原密码跟新密码不能一致') + if(this.curPassword !== this.passwordForm.password) return this.warningMsg('原密码不正确,请重新确认') let data = { userId: this.personalInformation.userId, - password: this.passwordForm.password + password: this.passwordForm.newPassword } this.$post(this.api.userinfoUpdate,data) .then(res => {