This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Change: 更新资产信息当前生效套餐的到期计时基准展示
|
||||
|
||||
## Why
|
||||
|
||||
资产信息页的“当前生效套餐”依赖 `GET /api/admin/assets/:identifier/current-package` 获取套餐详情。后端现已在该接口中新增返回 `expiry_base` 字段,用于标识套餐到期时间的计时基准,但当前前端侧还没有建立对应的契约与展示规范。
|
||||
|
||||
如果不先补齐这份 spec,后续实现时容易出现类型未对齐、数据映射丢失,或页面根据开始/到期时间自行推断口径的情况,导致运营人员无法直接判断套餐是“实名激活时起算”还是“购买时起算”。
|
||||
|
||||
## What Changes
|
||||
|
||||
- 为资产信息页“当前生效套餐”补充 `expiry_base` 契约规范:
|
||||
- `GET /api/admin/assets/:identifier/current-package` 支持返回 `expiry_base`
|
||||
- 前端当前套餐类型与页面状态需要保留该字段
|
||||
- 为资产信息页“当前生效套餐”补充“到期计时基准”展示规范:
|
||||
- `from_activation` 显示为“实名激活时起算”
|
||||
- `from_purchase` 显示为“购买时起算”
|
||||
- 字段为空或未知时显示稳定占位内容
|
||||
- 明确页面必须优先使用后端返回的 `expiry_base`,不得根据 `start_time`、`expire_time` 等字段自行推断
|
||||
|
||||
## Impact
|
||||
|
||||
- Affected specs:
|
||||
- `asset-information`
|
||||
- Affected code:
|
||||
- `src/types/api/asset.ts`
|
||||
- `src/views/asset-management/asset-information/composables/useAssetInfo.ts`
|
||||
- `src/views/asset-management/asset-information/components/CurrentPackageCard.vue`
|
||||
- Dependencies:
|
||||
- `GET /api/admin/assets/:identifier/current-package` 已新增返回 `expiry_base`
|
||||
Reference in New Issue
Block a user