Browse Source

完成找回密码逻辑

wangyi/feature-20251022162725-启动页登录注册
Ethereal 4 weeks ago
parent
commit
1571a304ba
  1. 75
      pages/start/recoverPassword/recoverPassword.vue

75
pages/start/recoverPassword/recoverPassword.vue

@ -56,15 +56,15 @@
/>
<input
class="input-field"
type="text"
:type="newPasswordLookFirst ? 'text' : 'password'"
placeholder="输入新密码"
v-model="newPassword"
v-model="newPasswordFirst"
/>
<image
class="input-icon-eye"
@click="newPasswordLookFirst=!newPasswordLookFirst"
@click="newPasswordLookFirst = !newPasswordLookFirst"
:src="
newPasswordLookFirst
!newPasswordLookFirst
? '../../../static/icons/unlook.png'
: '../../../static/icons/look.png'
"
@ -79,15 +79,15 @@
/>
<input
class="input-field"
type="text"
:type="newPasswordLookSecond ? 'text' : 'password'"
placeholder="再次确认"
v-model="password"
v-model="newPasswordSecond"
/>
<image
class="input-icon-eye"
@click="newPasswordLookSecond=!newPasswordLookSecond"
@click="newPasswordLookSecond = !newPasswordLookSecond"
:src="
newPasswordLookSecond
!newPasswordLookSecond
? '../../../static/icons/unlook.png'
: '../../../static/icons/look.png'
"
@ -236,7 +236,8 @@ import { verificationPhone, verificationEmail } from "../login/verification";
const type = ref("member");
const email = ref("");
const password = ref("");
const newPassword = ref("");
const newPasswordFirst = ref("");
const newPasswordSecond = ref("");
const phone = ref("");
const country = ref("+86");
const agreed = ref(false);
@ -293,36 +294,29 @@ function switchPhone() {
switchType.value = "Phone";
}
// function register() {
// if (switchType.value === "Email") {
// //
// if (!email.value) {
// uni.showToast({
// title: "",
// icon: "none",
// });
// return;
// }
// //
// console.log(":", email.value);
// }
// if (switchType.value === "Phone") {
// //
// if (!phone.value) {
// uni.showToast({
// title: "",
// icon: "none",
// });
// return;
// }
// //
// console.log(":", phone.value);
// }
// }
function register() {
if (isRecovering.value) {
if(!newPasswordFirst.value || !newPasswordSecond.value){
uni.showToast({
title: "密码不能为空",
icon: "none",
});
return;
}
if (newPasswordFirst.value !== newPasswordSecond.value) {
uni.showToast({
title: "前后密码不一致",
icon: "none",
});
return;
}
//
return;
}
if (switchType.value === "Phone") {
//
if (!phone.value) {
@ -384,11 +378,7 @@ function register() {
console.log("登录:", email.value);
}
// if (!agreed.value) {
// //
// agreementPopup.value.open();
// return;
// }
isRecovering.value = !isRecovering.value;
@ -575,7 +565,6 @@ function handleAgree() {
checkboxUrl.value = "../../../static/icons/Check-one-true.png";
//
}
</script>
<style scoped>

Loading…
Cancel
Save