|
|
@ -56,15 +56,15 @@ |
|
|
/> |
|
|
/> |
|
|
<input |
|
|
<input |
|
|
class="input-field" |
|
|
class="input-field" |
|
|
type="text" |
|
|
|
|
|
|
|
|
:type="newPasswordLookFirst ? 'text' : 'password'" |
|
|
placeholder="输入新密码" |
|
|
placeholder="输入新密码" |
|
|
v-model="newPassword" |
|
|
|
|
|
|
|
|
v-model="newPasswordFirst" |
|
|
/> |
|
|
/> |
|
|
<image |
|
|
<image |
|
|
class="input-icon-eye" |
|
|
class="input-icon-eye" |
|
|
@click="newPasswordLookFirst=!newPasswordLookFirst" |
|
|
|
|
|
|
|
|
@click="newPasswordLookFirst = !newPasswordLookFirst" |
|
|
:src=" |
|
|
:src=" |
|
|
newPasswordLookFirst |
|
|
|
|
|
|
|
|
!newPasswordLookFirst |
|
|
? '../../../static/icons/unlook.png' |
|
|
? '../../../static/icons/unlook.png' |
|
|
: '../../../static/icons/look.png' |
|
|
: '../../../static/icons/look.png' |
|
|
" |
|
|
" |
|
|
@ -79,15 +79,15 @@ |
|
|
/> |
|
|
/> |
|
|
<input |
|
|
<input |
|
|
class="input-field" |
|
|
class="input-field" |
|
|
type="text" |
|
|
|
|
|
|
|
|
:type="newPasswordLookSecond ? 'text' : 'password'" |
|
|
placeholder="再次确认" |
|
|
placeholder="再次确认" |
|
|
v-model="password" |
|
|
|
|
|
|
|
|
v-model="newPasswordSecond" |
|
|
/> |
|
|
/> |
|
|
<image |
|
|
<image |
|
|
class="input-icon-eye" |
|
|
class="input-icon-eye" |
|
|
@click="newPasswordLookSecond=!newPasswordLookSecond" |
|
|
|
|
|
|
|
|
@click="newPasswordLookSecond = !newPasswordLookSecond" |
|
|
:src=" |
|
|
:src=" |
|
|
newPasswordLookSecond |
|
|
|
|
|
|
|
|
!newPasswordLookSecond |
|
|
? '../../../static/icons/unlook.png' |
|
|
? '../../../static/icons/unlook.png' |
|
|
: '../../../static/icons/look.png' |
|
|
: '../../../static/icons/look.png' |
|
|
" |
|
|
" |
|
|
@ -236,7 +236,8 @@ import { verificationPhone, verificationEmail } from "../login/verification"; |
|
|
const type = ref("member"); |
|
|
const type = ref("member"); |
|
|
const email = ref(""); |
|
|
const email = ref(""); |
|
|
const password = ref(""); |
|
|
const password = ref(""); |
|
|
const newPassword = ref(""); |
|
|
|
|
|
|
|
|
const newPasswordFirst = ref(""); |
|
|
|
|
|
const newPasswordSecond = ref(""); |
|
|
const phone = ref(""); |
|
|
const phone = ref(""); |
|
|
const country = ref("+86"); |
|
|
const country = ref("+86"); |
|
|
const agreed = ref(false); |
|
|
const agreed = ref(false); |
|
|
@ -293,36 +294,29 @@ function switchPhone() { |
|
|
switchType.value = "Phone"; |
|
|
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() { |
|
|
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 (switchType.value === "Phone") { |
|
|
// 登录逻辑 |
|
|
// 登录逻辑 |
|
|
if (!phone.value) { |
|
|
if (!phone.value) { |
|
|
@ -384,11 +378,7 @@ function register() { |
|
|
console.log("登录:", email.value); |
|
|
console.log("登录:", email.value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// if (!agreed.value) { |
|
|
|
|
|
// // 显示同意弹窗 |
|
|
|
|
|
// agreementPopup.value.open(); |
|
|
|
|
|
// return; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isRecovering.value = !isRecovering.value; |
|
|
isRecovering.value = !isRecovering.value; |
|
|
|
|
|
|
|
|
@ -575,7 +565,6 @@ function handleAgree() { |
|
|
checkboxUrl.value = "../../../static/icons/Check-one-true.png"; |
|
|
checkboxUrl.value = "../../../static/icons/Check-one-true.png"; |
|
|
// 继续登录流程 |
|
|
// 继续登录流程 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
|
|