fix: 隐私协议合规整改——登录页文案改'我已阅读并同意';订阅支付页新增默认不勾选协议勾选框,未勾选拦截支付并引导(应对审核:不得默认自动同意)
This commit is contained in:
@@ -69,13 +69,22 @@
|
||||
class="pay-btn"
|
||||
:loading="loading"
|
||||
:disabled="loading"
|
||||
:class="{ unagreed: !payAgreed }"
|
||||
@click="handlePay"
|
||||
>
|
||||
<text class="pay-btn-text">立即支付 ¥{{ currentPrice }}</text>
|
||||
</button>
|
||||
<text class="pay-agreement">
|
||||
点击支付即表示同意《用户协议》和《隐私政策》
|
||||
</text>
|
||||
<view class="pay-agreement-row">
|
||||
<view class="pay-checkbox" :class="{ checked: payAgreed }" @click="payAgreed = !payAgreed">
|
||||
<text v-if="payAgreed">✓</text>
|
||||
</view>
|
||||
<text class="pay-agreement-text">
|
||||
我已阅读并同意
|
||||
<text class="pay-agreement-link" @click.stop="openAgreement('terms')">《用户协议》</text>
|
||||
和
|
||||
<text class="pay-agreement-link" @click.stop="openAgreement('privacy')">《隐私政策》</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer-spacer"></view>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
<style scoped>
|
||||
.pay-agreement-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; }
|
||||
.pay-checkbox {
|
||||
width: 18px; height: 18px; border-radius: 4px;
|
||||
border: 1.5px solid var(--text-muted); background: var(--glass-bg);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 12px; color: #fff; flex-shrink: 0;
|
||||
}
|
||||
.pay-checkbox.checked { background: var(--color-brand); border-color: var(--color-brand); }
|
||||
.pay-agreement-text { font-size: 11px; color: var(--text-tertiary); }
|
||||
.pay-agreement-link { color: var(--color-brand); }
|
||||
button.unagreed { opacity: 0.55; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user