修改登录页接口返回异常文字

This commit is contained in:
zhouyanli
2026-05-08 11:52:59 +08:00
parent b68766791d
commit 10505e8000
6 changed files with 16 additions and 40 deletions

View File

@@ -51,7 +51,7 @@ const smsCode = ref('');
// ========== 计算属性 ==========
// 是否可点击确定按钮(密码格式正确 + 两次输入一致)
const canConfirm = computed(() => {
// 密码格式规则6-16位任意字符(可根据需求调整)
// 密码格式规则6-16位任意字符
const pwdReg = /^(?=.*[a-zA-Z])(?=.*\d).{6,16}$/;
// 校验条件:新密码符合格式 + 确认密码和新密码一致 + 均不为空
return pwdReg.test(newPassword.value)
@@ -100,28 +100,12 @@ const handleConfirm = () => {
}
}).catch(err =>{
uni.showToast({
title: '网络异常',
title: err.msg,
icon: 'error'
});
})
// 模拟修改密码请求
// uni.showLoading({
// title: '修改中...'
// });
// setTimeout(() => {
// uni.hideLoading();
// uni.showToast({
// title: '密码修改成功',
// icon: 'success'
// });
// // 密码修改成功后返回上一页(或跳转到登录页)
// uni.navigateTo({
// url:"/pages/login/pwd-login"
// });
// }, 1500);
};
</script>