Use unique contact identifiers for KOC claims

This commit is contained in:
巫凤萍
2026-08-03 13:48:01 +08:00
parent d2cde2c9b2
commit b081946752
7 changed files with 119 additions and 21 deletions

View File

@@ -5,7 +5,7 @@
## MVP 流程
1. KOC 通过带 `task` 参数的任务链接进入。
2. 只填写企微昵称/联系人和领取数量。
2. 只填写具有唯一性的微信号/手机号和领取数量。
3. 领取后只能看到本次领取的笔记。
4. 在单篇笔记详情页查看标题与正文,并一一回填发布账号昵称、发布链接和发布截图。

View File

@@ -291,7 +291,7 @@ export default function Home() {
body: JSON.stringify({
action: "claim",
taskToken,
claimantName,
claimantIdentifier: claimantName,
quantity,
}),
});
@@ -335,7 +335,7 @@ export default function Home() {
body: JSON.stringify({
action: "recover",
taskToken,
claimantName,
claimantIdentifier: claimantName,
}),
});
const result = (await response.json()) as {
@@ -1222,7 +1222,7 @@ export default function Home() {
</section>
<div className="safe-tip">
{isClaimOwner
? "以后再次打开原任务链接,填写相同企微昵称即可找回全部领取批次和分享记录。"
? "以后再次打开原任务链接,填写相同微信号或手机号即可找回全部领取批次和分享记录。"
: "请保存当前分享链接发布后仍需通过此链接回填第7天截图、曝光量和阅读量。"}
</div>
{toast && <div className="toast">{toast}</div>}
@@ -1276,11 +1276,15 @@ export default function Home() {
<h2></h2>
</div>
<label>
<span> / </span>
<span> / </span>
<input
value={claimantName}
onChange={(event) => setClaimantName(event.target.value)}
placeholder="用于找回你的领取记录"
placeholder="请输入微信号或手机号"
autoCapitalize="none"
autoCorrect="off"
spellCheck={false}
maxLength={64}
required
/>
</label>
@@ -1314,15 +1318,19 @@ export default function Home() {
<p className="micro"></p>
<h2></h2>
<p className="recover-intro">
使
使
</p>
</div>
<label>
<span> / </span>
<span> / </span>
<input
value={claimantName}
onChange={(event) => setClaimantName(event.target.value)}
placeholder="需与领取时完全一致"
autoCapitalize="none"
autoCorrect="off"
spellCheck={false}
maxLength={64}
required
/>
</label>

View File

@@ -26,7 +26,9 @@ test("keeps claiming minimal and backfill one-to-one", async () => {
readFile(new URL("../.openai/hosting.json", import.meta.url), "utf8"),
]);
assert.match(page, /企微昵称\s*\/\s*联系人/);
assert.match(page, /微信号\s*\/\s*手机号/);
assert.doesNotMatch(page, /企微昵称\s*\/\s*联系人/);
assert.match(page, /claimantIdentifier:\s*claimantName/);
assert.match(page, /const \[quantity, setQuantity\] = useState\(1\)/);
assert.match(page, /distributionId:\s*selected\.id/);
assert.match(page, /发布账号昵称/);