From eaedfdd644ec89eb551313393e45b01aa56f52f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Mon, 26 Oct 2026 10:22:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=99=BB=E5=BD=95=E5=8D=8F=E8=AE=AE):=20?= =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E5=8B=BE=E9=80=89=E6=94=B9=E7=94=A8=20change?= =?UTF-8?q?=20=E5=90=8C=E6=AD=A5=20detail.value=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=20H5=20=E6=97=A0=E6=B3=95=E5=8B=BE=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免 click 冒泡/取反与原生 checkbox 状态打架,导致 protocol 被来回拨回。 Co-authored-by: Cursor --- .../src/pages/users/binding_phone/index.vue | 14 ++++++++++---- frontend/uni-app/src/pages/users/login/index.vue | 10 ++++++---- .../uni-app/src/pages/users/wechat_login/index.vue | 12 +++++++++--- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/frontend/uni-app/src/pages/users/binding_phone/index.vue b/frontend/uni-app/src/pages/users/binding_phone/index.vue index 116c7d574..3c1ca892e 100644 --- a/frontend/uni-app/src/pages/users/binding_phone/index.vue +++ b/frontend/uni-app/src/pages/users/binding_phone/index.vue @@ -41,9 +41,11 @@ - - {{$t(`已阅读并同意`)}} + + + + {{$t(`已阅读并同意`)}} {{$t(`《用户协议》`)}} {{$t(`与`)}}{{$t(`《隐私协议》`)}} @@ -315,7 +317,11 @@ async function code() { verifyRef.value.show(); return; } -function ChangeIsDefault() { +function ChangeIsDefault(e) { + const values = (e && e.detail && e.detail.value) || []; + protocol.value = values.length > 0; +} +function toggleProtocol() { protocol.value = !protocol.value; } function closeEdit() { diff --git a/frontend/uni-app/src/pages/users/login/index.vue b/frontend/uni-app/src/pages/users/login/index.vue index 4e7983dd1..00c6441f9 100644 --- a/frontend/uni-app/src/pages/users/login/index.vue +++ b/frontend/uni-app/src/pages/users/login/index.vue @@ -82,12 +82,13 @@ + - + {{ $t(`已阅读并同意`) }} - {{ $t(`《用户协议》`) }} + {{ $t(`《用户协议》`) }} {{ $t(`与`) }} - {{ $t(`《隐私协议》`) }} + {{ $t(`《隐私协议》`) }} @@ -181,7 +182,8 @@ onMounted(() => { // ---------- methods ---------- function ChangeIsDefault(e) { - protocol.value = !protocol.value; + const values = (e && e.detail && e.detail.value) || []; + protocol.value = values.length > 0; } function privacy(type) { uni.navigateTo({ diff --git a/frontend/uni-app/src/pages/users/wechat_login/index.vue b/frontend/uni-app/src/pages/users/wechat_login/index.vue index 8c2441913..ab0c393ce 100644 --- a/frontend/uni-app/src/pages/users/wechat_login/index.vue +++ b/frontend/uni-app/src/pages/users/wechat_login/index.vue @@ -59,17 +59,19 @@ - + + - {{ $t(`已阅读并同意`) }} + {{ $t(`已阅读并同意`) }} {{ $t(`《用户协议》`) }} @@ -328,6 +330,10 @@ function getAuthLogin() { }); } function ChangeIsDefault(e) { + const values = (e && e.detail && e.detail.value) || []; + protocol.value = values.length > 0; +} +function toggleProtocol() { protocol.value = !protocol.value; } function editSuccess() {