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);