diff --git a/openspec/changes/update-july-h5-c-iteration/specs/asset-realname-flow/spec.md b/openspec/changes/update-july-h5-c-iteration/specs/asset-realname-flow/spec.md index c5fee1c..00820e0 100644 --- a/openspec/changes/update-july-h5-c-iteration/specs/asset-realname-flow/spec.md +++ b/openspec/changes/update-july-h5-c-iteration/specs/asset-realname-flow/spec.md @@ -20,7 +20,8 @@ The H5/C client SHALL use `GET /api/c/v1/asset/info?identifier=...` as the sourc - **WHEN** asset information returns `effective_realname_policy = after_order` - **THEN** the client SHALL allow the policy-defined post-order flow to proceed without applying a before-order block -- **AND** the client SHALL display the returned real-name status and retain the existing real-name action entry when completion is needed +- **AND** the client SHALL display the returned real-name status +- **AND** selecting the homepage real-name entry SHALL show a confirmation prompt and allow the user to navigate to package ordering instead of entering real-name authentication directly #### Scenario: Device status is resolved from server output diff --git a/openspec/changes/update-july-h5-c-iteration/tasks.md b/openspec/changes/update-july-h5-c-iteration/tasks.md index 2d73278..8285d00 100644 --- a/openspec/changes/update-july-h5-c-iteration/tasks.md +++ b/openspec/changes/update-july-h5-c-iteration/tasks.md @@ -12,6 +12,7 @@ - [x] 2.2 Drive real-name prompts, status labels, and order gates from `effective_realname_policy`, `realname_required`, and `real_name_status` - [x] 2.3 Remove local card/device real-name policy inference while preserving the existing real-name link flow - [x] 2.4 Replace current-package-only expiry display with `estimated_final_expires_at` and apply backend expiry status/highlight fields +- [x] 2.5 Redirect the homepage real-name entry to package ordering after confirmation when the effective policy is `after_order` ## 3. Package purchase and renewal diff --git a/pages/index/index.vue b/pages/index/index.vue index 53a8248..36bba73 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -196,6 +196,7 @@ let alreadyBindPhone = ref(false); let boundPhone = ref(''); let realNameStatus = ref(''); + let effectiveRealnamePolicy = ref('none'); let wifi_info = reactive({ ssid: '', pwd: '' @@ -274,6 +275,7 @@ const currentCard = resolveCurrentCard(data.cards || []); isRealName.value = Number(data.real_name_status) === 1; realNameStatus.value = isRealName.value ? '已实名' : '未实名'; + effectiveRealnamePolicy.value = data.effective_realname_policy || 'none'; userStore.setRealNameStatus(data.real_name_status); boundPhone.value = data.bound_phone || ''; alreadyBindPhone.value = !!data.bound_phone; @@ -772,6 +774,20 @@ }); break; case 'authentication': + if (effectiveRealnamePolicy.value === 'after_order') { + uni.showModal({ + title: '提示', + content: '当前认证策略为先充值后实名,请先订购套餐后再进行实名认证。是否前往套餐订购页面?', + confirmText: '去订购', + cancelText: '取消', + success: ({ confirm }) => { + if (confirm) { + uni.navigateTo({ url: '/pages/package-order/package-order' }); + } + } + }); + break; + } uni.navigateTo({ url: '/pages/auth/auth' });