fix(充值商品): 移除已退役的 bonus_points / duration_days 入参

- 后台 upsert 请求 DTO 与 SpacetimeDB procedure 入参移除 bonus_points、duration_days(评审第 19 条)
- 充点商品固定「¥1 = 10 泥点、无首充赠送」,module 落库统一写 0,保留退役列兼容存量 schema
- 删除 InvalidRechargeProductFields 校验与错误文案;api-server / spacetime-client 同步收敛
- admin-web 表单移除「首充赠送」输入与状态,列表改为只展示基础泥点
- scripts/admin-web-fake-api.mjs 假数据同步 bonusPoints: 0
This commit is contained in:
2026-10-04 21:33:39 +08:00
parent dcaab089cc
commit 284b656b59
12 changed files with 21 additions and 77 deletions
+6 -11
View File
@@ -800,21 +800,16 @@ function route(pathname, method, url, requestBody = '') {
};
}
if (pathname === '/admin/api/profile/recharge-products') {
const product = (
productId,
title,
priceCents,
pointsAmount,
bonusPoints,
) => ({
const product = (productId, title, priceCents, pointsAmount) => ({
productId,
title,
priceCents,
kind: 'points',
pointsAmount,
bonusPoints,
// 已退役列:真实后端固定写 0,假数据也保持一致。
bonusPoints: 0,
durationDays: 0,
badgeLabel: bonusPoints ? `赠送 ${bonusPoints}` : '',
badgeLabel: '',
description: `${pointsAmount} 泥点`,
tier: 'none',
membershipPeriodPoints: 0,
@@ -830,8 +825,8 @@ function route(pathname, method, url, requestBody = '') {
});
return {
entries: [
product('prod_points_600', '600 泥点', 3_000, 600, 0),
product('prod_points_1200', '1200 泥点 + 赠送 100', 6_000, 1_200, 100),
product('prod_points_600', '600 泥点', 3_000, 600),
product('prod_points_1200', '1200 泥点', 6_000, 1_200),
],
};
}