|
@@ -3,6 +3,7 @@
|
|
|
import Link from "next/link";
|
|
import Link from "next/link";
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
|
|
+ ChevronDown,
|
|
|
ChevronRight,
|
|
ChevronRight,
|
|
|
FileJson,
|
|
FileJson,
|
|
|
GitBranch,
|
|
GitBranch,
|
|
@@ -528,44 +529,7 @@ function StagePanel({
|
|
|
<ConclusionBody stage={data.dashboard.stage_conclusions.find((stage) => stage.stage_id === "platform")} />
|
|
<ConclusionBody stage={data.dashboard.stage_conclusions.find((stage) => stage.stage_id === "platform")} />
|
|
|
<div className="business-card-list">
|
|
<div className="business-card-list">
|
|
|
{data.contentItems.items.length ? data.contentItems.items.map((item, index) => (
|
|
{data.contentItems.items.length ? data.contentItems.items.map((item, index) => (
|
|
|
- <div className="business-record-card" key={String(item.platform_content_id || index)}>
|
|
|
|
|
- <div className="content-card-heading">
|
|
|
|
|
- <span>平台内容 #{index + 1}</span>
|
|
|
|
|
- <strong>{compactValue(item.title || item.description || "抖音视频")}</strong>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div className="content-meta-grid">
|
|
|
|
|
- <span>
|
|
|
|
|
- 抖音视频 ID
|
|
|
|
|
- <strong>{compactValue(item.platform_content_id)}</strong>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span>
|
|
|
|
|
- 来源 Query
|
|
|
|
|
- <strong>{compactValue(primaryQuerySource(item).search_query_id)}</strong>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span>
|
|
|
|
|
- 搜索关键词
|
|
|
|
|
- <strong>{compactValue(primaryQuerySource(item).search_query)}</strong>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span>
|
|
|
|
|
- Query 类型
|
|
|
|
|
- <strong>{queryGenerationMethodLabel(primaryQuerySource(item).search_query_generation_method)}</strong>
|
|
|
|
|
- </span>
|
|
|
|
|
- <span>
|
|
|
|
|
- 抖音作者
|
|
|
|
|
- <strong>{compactValue(item.author_display_name || item.platform_author_id)}</strong>
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div className="business-action-row">
|
|
|
|
|
- <a
|
|
|
|
|
- className="text-button"
|
|
|
|
|
- href={douyinContentUrl(item)}
|
|
|
|
|
- rel="noreferrer"
|
|
|
|
|
- target="_blank"
|
|
|
|
|
- >
|
|
|
|
|
- 打开原帖
|
|
|
|
|
- </a>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <ContentPostCard item={item} index={index} key={String(item.platform_content_id || index)} />
|
|
|
)) : <div className="empty-state">还没有发现内容;请先查看 Query 或平台失败原因</div>}
|
|
)) : <div className="empty-state">还没有发现内容;请先查看 Query 或平台失败原因</div>}
|
|
|
</div>
|
|
</div>
|
|
|
</BusinessSection>
|
|
</BusinessSection>
|
|
@@ -664,6 +628,58 @@ function StagePanel({
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function ContentPostCard({ item, index }: { item: Record<string, unknown>; index: number }) {
|
|
|
|
|
+ const [open, setOpen] = useState(true);
|
|
|
|
|
+ const querySource = primaryQuerySource(item);
|
|
|
|
|
+ return (
|
|
|
|
|
+ <div className="business-record-card">
|
|
|
|
|
+ <button
|
|
|
|
|
+ type="button"
|
|
|
|
|
+ className="content-card-toggle"
|
|
|
|
|
+ aria-expanded={open}
|
|
|
|
|
+ onClick={() => setOpen((v) => !v)}
|
|
|
|
|
+ >
|
|
|
|
|
+ {open ? <ChevronDown size={16} /> : <ChevronRight size={16} />}
|
|
|
|
|
+ <span className="content-card-heading">
|
|
|
|
|
+ <span>平台内容 #{index + 1}</span>
|
|
|
|
|
+ <strong>{compactValue(item.title || item.description || "抖音视频")}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ {open ? (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <div className="content-meta-grid">
|
|
|
|
|
+ <span>
|
|
|
|
|
+ 抖音视频 ID
|
|
|
|
|
+ <strong>{compactValue(item.platform_content_id)}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span>
|
|
|
|
|
+ 来源 Query
|
|
|
|
|
+ <strong>{compactValue(querySource.search_query_id)}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span>
|
|
|
|
|
+ 搜索关键词
|
|
|
|
|
+ <strong>{compactValue(querySource.search_query)}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span>
|
|
|
|
|
+ Query 类型
|
|
|
|
|
+ <strong>{queryGenerationMethodLabel(querySource.search_query_generation_method)}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span>
|
|
|
|
|
+ 抖音作者
|
|
|
|
|
+ <strong>{compactValue(item.author_display_name || item.platform_author_id)}</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="business-action-row">
|
|
|
|
|
+ <a className="text-button" href={douyinContentUrl(item)} rel="noreferrer" target="_blank">
|
|
|
|
|
+ 打开原帖
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </>
|
|
|
|
|
+ ) : null}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ );
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function BusinessSection({ title, icon, children }: { title: string; icon: React.ReactNode; children: React.ReactNode }) {
|
|
function BusinessSection({ title, icon, children }: { title: string; icon: React.ReactNode; children: React.ReactNode }) {
|
|
|
return (
|
|
return (
|
|
|
<section className="business-section">
|
|
<section className="business-section">
|