From 8914d65fbb8cf4cdfce8bca2f647ba9b127167e9 Mon Sep 17 00:00:00 2001 From: huppygo Date: Sat, 22 Mar 2025 12:02:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8B=92=E7=BB=9D=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=8D=8F=E8=AE=AE=E4=B8=8E=E9=9A=90=E7=A7=81=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=EF=BC=8C=E8=A1=A5=E5=85=85=E7=9B=B8=E5=85=B3=E9=80=BB?= =?UTF-8?q?=E8=BE=91=20=E6=BB=A1=E8=B6=B3=E9=83=A8=E5=88=86=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=88=86=E5=8F=91=E5=B8=82=E5=9C=BA=E7=9A=84=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E9=9C=80=E6=B1=82=20=E6=8B=92=E7=BB=9D=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E7=82=B9=E5=87=BB=E5=8F=91=E9=80=81=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E7=99=BB=E5=BD=95=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=8B=92=E7=BB=9D=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../s-auth-modal/components/account-login.vue | 16 ++-- .../s-auth-modal/components/sms-login.vue | 35 +++++-- .../components/s-auth-modal/s-auth-modal.vue | 94 +++++++++++++++---- 3 files changed, 111 insertions(+), 34 deletions(-) diff --git a/sheep/components/s-auth-modal/components/account-login.vue b/sheep/components/s-auth-modal/components/account-login.vue index 579614c3..d5d60563 100644 --- a/sheep/components/s-auth-modal/components/account-login.vue +++ b/sheep/components/s-auth-modal/components/account-login.vue @@ -60,8 +60,8 @@ const props = defineProps({ agreeStatus: { - type: Boolean, - default: false, + type: [Boolean, null], + default: null, }, }); @@ -87,10 +87,14 @@ }); if (!validate) return; - // 同意协议 - if (!props.agreeStatus) { - emits('onConfirm', true) - sheep.$helper.toast('请勾选同意'); + // 检查协议状态 + if (props.agreeStatus !== true) { + emits('onConfirm', true); + if (props.agreeStatus === false) { + sheep.$helper.toast('您已拒绝协议,无法继续登录'); + } else { + sheep.$helper.toast('请选择是否同意协议'); + } return; } diff --git a/sheep/components/s-auth-modal/components/sms-login.vue b/sheep/components/s-auth-modal/components/sms-login.vue index 0651b780..8b728acd 100644 --- a/sheep/components/s-auth-modal/components/sms-login.vue +++ b/sheep/components/s-auth-modal/components/sms-login.vue @@ -31,9 +31,9 @@