feat: hashtag 列表显示按共现计算的相关 tag
- 新增 /api/hashtag/related:从作品描述实时解析 hashtag,按「同一作品里一起出现」计算相关 tag - 打分取子话题(候选多与目标同现)与上位话题(目标多与热门候选同现)两者较大值, 过滤 cos、二次元等万金油 tag 与平台活动、纯数字 tag - 播放页侧栏的 hashtag 列表顶部显示相关 tag,点击在侧栏内预览(不打断当前播放), 在预览里点作品才切换到该 tag 的列表 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -471,6 +471,14 @@ export default function AwemeDetailClient({
|
||||
return `/search?${params.toString()}`;
|
||||
}, [listKind, contextQuery]);
|
||||
|
||||
const hashtagName = useMemo(
|
||||
() =>
|
||||
listKind === "hashtag"
|
||||
? new URLSearchParams(contextQuery).get("hashtag")
|
||||
: null,
|
||||
[listKind, contextQuery],
|
||||
);
|
||||
|
||||
const listVisible = panel.open && activeTab === "list";
|
||||
const worksVisible = panel.open && activeTab === "works";
|
||||
|
||||
@@ -976,11 +984,13 @@ export default function AwemeDetailClient({
|
||||
count: listContext.total,
|
||||
content: (
|
||||
<ContextListTab
|
||||
key={contextQuery}
|
||||
active={panel.open && activeTab === "list"}
|
||||
context={listContext}
|
||||
list={contextList}
|
||||
currentId={data.aweme_id}
|
||||
contextQuery={contextQuery}
|
||||
hashtagName={hashtagName}
|
||||
searchPageHref={searchPageHref}
|
||||
onSelect={handleWorkSelect}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user