update
This commit is contained in:
@ -10,12 +10,12 @@ import BreadComponent from "../components/Breadcrumb.astro";
|
||||
const config = getConfig(Astro);
|
||||
|
||||
// 每页显示多少条
|
||||
const limit = 12;
|
||||
const limit = 10;
|
||||
|
||||
// 页码
|
||||
const { page = 1 } = Astro.props;
|
||||
const { code, data, total = 0, about } = await newsIndex(config.id, limit, page);
|
||||
console.log(total)
|
||||
const { page = 1, columnDesc = `霍尔果斯飞驰广告有限公司致力于分享从基础到进阶的SEO优化策略、广告投放方法、内容运营技巧和网站转化率提升方案。` ,breadcrumb = [{ title: "资讯", link: "/news" }] } = Astro.props;
|
||||
const { code, data, total = 0, hot } = await newsIndex(config.id, limit, page);
|
||||
|
||||
if (!data || code !== 0) {
|
||||
return Astro.redirect("/404");
|
||||
}
|
||||
@ -30,13 +30,12 @@ if (!data || code !== 0) {
|
||||
class="archive-head"
|
||||
style="grid-column: 1 / 3;grid-row: 1 / 2;"
|
||||
>
|
||||
<BreadComponent
|
||||
data={[{ title: "行业专栏", link: "/news" }]}
|
||||
/>
|
||||
<div>
|
||||
<BreadComponent data={breadcrumb} />
|
||||
</div>
|
||||
|
||||
<div class="archive-description">
|
||||
<p>
|
||||
欢迎来到我们的<a href="/news">行业专栏</a>,这里汇聚了关于数字营销、SEO优化及互联网行业最新动态的深度分析与实战经验。随着数字化转型的加速,越来越多的企业在探索如何在互联网浪潮中脱颖而出。我们专注于为营销人员、SEO专家以及各类企业提供最新的行业洞察、策略解析以及实用技巧。
|
||||
</p>
|
||||
<p><Fragment set:html={columnDesc}></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news-list-row">
|
||||
@ -85,6 +84,10 @@ if (!data || code !== 0) {
|
||||
<p class="entry-summary news-card-summary">
|
||||
{e.description}
|
||||
</p>
|
||||
<div>
|
||||
<a href={e.column_tag_url}><span class="label label-success">{e.column_tag}</span></a>
|
||||
{/* <a href={e.column_tag_url}><span class="label label-info">{e.column_tag}</span></a> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -93,18 +96,18 @@ if (!data || code !== 0) {
|
||||
}
|
||||
</div>
|
||||
<PaginationComponent
|
||||
totalPages={total}
|
||||
currentPage={page}
|
||||
totalPages={Number(total)}
|
||||
currentPage={Number(page)}
|
||||
baseUrl={`/news/page/`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slide-container">
|
||||
<div class="widget widget-tie divPrevious">
|
||||
<h3>最新文章</h3>
|
||||
<h3>热门文章</h3>
|
||||
<ul>
|
||||
{
|
||||
about?.map((item, index) => {
|
||||
hot?.map((item, index) => {
|
||||
return (
|
||||
<li class={`previous-${index + 1}`}>
|
||||
<div class="previous-one-img">
|
||||
@ -189,9 +192,19 @@ if (!data || code !== 0) {
|
||||
}
|
||||
}
|
||||
|
||||
.archive-description {
|
||||
margin: 1rem;
|
||||
}
|
||||
|
||||
.slide-container {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.news-card-header > h2 {
|
||||
margin: 1rem 0 1rem 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.archive-head {
|
||||
grid-column: 1 / 3;
|
||||
grid-row: 1 / 2;
|
||||
@ -226,6 +239,10 @@ if (!data || code !== 0) {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.news-card-summary {
|
||||
color:#6e6e6e
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
float: left;
|
||||
margin-left: -360px;
|
||||
|
Reference in New Issue
Block a user