# Change: Update July H5/C iteration behavior ## Why 七月迭代要求 H5/C 端将登录、实名、支付、套餐续费、到期提醒、站内通知和订单展示统一切换为以后端业务结果为准。当前页面和 API 封装仍存在按资产类型或前端本地规则判断的逻辑,部分订单提交也没有始终传递用户选择的支付方式,容易造成错误引导、支付参数不完整和订单信息展示失真。 ## What Changes - 在资产校验登录流程中处理店铺 C 端登录限制;被限制时展示后端业务错误,不保存或继续使用本次登录的资产 Token。 - 使用资产信息接口返回的 `effective_realname_policy`、`realname_required` 和 `real_name_status` 驱动实名状态展示及下单前后的实名流程。 - 使用 `allowed_payment_methods` 渲染支付方式,并在套餐下单、强充校验和钱包充值时按后端规则提交 `payment_method`;微信支付按要求提交 `app_type`。 - 普通套餐列表隐藏下架套餐,同时允许正在使用下架套餐的老客户通过 `current_package_id` 或历史订单 `package_ids` 复用 `/api/c/v1/orders/create` 续费。 - 在资产详情、资产列表等页面展示后端计算的 `estimated_final_expires_at`,并使用临期字段进行高亮。 - 接入 C 端站内通知的未读数、列表和单条已读接口,展示套餐临期和换货通知,并按后端临期等级处理提醒优先级。 - 在订单列表和详情展示后端返回的 `purchase_role` 与 `asset_identifier`;设备标识按 `virtual_no` 优先、`imei` 兜底,不使用 SN 冒充。 - 保持金额接口以分传输、页面以元展示,并在支付参数或支付链接返回后通过订单状态查询确认支付结果。 本提案不包含首页隐藏设备 ICCID、行业卡未实名复机、状态同步/运营商回调、企微审批回调、原路退款、跨品类换货、分销码或佣金提现等明确排除项。H5/C 端不调用企微审批回调接口。 ## Capabilities ### New Capabilities - `c-login-access`: Enforce the shop-level C-end login restriction during asset verification - `asset-realname-flow`: Drive real-name behavior from backend asset policy and status - `asset-expiry-display`: Display the estimated final package expiry and expiry state - `backend-driven-payment`: Render and submit payment methods from backend policy - `legacy-package-renewal`: Allow eligible existing customers to renew discontinued packages - `c-notification-reminders`: Surface expiry and exchange notifications in the H5/C client - `order-display-fields`: Render order role and server-provided asset identifier snapshots ### Modified Capabilities - `personal-notifications`: This change consumes the notification endpoints and does not redefine their backend visibility, pagination, or read-state contract. Coordinate with the existing `add-personal-notifications` change. ## Impact - Affected code: `pages/login/login.vue`, `pages/index/index.vue`, `pages/auth/auth.vue`, `pages/switch/switch.vue`, `pages/package-order/package-order.vue`, `pages/my-wallet/my-wallet.vue`, `pages/order-list/order-list.vue`, `pages/notifications/notifications.vue`, related notification/payment components, and `api/modules/{auth,asset,order,wallet,notification}.js` - Affected APIs: `/api/c/v1/auth/verify-asset`, `/api/c/v1/asset/info`, `/api/c/v1/wallet/recharge-check`, `/api/c/v1/orders/create`, `/api/c/v1/wallet/recharge`, `/api/c/v1/orders`, `/api/c/v1/orders/{id}`, `/api/c/v1/notifications/unread-count`, `/api/c/v1/notifications`, and `/api/c/v1/notifications/{id}/read` - No new backend endpoint is required; the client adopts the response fields and request rules described in `docs/所需接口文档/new-api.md` and the July H5/C change description. - Existing WeChat payment parameter handling, Alipay payment-link handling, wallet payment, payment submit guards, and notification list APIs must remain compatible.