修复会员旧档迁移与周期权益

修正旧月季年会员迁移到新同级档位的购买判定

修正 active 升级后续周期天数切换为新商品配置

修正 mock 立即结算订单先按支付前会员状态定价

修正会员商品周期泥点文案按周期天数展示

补充会员迁移升级与前端周期文案测试
This commit is contained in:
2026-07-09 18:16:34 +08:00
parent 104c376d6e
commit 12ba0e95f3
4 changed files with 303 additions and 39 deletions
@@ -152,6 +152,42 @@ test('profile funds ViewModel formats recharge product and membership labels', (
}),
),
).toBe('每月200泥点');
expect(
buildRechargeProductValueLabel(
buildRechargeProduct({
kind: 'membership',
pointsAmount: 0,
bonusPoints: 0,
durationDays: 7,
membershipPeriodPoints: 80,
membershipPeriodDays: 7,
}),
),
).toBe('每周80泥点');
expect(
buildRechargeProductValueLabel(
buildRechargeProduct({
kind: 'membership',
pointsAmount: 0,
bonusPoints: 0,
durationDays: 14,
membershipPeriodPoints: 300,
membershipPeriodDays: 14,
}),
),
).toBe('每14天300泥点');
expect(
buildRechargeProductValueLabel(
buildRechargeProduct({
kind: 'membership',
pointsAmount: 0,
bonusPoints: 0,
durationDays: 90,
membershipPeriodPoints: 1200,
membershipPeriodDays: 90,
}),
),
).toBe('每90天1200泥点');
expect(buildMembershipLabel(buildMembership(), (value) => value)).toBe(
'普通用户',
);