From 98d6b76976ed7cd4f07029327db146f35d596e11 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期二, 20 十二月 2022 14:36:24 +0800 Subject: [PATCH] fix:修改页面细节 --- src/views/systemSetting/baseSetting/user/components/password/index.vue | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/views/systemSetting/baseSetting/user/components/password/index.vue b/src/views/systemSetting/baseSetting/user/components/password/index.vue index 90e5ed3..2a7eb82 100644 --- a/src/views/systemSetting/baseSetting/user/components/password/index.vue +++ b/src/views/systemSetting/baseSetting/user/components/password/index.vue @@ -34,7 +34,7 @@ const checkNewPwd = (rule, value, callback) => { if (!value) { callback(new Error('鏂板瘑鐮佷笉鑳戒负绌�')) - }else if(value === this.user.password){ + } else if (value === this.user.password) { callback(new Error('鏂板瘑鐮佷笉鑳藉拰鏃у瘑鐮佷竴鏍�')) } else { callback(); @@ -89,32 +89,32 @@ methods: { // 鎻愪氦 handleSubmit() { - const { userInfo,user } = this; + const { userInfo, user } = this; this.$refs.pwd.validate((valid) => { if (valid) { this.$axios({ - method:'post', - url:'sccg/admin/updatePassword', - data:{ - newPassword:user.newPwd, - oldPassword:user.password, - username:userInfo.username + method: 'post', + url: 'sccg/admin/updatePassword', + data: { + newPassword: user.newPwd, + oldPassword: user.password, + username: userInfo.username } }) - .then(res=>{ - if(res.code === 200){ - this.$emit('closeDialog',{flag:false}); - this.$message({ - type:'success', - message:'瀵嗙爜淇敼鎴愬姛' - }) - }else{ - this.$message({ - type:'warning', - message:res.message - }) - } - }) + .then(res => { + if (res.code === 200) { + this.$emit('closeDialog', { flag: false }); + this.$message({ + type: 'success', + message: '瀵嗙爜淇敼鎴愬姛' + }) + } else { + this.$message({ + type: 'warning', + message: res.message + }) + } + }) } else { return false; } @@ -123,7 +123,7 @@ // 娓呯┖琛ㄥ崟 resetForm() { this.$refs.pwd.resetFields(); - this.$emit('closeDialog',{flag:false}); + this.$emit('closeDialog', { flag: false }); } } } -- Gitblit v1.8.0