diff --git a/src/views/system/user/center/updateEmail.vue b/src/views/system/user/center/updateEmail.vue index 9e98b13..02a6e28 100644 --- a/src/views/system/user/center/updateEmail.vue +++ b/src/views/system/user/center/updateEmail.vue @@ -35,16 +35,20 @@ export default { }, data() { const validatePass = (rule, value, callback) => { - validPass(value).then(res => { - if (res.status === 200) { - callback() - } else { - callback(new Error('密码错误,请重新输入')) - } - }) + if (value === '' || value === null) { + callback(new Error('密码不能为空')) + } else { + validPass(value).then(res => { + if (res.status === 200) { + callback() + } else { + callback(new Error('密码错误,请重新输入')) + } + }) + } } const validMail = (rule, value, callback) => { - if (value === '') { + if (value === '' || value === null) { callback(new Error('新邮箱不能为空')) } else if (value === this.email) { callback(new Error('新邮箱不能与旧邮箱相同')) diff --git a/src/views/system/user/module/form.vue b/src/views/system/user/module/form.vue index 27a62bb..837e348 100644 --- a/src/views/system/user/module/form.vue +++ b/src/views/system/user/module/form.vue @@ -194,7 +194,7 @@ export default { }) }, getJobs(id) { - this.jobId=null + this.jobId = null getAllJob(id).then(res => { this.jobs = res.content }).catch(err => {