From e05290311e33722d8b208ccf7d83b1f4011d5bbd Mon Sep 17 00:00:00 2001 From: "juncheng.li" Date: Mon, 17 Apr 2023 09:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81=E9=99=90?= =?UTF-8?q?=E5=88=B6=E8=BE=93=E5=85=A5=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PDA/pages/setter/passwordpage.vue | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/fe/PDA/pages/setter/passwordpage.vue b/fe/PDA/pages/setter/passwordpage.vue index 1eefc9d16..4d4708120 100644 --- a/fe/PDA/pages/setter/passwordpage.vue +++ b/fe/PDA/pages/setter/passwordpage.vue @@ -35,8 +35,8 @@ errorMessage: '请输入密码', }, { - minLength: 3, - maxLength: 5, + minLength: 6, + maxLength: 16, errorMessage: '密码长度在 {minLength} 到 {maxLength} 个字符', } ] @@ -48,8 +48,8 @@ errorMessage: '请输入密码', }, { - minLength: 3, - maxLength: 5, + minLength: 6, + maxLength: 16, errorMessage: '密码长度在 {minLength} 到 {maxLength} 个字符', } ] @@ -61,8 +61,8 @@ errorMessage: '请输入密码', }, { - minLength: 3, - maxLength: 5, + minLength: 6, + maxLength: 16, errorMessage: '密码长度在 {minLength} 到 {maxLength} 个字符', }, { @@ -91,15 +91,27 @@ // }, // 触发提交表单 submit() { + if(localStorage.userName=="admin"){ + uni.showToast({ + title:"admin 用户密码不能修改" + }) + return; + } this.$refs.form.validate().then(res=>{ console.log(res) let params = { newPassword:res.newpassword, currentPassword:res.oldpassword } - changePassword(params).then((ress)=>{ console.log('返回结果:', ress); + uni.showToast({ + title:"密码修改成功" + }) + }).catch(error=>{ + uni.showToast({ + title:error.message + }) }) }).catch(err =>{ console.log('表单错误信息:', err);