chore: 去掉未上线前的旧兼容垫片,板块流收口到首页

鉴权只认 cookie、SEO 只走 Next、sort 与推荐对齐;删除 Bearer、Go sitemap、post_type 回填等冗余路径。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-16 05:04:47 +08:00
parent 0e61a14ea3
commit 833bcd33a1
33 changed files with 715 additions and 548 deletions

View File

@@ -121,7 +121,7 @@ function BoardCard({ board }: { board: Board }) {
<p className="j13-module-title mb-3" id="board-card-title">
<Layers size={15} style={{ color: "var(--accent)" }} /> 所属板块
</p>
<Link href={`/board/${board.id}`} className="flex items-center gap-3 group">
<Link href={`/?board=${board.id}`} className="flex items-center gap-3 group">
<span
className={`av-${colorIdx} w-11 h-11 rounded-xl flex items-center justify-center text-lg font-extrabold shrink-0`}
>
@@ -140,10 +140,10 @@ function BoardCard({ board }: { board: Board }) {
</p>
)}
<Link
href={`/board/${board.id}`}
href={`/?board=${board.id}`}
className="btn btn-line btn-sm w-full justify-center mt-3.5"
>
进入板块 <ArrowRight size={13} />
查看该板讨论 <ArrowRight size={13} />
</Link>
</section>
);
@@ -266,7 +266,7 @@ function RelatedPosts({
))}
</ol>
<Link
href={`/board/${boardId}`}
href={`/?board=${boardId}`}
className="j13-raillink justify-center mt-1.5 text-[12.5px]"
style={{ color: "var(--accent)" }}
>
@@ -334,7 +334,7 @@ export default async function PostDetailPage({ params, searchParams }: PageProps
fetchComments(id, commentPage, cookie),
getMeCached(cookie || undefined),
fetchUserProfile(String(post.user.id), 1, cookie).catch(() => null),
fetchPosts(1, 8, post.board_id, "hot", "", false, cookie).catch(() => null),
fetchPosts(1, 8, post.board_id, "recommended", "", false, cookie).catch(() => null),
]);
const comments = commentsData.comments;
const related = (relatedData?.posts ?? []).filter((p) => p.id !== post.id).slice(0, 5);
@@ -424,7 +424,7 @@ export default async function PostDetailPage({ params, searchParams }: PageProps
<nav className="meta mb-5 flex items-center gap-1.5 flex-wrap text-[13px]">
<Link href="/" className="hover:text-[var(--accent)] transition-colors">首页</Link>
<ChevronRight size={13} />
<Link href={`/board/${post.board.id}`} className="hover:text-[var(--accent)] transition-colors">
<Link href={`/?board=${post.board.id}`} className="hover:text-[var(--accent)] transition-colors">
{post.board.name}
</Link>
</nav>
@@ -432,7 +432,7 @@ export default async function PostDetailPage({ params, searchParams }: PageProps
<div className="panel p-6 sm:p-8">
<header className="mb-7">
<div className="flex items-center gap-2 mb-4 flex-wrap">
<Link href={`/board/${post.board.id}`} className="chip">
<Link href={`/?board=${post.board.id}`} className="chip">
{post.board.name}
</Link>
</div>