@tbox.cn/app-module-activity-play 1.0.0-alpha.8 → 1.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INTEGRATION.md +6 -4
- package/README.md +5 -3
- package/dist/chunk-CVZ4T5JN.js +471 -0
- package/dist/{chunk-HXO47NYM.js → chunk-YH6HTRSS.js} +7 -76
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -4
- package/dist/server/index.d.ts +207 -102
- package/dist/server/index.js +1 -3
- package/package.json +15 -7
- package/skills/activity-play/SKILL.md +10 -0
- package/src/client/cards/ListPresentation.tsx +83 -0
- package/src/client/cards/activity-play/ActivityDetailSheet.tsx +135 -0
- package/src/client/cards/activity-play/ActivityPlayCard.tsx +60 -54
- package/src/client/cards/activity-play-prize/ActivityPlayPrizeListCard.tsx +55 -44
- package/src/client/cards/activity-play-prize/PrizeDetailContent.tsx +33 -0
- package/src/client/cards/activity-play-prize/PrizeDetailSheet.tsx +52 -0
- package/src/client/cards/activity-play-prize/index.ts +0 -7
- package/src/client/cards/view.ts +16 -0
- package/src/client/index.ts +7 -11
- package/src/server/cards/index.ts +1 -3
- package/src/server/index.ts +2 -19
- package/src/server/prizes/cards.ts +6 -6
- package/src/server/prizes/tools.ts +4 -6
- package/src/server/tools.ts +1 -1
- package/tbox.module.json +0 -4
- package/tests/activity-card.test.tsx +156 -0
- package/tests/prizes-tools.test.ts +7 -4
- package/tests/prizes.test.ts +6 -12
- package/tests/routes.test.ts +13 -0
- package/tests/smoke.test.ts +7 -5
- package/tsup.config.ts +1 -0
- package/dist/chunk-KK4F22GE.js +0 -190
- package/src/client/cards/activity-play-prize/ActivityPlayPrizeDetailCard.tsx +0 -44
- package/src/server/cards/activity-play-prize-detail/meta.ts +0 -29
- package/src/server/cards/activity-play-prize-detail/samples.ts +0 -54
package/dist/chunk-KK4F22GE.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
// src/client/cards/view.ts
|
|
2
|
-
function activityPlayStatusText(status) {
|
|
3
|
-
switch (status) {
|
|
4
|
-
case "active":
|
|
5
|
-
return "\u8FDB\u884C\u4E2D";
|
|
6
|
-
case "not_started":
|
|
7
|
-
return "\u672A\u5F00\u59CB";
|
|
8
|
-
case "ended":
|
|
9
|
-
return "\u5DF2\u7ED3\u675F";
|
|
10
|
-
case "disabled":
|
|
11
|
-
return "\u5DF2\u4E0B\u7EBF";
|
|
12
|
-
case "unknown":
|
|
13
|
-
return "\u72B6\u6001\u672A\u77E5";
|
|
14
|
-
default:
|
|
15
|
-
return status;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
function activityPlayStatusTone(status) {
|
|
19
|
-
switch (status) {
|
|
20
|
-
case "active":
|
|
21
|
-
return "success";
|
|
22
|
-
case "not_started":
|
|
23
|
-
return "warning";
|
|
24
|
-
case "disabled":
|
|
25
|
-
case "unknown":
|
|
26
|
-
return "muted";
|
|
27
|
-
default:
|
|
28
|
-
return "muted";
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function formatActivityPlayTime(value) {
|
|
32
|
-
if (!value) return "";
|
|
33
|
-
const d = new Date(value);
|
|
34
|
-
if (Number.isNaN(d.getTime())) return value;
|
|
35
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
36
|
-
return `${d.getFullYear()}.${pad(d.getMonth() + 1)}.${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// src/client/cards/activity-play/ActivityPlayCard.tsx
|
|
40
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
41
|
-
var BADGE_TONE = {
|
|
42
|
-
success: "bg-success-soft text-success",
|
|
43
|
-
warning: "bg-warning-soft text-warning",
|
|
44
|
-
muted: "bg-neutral-soft text-muted-foreground"
|
|
45
|
-
};
|
|
46
|
-
function ActivityRow({ item }) {
|
|
47
|
-
const tone = activityPlayStatusTone(item.status);
|
|
48
|
-
return /* @__PURE__ */ jsx("div", { className: "ap-card__row border-t border-border py-2.5 first:border-t-0", children: /* @__PURE__ */ jsxs("div", { className: "ap-card__row-main", children: [
|
|
49
|
-
/* @__PURE__ */ jsxs("div", { className: "ap-card__row-title flex items-center gap-1.5", children: [
|
|
50
|
-
/* @__PURE__ */ jsx("strong", { className: "truncate text-sm text-foreground", children: item.title }),
|
|
51
|
-
/* @__PURE__ */ jsx("span", { className: `ap-badge ap-badge--${tone} shrink-0 rounded-full px-1.5 text-xs leading-4.5 ${BADGE_TONE[tone]}`, children: activityPlayStatusText(item.status) })
|
|
52
|
-
] }),
|
|
53
|
-
item.description && /* @__PURE__ */ jsx("p", { className: "ap-card__row-desc mt-1 line-clamp-2 text-xs leading-4.5 text-muted-foreground", children: item.description })
|
|
54
|
-
] }) });
|
|
55
|
-
}
|
|
56
|
-
function ActivityPlayCard(props) {
|
|
57
|
-
const { data } = props;
|
|
58
|
-
if (data.mode === "detail") {
|
|
59
|
-
const item = data.items[0];
|
|
60
|
-
if (!item) return null;
|
|
61
|
-
const range = [formatActivityPlayTime(item.startsAt), formatActivityPlayTime(item.endsAt)].filter(Boolean).join(" \u2014 ");
|
|
62
|
-
return /* @__PURE__ */ jsxs("section", { className: "ap-card ap-card--detail flex flex-col gap-2.5 bg-muted p-3", children: [
|
|
63
|
-
/* @__PURE__ */ jsx("span", { className: "ap-card__eyebrow text-xs leading-none tracking-wide text-muted-foreground", children: "\u6D3B\u52A8\u73A9\u6CD5" }),
|
|
64
|
-
/* @__PURE__ */ jsxs("div", { className: "ap-card__detail-head flex flex-wrap items-center gap-2", children: [
|
|
65
|
-
/* @__PURE__ */ jsx("strong", { className: "text-base text-foreground", children: item.title }),
|
|
66
|
-
/* @__PURE__ */ jsx("span", { className: `ap-badge ap-badge--${activityPlayStatusTone(item.status)} shrink-0 rounded-full px-1.5 text-xs leading-4.5 ${BADGE_TONE[activityPlayStatusTone(item.status)]}`, children: activityPlayStatusText(item.status) })
|
|
67
|
-
] }),
|
|
68
|
-
item.description && /* @__PURE__ */ jsx("p", { className: "ap-card__detail-desc text-xs leading-5 text-muted-foreground", children: item.description }),
|
|
69
|
-
item.imageUrl && /* @__PURE__ */ jsx("img", { className: "ap-card__cover max-h-45 w-full rounded-md object-cover", src: item.imageUrl, alt: `${item.title}\u5C01\u9762`, loading: "lazy" }),
|
|
70
|
-
range && /* @__PURE__ */ jsxs("p", { className: "ap-card__meta text-xs leading-4.5 text-muted-foreground", children: [
|
|
71
|
-
"\u6D3B\u52A8\u65F6\u95F4\uFF1A",
|
|
72
|
-
range
|
|
73
|
-
] })
|
|
74
|
-
] });
|
|
75
|
-
}
|
|
76
|
-
if (data.items.length === 0) {
|
|
77
|
-
return /* @__PURE__ */ jsxs("section", { className: "ap-card ap-card--list flex flex-col gap-2.5 bg-muted p-3", children: [
|
|
78
|
-
/* @__PURE__ */ jsx("span", { className: "ap-card__eyebrow text-xs leading-none tracking-wide text-muted-foreground", children: "\u6D3B\u52A8\u73A9\u6CD5" }),
|
|
79
|
-
/* @__PURE__ */ jsx("p", { className: "ap-card__empty text-xs leading-5 text-muted-foreground", children: "\u5F53\u524D\u5546\u573A\u6682\u65E0\u8FDB\u884C\u4E2D\u7684\u6D3B\u52A8\u73A9\u6CD5" })
|
|
80
|
-
] });
|
|
81
|
-
}
|
|
82
|
-
return /* @__PURE__ */ jsxs("section", { className: "ap-card ap-card--list flex flex-col gap-2.5 bg-muted p-3", children: [
|
|
83
|
-
/* @__PURE__ */ jsxs("span", { className: "ap-card__eyebrow text-xs leading-none tracking-wide text-muted-foreground", children: [
|
|
84
|
-
"\u6D3B\u52A8\u73A9\u6CD5\uFF08",
|
|
85
|
-
data.items.length,
|
|
86
|
-
"\uFF09"
|
|
87
|
-
] }),
|
|
88
|
-
/* @__PURE__ */ jsx("div", { className: "ap-card__list flex flex-col", children: data.items.map((item) => /* @__PURE__ */ jsx(ActivityRow, { item }, item.activityId)) })
|
|
89
|
-
] });
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// src/client/cards/activity-play-prize/ActivityPlayPrizeListCard.tsx
|
|
93
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
94
|
-
function statusLabel(value) {
|
|
95
|
-
return value === "UNKNOWN" ? "\u72B6\u6001\u672A\u77E5" : value;
|
|
96
|
-
}
|
|
97
|
-
function PrizeRow({ item }) {
|
|
98
|
-
return /* @__PURE__ */ jsx2("div", { className: "ap-card__row", children: /* @__PURE__ */ jsxs2("div", { className: "ap-card__row-main", children: [
|
|
99
|
-
/* @__PURE__ */ jsxs2("div", { className: "ap-card__row-title", children: [
|
|
100
|
-
/* @__PURE__ */ jsx2("strong", { children: item.title }),
|
|
101
|
-
/* @__PURE__ */ jsx2("span", { className: "ap-badge ap-badge--muted", children: statusLabel(item.claimStatus) })
|
|
102
|
-
] }),
|
|
103
|
-
/* @__PURE__ */ jsxs2("p", { className: "ap-card__row-desc", children: [
|
|
104
|
-
statusLabel(item.prizeType),
|
|
105
|
-
" \xB7 \u4F7F\u7528\u72B6\u6001 ",
|
|
106
|
-
statusLabel(item.useStatus),
|
|
107
|
-
item.wonAt ? ` \xB7 ${item.wonAt}` : ""
|
|
108
|
-
] })
|
|
109
|
-
] }) });
|
|
110
|
-
}
|
|
111
|
-
function ActivityPlayPrizeListCard(props) {
|
|
112
|
-
const { data } = props;
|
|
113
|
-
if (data.items.length === 0) {
|
|
114
|
-
return /* @__PURE__ */ jsxs2("section", { className: "ap-card ap-card--list", children: [
|
|
115
|
-
/* @__PURE__ */ jsx2("span", { className: "ap-card__eyebrow", children: "\u672C\u4EBA\u5956\u54C1" }),
|
|
116
|
-
/* @__PURE__ */ jsx2("p", { className: "ap-card__empty", children: data.noResultsReason ?? "\u6682\u65E0\u4E2D\u5956\u8BB0\u5F55" })
|
|
117
|
-
] });
|
|
118
|
-
}
|
|
119
|
-
return /* @__PURE__ */ jsxs2("section", { className: "ap-card ap-card--list", children: [
|
|
120
|
-
/* @__PURE__ */ jsxs2("span", { className: "ap-card__eyebrow", children: [
|
|
121
|
-
"\u672C\u4EBA\u5956\u54C1\uFF08",
|
|
122
|
-
data.total,
|
|
123
|
-
"\uFF09"
|
|
124
|
-
] }),
|
|
125
|
-
/* @__PURE__ */ jsx2("div", { className: "ap-card__list", children: data.items.map((item) => /* @__PURE__ */ jsx2(PrizeRow, { item }, item.prizeRecordRef)) }),
|
|
126
|
-
data.truncated && /* @__PURE__ */ jsxs2("p", { className: "ap-card__meta", children: [
|
|
127
|
-
"\u5171 ",
|
|
128
|
-
data.total,
|
|
129
|
-
" \u6761\u8BB0\u5F55\uFF0C\u5F53\u524D\u5C55\u793A\u524D ",
|
|
130
|
-
data.items.length,
|
|
131
|
-
" \u6761"
|
|
132
|
-
] })
|
|
133
|
-
] });
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// src/client/cards/activity-play-prize/ActivityPlayPrizeDetailCard.tsx
|
|
137
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
138
|
-
function statusLabel2(value) {
|
|
139
|
-
return value === "UNKNOWN" ? "\u72B6\u6001\u672A\u77E5" : value;
|
|
140
|
-
}
|
|
141
|
-
function ActivityPlayPrizeDetailCard(props) {
|
|
142
|
-
const { data } = props;
|
|
143
|
-
return /* @__PURE__ */ jsxs3("section", { className: "ap-card ap-card--detail", children: [
|
|
144
|
-
/* @__PURE__ */ jsx3("span", { className: "ap-card__eyebrow", children: "\u672C\u4EBA\u5956\u54C1" }),
|
|
145
|
-
/* @__PURE__ */ jsxs3("div", { className: "ap-card__detail-head", children: [
|
|
146
|
-
/* @__PURE__ */ jsx3("strong", { children: data.title }),
|
|
147
|
-
/* @__PURE__ */ jsx3("span", { className: "ap-badge ap-badge--muted", children: statusLabel2(data.claimStatus) })
|
|
148
|
-
] }),
|
|
149
|
-
/* @__PURE__ */ jsxs3("p", { className: "ap-card__row-desc", children: [
|
|
150
|
-
statusLabel2(data.prizeType),
|
|
151
|
-
" \xB7 \u4F7F\u7528\u72B6\u6001 ",
|
|
152
|
-
statusLabel2(data.useStatus),
|
|
153
|
-
data.wonAt ? ` \xB7 ${data.wonAt}` : ""
|
|
154
|
-
] }),
|
|
155
|
-
data.activityTitle && /* @__PURE__ */ jsxs3("p", { className: "ap-card__meta", children: [
|
|
156
|
-
"\u6765\u6E90\u6D3B\u52A8\uFF1A",
|
|
157
|
-
data.activityTitle
|
|
158
|
-
] }),
|
|
159
|
-
data.usageRuleText && /* @__PURE__ */ jsxs3("p", { className: "ap-card__detail-desc", children: [
|
|
160
|
-
"\u4F7F\u7528\u89C4\u5219\uFF1A",
|
|
161
|
-
data.usageRuleText
|
|
162
|
-
] }),
|
|
163
|
-
data.redemptionInstruction && /* @__PURE__ */ jsxs3("p", { className: "ap-card__detail-desc", children: [
|
|
164
|
-
"\u9886\u53D6\u8BF4\u660E\uFF1A",
|
|
165
|
-
data.redemptionInstruction
|
|
166
|
-
] }),
|
|
167
|
-
data.prizeUrl && /* @__PURE__ */ jsxs3("p", { className: "ap-card__meta", children: [
|
|
168
|
-
"\u9886\u53D6\u6307\u5F15\uFF1A",
|
|
169
|
-
data.prizeUrl,
|
|
170
|
-
"\uFF08\u4EE5\u6D3B\u52A8\u9875\u9762\u4E3A\u51C6\uFF09"
|
|
171
|
-
] })
|
|
172
|
-
] });
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// src/client/index.ts
|
|
176
|
-
var cards = {
|
|
177
|
-
"activity-play": ActivityPlayCard,
|
|
178
|
-
"activity-play-prize-list": ActivityPlayPrizeListCard,
|
|
179
|
-
"activity-play-prize-detail": ActivityPlayPrizeDetailCard
|
|
180
|
-
};
|
|
181
|
-
var clientModule = {
|
|
182
|
-
cards,
|
|
183
|
-
register(ctx) {
|
|
184
|
-
ctx.cards.registerMap(cards);
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export {
|
|
189
|
-
clientModule
|
|
190
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* activity-play-prize-detail 占位渲染器(任务07——沿活动卡 2026-11-16 授权先例占位)。
|
|
3
|
-
* - 数据契约:contracts-mall activityPlayPrizeDetailCardDataSchema({mallId, ...PrizeDetail}
|
|
4
|
-
* 平铺——不套 mode/items/prize 包装);
|
|
5
|
-
* - 占位边界:中立保形展示(奖品名/类型/状态/中奖时间/使用规则/领取说明——
|
|
6
|
-
* prizeUrl 仅事实展示为指引文本,占位期不加跳转按钮);正式渲染器(历史禁用与
|
|
7
|
-
* 品牌视觉)由前端负责人按任务线交付后整体替换本文件;
|
|
8
|
-
* - 视觉纪律:中立形态(无厂商关联、无 --tbox-asset-* 元素级声明、域变量兜底)。
|
|
9
|
-
*/
|
|
10
|
-
import type { ActivityPlayPrizeDetailCardData } from '@tbox.cn/app-contracts-mall';
|
|
11
|
-
|
|
12
|
-
/** 状态桶占位文案(UNKNOWN 保守中文;供应商枚举按原文展示) */
|
|
13
|
-
function statusLabel(value: string): string {
|
|
14
|
-
return value === 'UNKNOWN' ? '状态未知' : value;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function ActivityPlayPrizeDetailCard(props: { data: ActivityPlayPrizeDetailCardData }) {
|
|
18
|
-
const { data } = props;
|
|
19
|
-
return (
|
|
20
|
-
<section className="ap-card ap-card--detail">
|
|
21
|
-
<span className="ap-card__eyebrow">本人奖品</span>
|
|
22
|
-
<div className="ap-card__detail-head">
|
|
23
|
-
<strong>{data.title}</strong>
|
|
24
|
-
<span className="ap-badge ap-badge--muted">{statusLabel(data.claimStatus)}</span>
|
|
25
|
-
</div>
|
|
26
|
-
<p className="ap-card__row-desc">
|
|
27
|
-
{statusLabel(data.prizeType)} · 使用状态 {statusLabel(data.useStatus)}
|
|
28
|
-
{data.wonAt ? ` · ${data.wonAt}` : ''}
|
|
29
|
-
</p>
|
|
30
|
-
{data.activityTitle && <p className="ap-card__meta">来源活动:{data.activityTitle}</p>}
|
|
31
|
-
{data.usageRuleText && (
|
|
32
|
-
<p className="ap-card__detail-desc">使用规则:{data.usageRuleText}</p>
|
|
33
|
-
)}
|
|
34
|
-
{data.redemptionInstruction && (
|
|
35
|
-
<p className="ap-card__detail-desc">领取说明:{data.redemptionInstruction}</p>
|
|
36
|
-
)}
|
|
37
|
-
{data.prizeUrl && (
|
|
38
|
-
<p className="ap-card__meta">领取指引:{data.prizeUrl}(以活动页面为准)</p>
|
|
39
|
-
)}
|
|
40
|
-
</section>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export default ActivityPlayPrizeDetailCard;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* activity-play-prize-detail 卡元数据(任务07——本人奖品详情稳定卡型)。
|
|
3
|
-
* 数据契约单源 = contracts-mall activityPlayPrizeDetailCardDataSchema(平铺形态——
|
|
4
|
-
* 不套 mode/items/prize 包装);信封字段由 SDK 卡片框架承载。
|
|
5
|
-
* 正式渲染组件由前端外部交付(历史态禁用约定见 api.md);注册接线在步骤 2。
|
|
6
|
-
*/
|
|
7
|
-
import type { CardMeta } from '@tbox.cn/app-contracts';
|
|
8
|
-
import { activityPlayPrizeDetailCardDataSchema } from '@tbox.cn/app-contracts-mall';
|
|
9
|
-
import { activityPlayPrizeDetailCardSamples } from './samples';
|
|
10
|
-
|
|
11
|
-
const meta: CardMeta<typeof activityPlayPrizeDetailCardDataSchema> = {
|
|
12
|
-
cardType: 'activity-play-prize-detail',
|
|
13
|
-
dataSchema: activityPlayPrizeDetailCardDataSchema,
|
|
14
|
-
displayName: '本人奖品详情',
|
|
15
|
-
description: '本人中奖记录详情卡片(奖品事实、供应商规则与领取说明——平铺展示)',
|
|
16
|
-
schemaVersion: 1,
|
|
17
|
-
sampleData: {
|
|
18
|
-
mallId: 'mall-demo',
|
|
19
|
-
prizeRecordRef: 'prize-demo-001',
|
|
20
|
-
title: '咖啡兑换券',
|
|
21
|
-
prizeType: 'COUPON',
|
|
22
|
-
claimStatus: 'CLAIMED',
|
|
23
|
-
useStatus: 'UNUSED',
|
|
24
|
-
redemptionInstruction: '请按活动页面的领取及使用指引操作',
|
|
25
|
-
},
|
|
26
|
-
samples: activityPlayPrizeDetailCardSamples,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export default meta;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* activity-play-prize-detail 卡附加预览样本(任务07——覆盖领取说明完整面与最小面)。
|
|
3
|
-
*
|
|
4
|
-
* 方法论(对齐 member/parking 画廊沉淀约定):
|
|
5
|
-
* - 样本即契约:全样本 data 必须过 activityPlayPrizeDetailCardDataSchema(本文件
|
|
6
|
-
* 下方自证 + tests/prizes.test.ts 双断言);
|
|
7
|
-
* - 详情平铺形态({mallId, ...detail}——不套 mode/items/prize 包装);
|
|
8
|
-
* - prizeUrl 为事实字段样本(展示层不据此加按钮);时间为含时区 ISO。
|
|
9
|
-
*/
|
|
10
|
-
import type { CardSample } from '@tbox.cn/app-contracts';
|
|
11
|
-
import { activityPlayPrizeDetailCardDataSchema } from '@tbox.cn/app-contracts-mall';
|
|
12
|
-
import type { ActivityPlayPrizeDetailCardData } from '@tbox.cn/app-contracts-mall';
|
|
13
|
-
|
|
14
|
-
export const activityPlayPrizeDetailCardSamples: CardSample<ActivityPlayPrizeDetailCardData>[] = [
|
|
15
|
-
{
|
|
16
|
-
label: '详情·完整面',
|
|
17
|
-
group: '本人奖品·详情',
|
|
18
|
-
note: '含来源活动/图片/时间/规则/领取方式/说明/指引全量可选字段',
|
|
19
|
-
data: {
|
|
20
|
-
mallId: 'mall-demo',
|
|
21
|
-
prizeRecordRef: 'prize-demo-001',
|
|
22
|
-
title: '咖啡兑换券',
|
|
23
|
-
prizeType: 'COUPON',
|
|
24
|
-
claimStatus: 'CLAIMED',
|
|
25
|
-
useStatus: 'UNUSED',
|
|
26
|
-
activityId: 'demo-wheel',
|
|
27
|
-
activityTitle: '幸运转盘',
|
|
28
|
-
imageUrl: 'https://example.com/prize.png',
|
|
29
|
-
wonAt: '2026-11-01T10:00:00+08:00',
|
|
30
|
-
usageRuleText: '请在有效期内到店使用',
|
|
31
|
-
redemptionMethod: '门店柜台',
|
|
32
|
-
redemptionInstruction: '请按活动页面的领取及使用指引操作',
|
|
33
|
-
prizeUrl: 'https://example.com/claim',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: '详情·最小面',
|
|
38
|
-
group: '本人奖品·详情',
|
|
39
|
-
note: '仅必填字段 + UNKNOWN 状态桶(未知状态保守展示——不编造具体状态)',
|
|
40
|
-
data: {
|
|
41
|
-
mallId: 'mall-demo',
|
|
42
|
-
prizeRecordRef: 'prize-demo-002',
|
|
43
|
-
title: '周年庆礼盒',
|
|
44
|
-
prizeType: 'UNKNOWN',
|
|
45
|
-
claimStatus: 'WAIT_CLAIM',
|
|
46
|
-
useStatus: 'UNKNOWN',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
];
|
|
50
|
-
|
|
51
|
-
// 样本自证(样本即契约——schema 不过即测试失败,不留坏样本入画廊)
|
|
52
|
-
for (const sample of activityPlayPrizeDetailCardSamples) {
|
|
53
|
-
activityPlayPrizeDetailCardDataSchema.parse(sample.data);
|
|
54
|
-
}
|