Merge remote-tracking branch 'origin/feature/0905_登录注册流程重构' into test
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
padding: 0 16px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
}
|
||||
.ant-btn-default {
|
||||
&:disabled {
|
||||
@ -68,12 +69,12 @@
|
||||
outline: none;
|
||||
outline-offset: unset;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: $color-primary-7 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-wave {
|
||||
background: $color-primary-7 !important;
|
||||
--wave-color: $color-primary-7;
|
||||
}
|
||||
&.ant-btn-dangerous {
|
||||
background-color: $color-error !important;
|
||||
&:disabled {
|
||||
@ -83,6 +84,10 @@
|
||||
&:hover {
|
||||
background-color: $color-error-5 !important;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: $color-error-5 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.ant-btn-background-ghost {
|
||||
@ -132,7 +137,7 @@
|
||||
color: $color-primary-5 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.ant-btn-dangerous {
|
||||
border: 1px solid $color-error !important;
|
||||
color: $color-error !important;
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
|
||||
<FormItem class="mt-32px">
|
||||
<div class="text-12px flex justify-center items-center mb-16px">
|
||||
<Checkbox v-model:checked="hasCheck" class="mr-8px"></Checkbox>
|
||||
<Checkbox v-model:checked="hasAgree" class="mr-8px"></Checkbox>
|
||||
<span class="text-12px color-#737478 font-400 lh-20px font-family-regular"
|
||||
>登录即代表同意<span class="color-#6D4CFE"> 用户协议 </span>和<span class="color-#6D4CFE">
|
||||
隐私政策</span
|
||||
@ -70,7 +70,7 @@
|
||||
<div>
|
||||
<Button
|
||||
v-show="!isCaptchaLogin"
|
||||
class="!color-#939499 !p-0 !h-22px hover:color-#6D4CFE"
|
||||
class="!color-#939499 !p-0 !h-22px !hover:color-#6D4CFE !active:color-#573DCB"
|
||||
size="small"
|
||||
type="text"
|
||||
@click="onForgetPassword"
|
||||
@ -81,7 +81,7 @@
|
||||
|
||||
<Button
|
||||
type="text"
|
||||
class="!color-#939499 !p-0 !h-22px hover:color-#6D4CFE"
|
||||
class="!color-#939499 !p-0 !h-22px !hover:color-#6D4CFE !active:color-#573DCB"
|
||||
size="small"
|
||||
@click="onRegister"
|
||||
>
|
||||
@ -134,7 +134,7 @@ const isLogin = ref(true);
|
||||
const isVerificationVisible = ref(false);
|
||||
const hasGetCode = ref(false);
|
||||
const submitting = ref(false);
|
||||
const hasCheck = ref(false);
|
||||
const hasAgree = ref(false);
|
||||
const mobileNumber = ref('');
|
||||
const selectAccountModalRef = ref(null);
|
||||
const accounts = ref([]);
|
||||
@ -215,10 +215,10 @@ const clearErrorMsg = () => {
|
||||
|
||||
const disabledSubmitBtn = computed(() => {
|
||||
if (isCaptchaLogin.value) {
|
||||
return !hasCheck.value || !isLegalMobile.value || !loginForm.captcha.trim() || !/^\d{6}$/.test(loginForm.captcha);
|
||||
return !hasAgree.value || !isLegalMobile.value || !loginForm.captcha.trim() || !/^\d{6}$/.test(loginForm.captcha);
|
||||
}
|
||||
// 密码登录时的验证逻辑
|
||||
return !hasCheck.value || !isLegalMobile.value || !loginForm.password.trim();
|
||||
return !hasAgree.value || !isLegalMobile.value || !loginForm.password.trim();
|
||||
});
|
||||
|
||||
const validateField = (field: string) => {
|
||||
@ -299,7 +299,7 @@ const handleSubmit = async () => {
|
||||
// 校验所有字段
|
||||
await formRef.value.validate();
|
||||
|
||||
if (!hasCheck.value) {
|
||||
if (!hasAgree.value) {
|
||||
message.error('请先勾选同意用户协议');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -44,16 +44,17 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.btn-login) {
|
||||
&:disabled {
|
||||
background-color: #c5b7ff !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
background-color: $color-primary-3 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//:deep(.btn-login) {
|
||||
// //&:disabled {
|
||||
// // background-color: #c5b7ff !important;
|
||||
// //}
|
||||
// //&:not(:disabled) {
|
||||
// // &:hover {
|
||||
// // background-color: $color-primary-3 !important;
|
||||
// // }
|
||||
// //}
|
||||
//}
|
||||
.login-bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
|
||||
Reference in New Issue
Block a user