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