diff --git a/src/pages/news.astro b/src/pages/news.astro index 03a7c06..d3c6b78 100644 --- a/src/pages/news.astro +++ b/src/pages/news.astro @@ -25,7 +25,7 @@ const { breadcrumb = Astro.locals?.column_data?.item || [{ title: "资讯", link: "/news" }], // 面包屑导航 filter = Astro.locals?.column_data?.filter || [], // 文章筛选条件 } = Astro.props; -const { code, data, total = 0, hot } = await newsIndex(config.id, limit, page, filter); +const { code, data, total = 0, hot, guess } = await newsIndex(config.id, limit, page, filter); if (data.length == 0 || code !== 0) { return Astro.redirect("/404"); } @@ -116,44 +116,86 @@ if (data.length == 0 || code !== 0) { /> -
-
-

热门文章

- +
+
+

+ + {item.title} + +

+ {item.created_at} +
+ + ); + }) + } + +
+ +
+
+

猜你喜欢

+ +
diff --git a/src/pages/news/[...slug].astro b/src/pages/news/[...slug].astro index 1ea25e0..c9da0eb 100644 --- a/src/pages/news/[...slug].astro +++ b/src/pages/news/[...slug].astro @@ -155,6 +155,11 @@ const bytedanceData = formatDate(data.created_at) })(window)