feat: C 端套餐沉默期展示与自助延期
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 23m46s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 23m46s
- 套餐历史展示沉默期状态、截止日期、累计延期与调整审批中,可延期时显示延期入口 - 新增延期页:资格、档位与自定义天数试算、支付方式、下单(request_id 幂等) - 支付宝走现有支付页;微信为链接时在微信外直接跳转,否则展示二维码与复制链接 - 新增我的延期订单列表与详情、沉默期记录,沉默期错误码转客户提示
This commit is contained in:
@@ -28,8 +28,22 @@ export const normalizeAssetInfo = (data = {}) => {
|
||||
};
|
||||
};
|
||||
|
||||
const toBool = (value) => value === true || value === 1 || value === 'true';
|
||||
|
||||
// 沉默期对象:总开关关闭或不适用时后端不返回,保持为 null。
|
||||
export const normalizePackageSilence = (silence) => {
|
||||
if (!silence || typeof silence !== 'object') return null;
|
||||
return {
|
||||
...silence,
|
||||
extendable: toBool(silence.extendable),
|
||||
silence_adjust_pending: toBool(silence.silence_adjust_pending),
|
||||
silence_extended_days: Number(silence.silence_extended_days) || 0
|
||||
};
|
||||
};
|
||||
|
||||
const normalizePackageHistoryNode = (node = {}) => ({
|
||||
...node,
|
||||
silence: normalizePackageSilence(node.silence),
|
||||
children: Array.isArray(node.children)
|
||||
? node.children.filter(child => Number(child?.status) !== 4).map(normalizePackageHistoryNode)
|
||||
: [],
|
||||
|
||||
Reference in New Issue
Block a user