diff --git a/client/src/pages/login/login.vue b/client/src/pages/login/login.vue index 975cce3..291112e 100644 --- a/client/src/pages/login/login.vue +++ b/client/src/pages/login/login.vue @@ -47,7 +47,7 @@ ✓ - 登录即表示同意 + 我已阅读并同意 《用户协议》 和 《隐私政策》 diff --git a/client/src/pages/payment/payment.vue b/client/src/pages/payment/payment.vue index 1879495..88e51b4 100644 --- a/client/src/pages/payment/payment.vue +++ b/client/src/pages/payment/payment.vue @@ -69,13 +69,22 @@ class="pay-btn" :loading="loading" :disabled="loading" + :class="{ unagreed: !payAgreed }" @click="handlePay" > 立即支付 ¥{{ currentPrice }} - - 点击支付即表示同意《用户协议》和《隐私政策》 - + + + ✓ + + + 我已阅读并同意 + 《用户协议》 + 和 + 《隐私政策》 + + @@ -127,6 +136,7 @@ const currentPrice = computed(() => PLAN_MAP[selectedPlan.value].price) const currentProductId = computed(() => PLAN_MAP[selectedPlan.value].productId) const loading = ref(false) +const payAgreed = ref(false) // 协议勾选:默认不勾选,用户自主选择(审核合规) // H5 支付相关状态 const h5PayUrl = ref('') const showH5Fallback = ref(false) @@ -143,7 +153,15 @@ function isH5() { return false } +async function openAgreement(type) { + uni.navigateTo({ url: '/pages/agreement/agreement?type=' + (type || 'terms') }) +} + async function handlePay() { + if (!payAgreed.value) { + uni.showToast({ title: '请先阅读并勾选同意《用户协议》和《隐私政策》', icon: 'none' }) + return + } if (!userStore.isLoggedIn) { uni.showToast({ title: '请先登录', icon: 'none' }) return @@ -576,4 +594,17 @@ onShareAppMessage(() => ({ padding: 8px; } } - \ No newline at end of file + +