fix: 认证策略是先充值后实名, 首页入口
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m14s

This commit is contained in:
luo
2026-08-05 10:51:23 +08:00
parent e4278d3883
commit f9d8a107a4
3 changed files with 19 additions and 1 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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'
});