Przeglądaj źródła

feat(web):详情页改按 小红书→微信→抖音 排序,每区内创作知识在前、非创作单独成行

平台分区顺序改为 小红书 → 微信公众号 → 抖音;每个平台区内拆「创作知识」「非创作知识」
两段,创作知识在前,非创作知识单独起一行(带绿/红圆点小标题与计数)。纯 UI 排布。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SamLee 2 tygodni temu
rodzic
commit
6840e4b50f

Plik diff jest za duży
+ 1 - 1
acquisition/web/app/dist/assets/index-B90RPVWW.js


Plik diff jest za duży
+ 0 - 0
acquisition/web/app/dist/assets/index-CIU2tcc0.css


+ 2 - 2
acquisition/web/app/dist/index.html

@@ -4,8 +4,8 @@
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>创作知识 · 找帖子</title>
-    <script type="module" crossorigin src="/app/assets/index-CLGP1gjo.js"></script>
-    <link rel="stylesheet" crossorigin href="/app/assets/index-D_lgEh3q.css">
+    <script type="module" crossorigin src="/app/assets/index-B90RPVWW.js"></script>
+    <link rel="stylesheet" crossorigin href="/app/assets/index-CIU2tcc0.css">
   </head>
   <body>
     <div id="root"></div>

+ 19 - 4
acquisition/web/app/src/pages/QueryDetail.jsx

@@ -1,11 +1,11 @@
 import React, { useEffect, useState } from 'react'
 import { fetchSearch } from '../api.js'
 
-// 渠道分区展示:抖音一组在前、微信公众号一组在后,各自成块,不混排
+// 渠道分区展示:小红书 → 微信公众号 → 抖音;每区内「创作知识」在前、「非创作知识」单独起一行
 const PLATFORMS = [
-  { key: 'douyin', label: '抖音', cls: 'dy' },
-  { key: 'weixin', label: '微信公众号', cls: 'wx' },
   { key: 'xiaohongshu', label: '小红书', cls: 'xhs' },
+  { key: 'weixin', label: '微信公众号', cls: 'wx' },
+  { key: 'douyin', label: '抖音', cls: 'dy' },
 ]
 
 // 单条 query 的真实搜索结果详情:进来即「点进该 query 生成的多个视频里」。
@@ -27,13 +27,28 @@ export default function QueryDetail({ query }) {
         PLATFORMS.map((p) => {
           const list = hits.filter((r) => r.platform === p.key)
           const fail = data.items.find((r) => r.platform === p.key && !r.ok)
+          const creation = list.filter((r) => r.cls?.is_creation === 1)
+          const others = list.filter((r) => r.cls?.is_creation !== 1)   // 非创作 + 未分类
           return (
             <section className="pgroup" key={p.key}>
               <div className={`ghead ${p.cls}`}>{p.label}<span className="gn">{list.length}</span></div>
               {list.length === 0 ? (
                 <div className="gnone">未搜到{fail?.extra?.error ? `(${fail.extra.error})` : ''}</div>
               ) : (
-                <div className="grid">{list.map((r) => <Result key={r.id} r={r} cls={p.cls} />)}</div>
+                <>
+                  {creation.length > 0 && (
+                    <>
+                      <div className="subhd">创作知识 · {creation.length}</div>
+                      <div className="grid">{creation.map((r) => <Result key={r.id} r={r} cls={p.cls} />)}</div>
+                    </>
+                  )}
+                  {others.length > 0 && (
+                    <>
+                      <div className="subhd dim">非创作知识 · {others.length}</div>
+                      <div className="grid">{others.map((r) => <Result key={r.id} r={r} cls={p.cls} />)}</div>
+                    </>
+                  )}
+                </>
               )}
             </section>
           )

+ 6 - 0
acquisition/web/app/src/styles.css

@@ -141,6 +141,12 @@ td.q { font-weight: 600; }
 .ghead .gn { font-size: 11.5px; font-weight: 600; color: var(--muted);
   background: #f0f0f3; border-radius: 10px; padding: 1px 8px; }
 .gnone { color: var(--muted); font-size: 12.5px; padding: 2px 0 6px; }
+/* 平台区内:创作知识 / 非创作知识 小标题(各自起一行) */
+.subhd { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
+  color: var(--ink); margin: 14px 0 8px; }
+.subhd::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
+.subhd.dim { color: var(--muted); }
+.subhd.dim::before { background: var(--bad); }
 /* 卡片左侧细色条,进一步区分渠道归属 */
 .lane.dy { border-left: 3px solid #111; }
 .lane.wx { border-left: 3px solid var(--ok); }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików