fix: 真流量虚流量权限
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m42s

This commit is contained in:
sexygoat
2026-05-14 10:52:11 +08:00
parent 1690252740
commit 38cf7d12e9
29 changed files with 859 additions and 198 deletions

View File

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