feat: 套餐加油包变子
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Change: Update asset package history hierarchy
|
||||
|
||||
## Why
|
||||
|
||||
资产套餐历史接口已从平铺使用记录升级为主套餐与关联加油包的关系组。当前 H5 页面把每一条记录当作独立卡片,并以返回条数推断是否还有下一页,无法正确展示层级、默认展开状态和按关系组分页的结果。
|
||||
|
||||
## What Changes
|
||||
|
||||
- Consume `children` recursively and render a main-package card with its associated addon-package cards.
|
||||
- Honor `expand_by_default` for the initial expanded state and allow users to expand or collapse a group without losing any child records.
|
||||
- Preserve and render relationship metadata needed by the contract, including `master_usage_id` for addons and `relationship_status` / `relationship_status_name` for a `master_missing` standalone item.
|
||||
- Use the response pagination shell (`page`, `size`, `total`) as top-level relationship-group pagination; never infer completion from the number of returned nodes.
|
||||
- Keep the complete returned group when the API filter matches either its main package or one of its addons. The client will pass filters through unchanged and will not re-filter individual nodes.
|
||||
- Update the local API documentation to match the hierarchical response fields and pagination shell.
|
||||
|
||||
## Impact
|
||||
|
||||
- Affected capability: `asset-package-history-display` (new)
|
||||
- Affected code: `pages/asset-package-history/asset-package-history.vue`, `api/modules/asset.js`, `docs/API.md`
|
||||
- Affected API: `GET /api/c/v1/asset/package-history`
|
||||
- No backend filtering, relationship recovery, or error-code mapping is implemented in this H5 repository; the client continues to surface the API's unified error response through the shared request layer.
|
||||
Reference in New Issue
Block a user