From 8fc4f0c7e665ee0482dbd2ec9b63ca1f32530714 Mon Sep 17 00:00:00 2001 From: gww Date: Mon, 26 Jan 2026 16:21:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8B=BE=E9=80=89=E9=98=85=E8=AF=BB=E5=B9=B6?= =?UTF-8?q?=E5=90=8C=E6=84=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/auth.tsx | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/app/auth.tsx b/app/auth.tsx index 7de89ec..a65273d 100644 --- a/app/auth.tsx +++ b/app/auth.tsx @@ -9,6 +9,7 @@ import { APP_VERSION } from '@/app.config' import BannerSection from '@/components/BannerSection' import { phoneNumber, setAuthToken } from '@/lib/auth' import { isValidPhone } from '@/utils' +import { openUrl } from '@/utils/webview-helper' const APP_NAME = '多米' @@ -17,6 +18,7 @@ export default function Auth() { const [code, setCode] = useState('') const [loading, setLoading] = useState(false) const [countdown, setCountdown] = useState(0) + const [agreed, setAgreed] = useState(false) const canSendCode = useMemo(() => { return isValidPhone(phone) @@ -76,6 +78,11 @@ export default function Auth() { return } + if (!agreed) { + Toast.show({ title: '请先阅读并同意服务条款和隐私协议' }) + return + } + setLoading(true) try { // 使用 better-auth 的 phoneNumber.verify 进行验证和登录 @@ -104,7 +111,7 @@ export default function Auth() { } finally { setLoading(false) } - }, [phone, code]) + }, [phone, code, agreed]) return ( @@ -184,6 +191,31 @@ export default function Auth() { + + setAgreed(!agreed)} + className={`size-[20px] items-center justify-center border-[2px] border-black ${agreed ? 'bg-black' : 'bg-white'}`} + > + {agreed && } + + + 已阅读并同意 + openUrl('https://mixvideo.bowong.cc/terms', '服务条款')} + > + 服务条款 + + + openUrl('https://mixvideo.bowong.cc/privacy', '隐私协议')} + > + 隐私协议 + + + +