update
This commit is contained in:
@ -1,11 +1,493 @@
|
||||
---
|
||||
import Welcome from '../components/Welcome.astro';
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
import { getConfig } from "../../utils/config";
|
||||
import { newsIndex } from "../../utils/rpc";
|
||||
|
||||
// Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build
|
||||
// Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh.
|
||||
const config = getConfig(Astro);
|
||||
const { code, data } = await newsIndex({
|
||||
websiteId: config.id
|
||||
});
|
||||
console.log(data)
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<Welcome />
|
||||
<!-- 顶部功能栏 -->
|
||||
<div id="VoBaoHead"></div>
|
||||
<!-- 公用头部 -->
|
||||
<!-- banner -->
|
||||
<div class="head-banner min-width">
|
||||
<div class="swiper-container swiper-container-horizontal" id="swiper1">
|
||||
<div class="swiper-wrapper">
|
||||
</div>
|
||||
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
|
||||
</div>
|
||||
<!-- 看攻略 -->
|
||||
<div class="news-container width-1200">
|
||||
<div class="news-head">
|
||||
<div class="news-head-title">看攻略</div>
|
||||
<div class="news-head-tip">精心准备的保险知识,让你投保不再盲目</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 寿险 -->
|
||||
<div class="xznews-container width-1200">
|
||||
<div class="xznews-head">
|
||||
<div class="xznews-title">
|
||||
<div class="xznews-bdtitle">{data?.articles?.['11']?.title}</div>
|
||||
<div class="xznews-tiptitle">{data?.articles?.['11']?.desc}</div>
|
||||
</div>
|
||||
<a class="xznews-tip" href={data?.articles?.['11']?.url} target="_blank">+更多</a>
|
||||
</div>
|
||||
<div class="xznews-box">
|
||||
<div class="xznews-box-f xznews-box-width">
|
||||
<div class="xznews-f-pitem">
|
||||
{
|
||||
data?.articles?.['11']?.item?.slice(0, 2).map((e, index) => (
|
||||
<a class="pitem-item" target="_blank" href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="item-img" />
|
||||
<div class="item-title">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
{
|
||||
data?.articles?.['11']?.item?.slice(2, 3).map((e, index) => (
|
||||
<a class="xznews-f-fitem" target="_blank" href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="fitem-img" />
|
||||
<div class="fitem-tip">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
{/* <a class="xznews-f-fitem" target="_blank" href="//news.vobao.com/article/1145627262119423674.shtml">
|
||||
<img src="https://res.vobao.com/res1/news/202507221349376851145627377685976963.jpg" alt="" class="fitem-img">
|
||||
<div class="fitem-tip">2025终身寿险排行榜前十名有哪些,2025终身寿险哪家保险公司好</div>
|
||||
</a> */}
|
||||
</div>
|
||||
<div class="xznews-box-s xznews-box-width2">
|
||||
<div class="xznews-s-list spc-list">
|
||||
{
|
||||
data?.articles?.['11']?.item?.slice(3, 10).map((e, index) => (
|
||||
<a title={e.title} class={index > 0 ? ' s-list-item' : 's-list-item spc-item'} target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="xznews-s-list">
|
||||
{
|
||||
data?.articles?.['11']?.item?.slice(10, 17).map((e, index) => (
|
||||
<a title={e.title} class={index > 0 ? ' s-list-item' : 's-list-item spc-item'} target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="xznews-box-t xznews-box-width3">
|
||||
<div class="t-list">
|
||||
{
|
||||
data?.articles?.['11']?.item?.slice(18, 20).map((e, index) => (
|
||||
<a class="t-item-spc" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="t-item-img" />
|
||||
<div class="t-item-box">
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
<div class="t-item-tip">{e.created_at}</div>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
{
|
||||
data?.articles?.['11']?.item?.slice(20, 30).map((e, index) => (
|
||||
<a class="t-item" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<div class="t-item-tip">{index + 1}</div>
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 意外险 -->
|
||||
<div class="xznews-container width-1200">
|
||||
<div class="xznews-head">
|
||||
<div class="xznews-title">
|
||||
<div class="xznews-bdtitle">{data?.articles?.['12']?.title}</div>
|
||||
<div class="xznews-tiptitle">{data?.articles?.['12']?.desc}</div>
|
||||
</div>
|
||||
<a class="xznews-tip" target="_blank" href="//news.vobao.com/ceping/1/">+更多</a>
|
||||
</div>
|
||||
<div class="xznews-box">
|
||||
<div class="xznews-box-f xznews-box-width2">
|
||||
<div class="xznews-f-list">
|
||||
{
|
||||
data?.articles?.['12']?.item?.slice(0, 2).map((e, index) => (
|
||||
<a title={e.title} class="f-item-spc" target="_blank" href={`/news/${e.id}`}>
|
||||
<div class="item-spc-title">{e.title}</div>
|
||||
<div class="item-spc-cont">{e.description}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
{
|
||||
data?.articles?.['12']?.item?.slice(2, 5).map((e, index) => (
|
||||
<a title={e.title} class="f-item" target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="xznews-box-s xznews-box-width">
|
||||
{
|
||||
data?.articles?.['12']?.item?.slice(5, 6).map((e, index) => (
|
||||
<a class="s-img-item" target="_blank" href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="s-img" />
|
||||
<div class="s-img-tip">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="xznews-box-t xznews-box-width3">
|
||||
<div class="t-list t-list2">
|
||||
{
|
||||
data?.articles?.['12']?.item?.slice(6, 9).map((e, index) => (
|
||||
<a class="t-item-spc" title={e.title} target="_blank" href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="t-item-img" />
|
||||
<div class="t-item-box">
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
<div class="t-item-tip">{e.created_at}</div>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 医疗险 -->
|
||||
<div class="xznews-container width-1200">
|
||||
<div class="xznews-head">
|
||||
<div class="xznews-title">
|
||||
<div class="xznews-bdtitle">{data?.articles?.['13']?.title}</div>
|
||||
<div class="xznews-tiptitle">{data?.articles?.['13']?.desc}</div>
|
||||
</div>
|
||||
<a class="xznews-tip" target="_blank" href="//news.vobao.com/ceping/3/">+更多</a>
|
||||
</div>
|
||||
<div class="xznews-box">
|
||||
<div class="box-swiper">
|
||||
<div class="swiper-container swiper-container-horizontal" id="swiper2">
|
||||
<div class="swiper-wrapper" style="transform: translate3d(0px, 0px, 0px); transition-duration: 300ms;">
|
||||
{
|
||||
data?.articles?.['13']?.item?.slice(0, 3).map((e, index) => (
|
||||
<div class="swiper-slide swiper-slide-active" >
|
||||
<a class="box-swiper-item" title={e.title} target="_blank" href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="item-img" />
|
||||
<div class="item-title">{e.title}</div>
|
||||
<div class="item-cont">{e.description}</div>
|
||||
</a>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span><span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
|
||||
<div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets" id="swiper-p2"><span class="swiper-pagination-bullet swiper-pagination-bullet-active" tabindex="0" role="button" aria-label="Go to slide 1"></span><span class="swiper-pagination-bullet" tabindex="0" role="button" aria-label="Go to slide 2"></span><span class="swiper-pagination-bullet" tabindex="0" role="button" aria-label="Go to slide 3"></span></div>
|
||||
</div>
|
||||
<div class="box-swiper">
|
||||
<div class="swiper-container swiper-container-horizontal" id="swiper3">
|
||||
<div class="swiper-wrapper" style="transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;">
|
||||
{
|
||||
data?.articles?.['13']?.item?.slice(3, 6).map((e, index) => (
|
||||
<div class="swiper-slide swiper-slide-active" >
|
||||
<a class="box-swiper-item" title={e.title} target="_blank" href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="item-img" />
|
||||
<div class="item-title">{e.title}</div>
|
||||
<div class="item-cont">{e.description}</div>
|
||||
</a>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
|
||||
<div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets" id="swiper-p3"><span class="swiper-pagination-bullet swiper-pagination-bullet-active" tabindex="0" role="button" aria-label="Go to slide 1"></span><span class="swiper-pagination-bullet" tabindex="0" role="button" aria-label="Go to slide 2"></span><span class="swiper-pagination-bullet" tabindex="0" role="button" aria-label="Go to slide 3"></span></div>
|
||||
</div>
|
||||
<div class="box-swiper">
|
||||
<div class="swiper-container swiper-container-horizontal" id="swiper4">
|
||||
<div class="swiper-wrapper" style="transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;">
|
||||
{
|
||||
data?.articles?.['13']?.item?.slice(6, 9).map((e, index) => (
|
||||
<div class="swiper-slide swiper-slide-active" >
|
||||
<a class="box-swiper-item" title={e.title} target="_blank" href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="item-img" />
|
||||
<div class="item-title">{e.title}</div>
|
||||
<div class="item-cont">{e.description}</div>
|
||||
</a>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
|
||||
<div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets" id="swiper-p4"><span class="swiper-pagination-bullet swiper-pagination-bullet-active" tabindex="0" role="button" aria-label="Go to slide 1"></span><span class="swiper-pagination-bullet" tabindex="0" role="button" aria-label="Go to slide 2"></span><span class="swiper-pagination-bullet" tabindex="0" role="button" aria-label="Go to slide 3"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 重疾险 -->
|
||||
<div class="xznews-container width-1200">
|
||||
<div class="xznews-head">
|
||||
<div class="xznews-title">
|
||||
<div class="xznews-bdtitle">{data?.articles?.['14']?.title}</div>
|
||||
<div class="xznews-tiptitle">{data?.articles?.['14']?.desc}</div>
|
||||
</div>
|
||||
<a class="xznews-tip" href="//news.vobao.com/ceping/2/" target="_blank">+更多</a>
|
||||
</div>
|
||||
<div class="xznews-box">
|
||||
<div class="xznews-box-f xznews-box-width">
|
||||
<div class="xznews-f-pitem">
|
||||
{
|
||||
data?.articles?.['14']?.item?.slice(0, 2).map((e, index) => (
|
||||
<a class="pitem-item" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="item-img" />
|
||||
<div class="item-title">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
{
|
||||
data?.articles?.['14']?.item?.slice(2, 3).map((e, index) => (
|
||||
<a class="xznews-f-fitem" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="fitem-img" />
|
||||
<div class="fitem-tip">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="xznews-box-s xznews-box-width2">
|
||||
<div class="xznews-s-list spc-list">
|
||||
{
|
||||
data?.articles?.['14']?.item?.slice(3, 10).map((e, index) => (
|
||||
<a title={e.title} class={index > 0 ? ' s-list-item' : 's-list-item spc-item'} target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="xznews-s-list">
|
||||
{
|
||||
data?.articles?.['14']?.item?.slice(10, 17).map((e, index) => (
|
||||
<a title={e.title} class={index > 0 ? ' s-list-item' : 's-list-item spc-item'} target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="xznews-box-t xznews-box-width3">
|
||||
<div class="t-list">
|
||||
{
|
||||
data?.articles?.['11']?.item?.slice(18, 20).map((e, index) => (
|
||||
<a class="t-item-spc" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="t-item-img" />
|
||||
<div class="t-item-box">
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
<div class="t-item-tip">{e.created_at}</div>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
{
|
||||
data?.articles?.['11']?.item?.slice(20, 30).map((e, index) => (
|
||||
<a class="t-item" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<div class="t-item-tip">{index + 1}</div>
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 少儿险 -->
|
||||
<div class="xznews-container width-1200">
|
||||
<div class="xznews-head">
|
||||
<div class="xznews-title">
|
||||
<div class="xznews-bdtitle">{data?.articles?.['15']?.title}</div>
|
||||
<div class="xznews-tiptitle">{data?.articles?.['15']?.desc}</div>
|
||||
</div>
|
||||
<a class="xznews-tip" href="//news.vobao.com/ceping/2/" target="_blank">+更多</a>
|
||||
</div>
|
||||
<div class="xznews-box">
|
||||
<div class="xznews-box-f xznews-box-width">
|
||||
<div class="xznews-f-pitem">
|
||||
{
|
||||
data?.articles?.['15']?.item?.slice(0, 2).map((e, index) => (
|
||||
<a class="pitem-item" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="item-img" />
|
||||
<div class="item-title">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
{
|
||||
data?.articles?.['15']?.item?.slice(2, 3).map((e, index) => (
|
||||
<a class="xznews-f-fitem" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="fitem-img" />
|
||||
<div class="fitem-tip">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="xznews-box-s xznews-box-width2">
|
||||
<div class="xznews-s-list spc-list">
|
||||
{
|
||||
data?.articles?.['15']?.item?.slice(3, 10).map((e, index) => (
|
||||
<a title={e.title} class={index > 0 ? ' s-list-item' : 's-list-item spc-item'} target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="xznews-s-list">
|
||||
{
|
||||
data?.articles?.['15']?.item?.slice(10, 17).map((e, index) => (
|
||||
<a title={e.title} class={index > 0 ? ' s-list-item' : 's-list-item spc-item'} target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="xznews-box-t xznews-box-width3">
|
||||
<div class="t-list">
|
||||
{
|
||||
data?.articles?.['15']?.item?.slice(18, 20).map((e, index) => (
|
||||
<a class="t-item-spc" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="t-item-img" />
|
||||
<div class="t-item-box">
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
<div class="t-item-tip">{e.created_at}</div>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
{
|
||||
data?.articles?.['15']?.item?.slice(20, 30).map((e, index) => (
|
||||
<a class="t-item" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<div class="t-item-tip">{index + 1}</div>
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 理财险 -->
|
||||
<div class="xznews-container width-1200">
|
||||
<div class="xznews-head">
|
||||
<div class="xznews-title">
|
||||
<div class="xznews-bdtitle">{data?.articles?.['16']?.title}</div>
|
||||
<div class="xznews-tiptitle">{data?.articles?.['16']?.desc}</div>
|
||||
</div>
|
||||
<a class="xznews-tip" target="_blank" href="//news.vobao.com/ceping/1/">+更多</a>
|
||||
</div>
|
||||
<div class="xznews-box">
|
||||
<div class="xznews-box-f xznews-box-width2">
|
||||
<div class="xznews-f-list">
|
||||
{
|
||||
data?.articles?.['16']?.item?.slice(0, 2).map((e, index) => (
|
||||
<a title={e.title} class="f-item-spc" target="_blank" href={`/news/${e.id}`}>
|
||||
<div class="item-spc-title">{e.title}</div>
|
||||
<div class="item-spc-cont">{e.description}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
{
|
||||
data?.articles?.['16']?.item?.slice(2, 5).map((e, index) => (
|
||||
<a title={e.title} class="f-item" target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="xznews-box-s xznews-box-width">
|
||||
{
|
||||
data?.articles?.['16']?.item?.slice(5, 6).map((e, index) => (
|
||||
<a class="s-img-item" target="_blank" href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="s-img" />
|
||||
<div class="s-img-tip">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="xznews-box-t xznews-box-width3">
|
||||
<div class="t-list t-list2">
|
||||
{
|
||||
data?.articles?.['16']?.item?.slice(6, 9).map((e, index) => (
|
||||
<a class="t-item-spc" title={e.title} target="_blank" href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="t-item-img" />
|
||||
<div class="t-item-box">
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
<div class="t-item-tip">{e.created_at}</div>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 养老险 -->
|
||||
<div class="xznews-container width-1200">
|
||||
<div class="xznews-head">
|
||||
<div class="xznews-title">
|
||||
<div class="xznews-bdtitle">{data?.articles?.['17']?.title}</div>
|
||||
<div class="xznews-tiptitle">{data?.articles?.['17']?.desc}</div>
|
||||
</div>
|
||||
<a class="xznews-tip" href="//news.vobao.com/ceping/2/" target="_blank">+更多</a>
|
||||
</div>
|
||||
<div class="xznews-box">
|
||||
<div class="xznews-box-f xznews-box-width">
|
||||
<div class="xznews-f-pitem">
|
||||
{
|
||||
data?.articles?.['17']?.item?.slice(0, 2).map((e, index) => (
|
||||
<a class="pitem-item" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="item-img" />
|
||||
<div class="item-title">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
{
|
||||
data?.articles?.['17']?.item?.slice(2, 3).map((e, index) => (
|
||||
<a class="xznews-f-fitem" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="fitem-img" />
|
||||
<div class="fitem-tip">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="xznews-box-s xznews-box-width2">
|
||||
<div class="xznews-s-list spc-list">
|
||||
{
|
||||
data?.articles?.['15']?.item?.slice(3, 10).map((e, index) => (
|
||||
<a title={e.title} class={index > 0 ? ' s-list-item' : 's-list-item spc-item'} target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="xznews-s-list">
|
||||
{
|
||||
data?.articles?.['15']?.item?.slice(10, 17).map((e, index) => (
|
||||
<a title={e.title} class={index > 0 ? ' s-list-item' : 's-list-item spc-item'} target="_blank" href={`/news/${e.id}`}>{e.title}</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="xznews-box-t xznews-box-width3">
|
||||
<div class="t-list">
|
||||
{
|
||||
data?.articles?.['17']?.item?.slice(18, 20).map((e, index) => (
|
||||
<a class="t-item-spc" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<img src={e.cover} alt="" class="t-item-img" />
|
||||
<div class="t-item-box">
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
<div class="t-item-tip">{e.created_at}</div>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
{
|
||||
data?.articles?.['17']?.item?.slice(20, 30).map((e, index) => (
|
||||
<a class="t-item" target="_blank" title={e.title} href={`/news/${e.id}`}>
|
||||
<div class="t-item-tip">{index + 1}</div>
|
||||
<div class="t-item-title">{e.title}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
|
7
src/pages/insurance/[...slug].astro
Normal file
7
src/pages/insurance/[...slug].astro
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
import "../../assets/css/hTopSort.css";
|
||||
import "../../assets/css/member.css";
|
||||
import ColumnList from '../../components/ColumnList.astro'
|
||||
const defaultColumn = 11
|
||||
---
|
||||
<ColumnList cid ={defaultColumn}/>
|
8
src/pages/insurance/news/[id]/index.astro
Normal file
8
src/pages/insurance/news/[id]/index.astro
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
const {id} = Astro.params
|
||||
import ColumnList from '../../../../components/ColumnList.astro'
|
||||
if (!id) {
|
||||
return Astro.rewrite('/404')
|
||||
}
|
||||
---
|
||||
<ColumnList cid={id} />
|
6
src/pages/insurance/news/[id]/list_[page]/index.astro
Normal file
6
src/pages/insurance/news/[id]/list_[page]/index.astro
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
const {page, id} = Astro.params
|
||||
import ColumnList from '../../../../../components/ColumnList.astro'
|
||||
console.log(Astro.params)
|
||||
---
|
||||
<ColumnList page = {page} cid={id}/>
|
215
src/pages/news/[...slug].astro
Normal file
215
src/pages/news/[...slug].astro
Normal file
@ -0,0 +1,215 @@
|
||||
---
|
||||
import "../../assets/css/news.css";
|
||||
import "../../assets/css/detail.css";
|
||||
import "../../assets/css/news_detail.css";
|
||||
import "../../assets/css/licai.css";
|
||||
import "../../assets/css/hTopSort.css";
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
// import Sort from '../../components/Sort.astro'
|
||||
import { getConfig } from "../../../utils/config";
|
||||
import { newsDetail, columns as getColumns } from "../../../utils/rpc";
|
||||
const { slug } = Astro.params;
|
||||
const config = getConfig(Astro);
|
||||
if (!slug) {
|
||||
return Astro.rewrite("/404");
|
||||
}
|
||||
var { code, data } = await newsDetail(slug, config);
|
||||
---
|
||||
<Layout>
|
||||
<section id="body" class="content-wrapper main-content clear-fix">
|
||||
<!-- 中间内容开始 -->
|
||||
<div class="box">
|
||||
<!-- <Sort /> -->
|
||||
|
||||
<div class="info-box">
|
||||
<!-- 左边开始 -->
|
||||
<div class="ndetail fl" id="article_content">
|
||||
<h1>{data.title}</h1>
|
||||
<div class="ndtitle fl">
|
||||
<span class="soure fr">
|
||||
来源:<a
|
||||
href="//www.vobao.com"
|
||||
target="_blank"
|
||||
style="color:#c7c7c7;">沃保网编辑整理</a
|
||||
> 2025-07-22 10:55:04
|
||||
</span>
|
||||
</div>
|
||||
<div class="text-main">
|
||||
<Fragment set:html={data.content} />
|
||||
</div>
|
||||
<!--保险测评 文章-->
|
||||
<div
|
||||
style="margin: 10px 0px; padding: 15px 20px; line-height: 26px; font-size: 14px; color: #8a98ab; background: #f5f5f5; float: left"
|
||||
>
|
||||
声明:凡本网站注明“来源:沃保网”的文章,版权均属沃保网所有,如需转载,请先阅读<a
|
||||
href="//help.vobao.com/dongtai/916584998482794341.shtml"
|
||||
target="_blank"
|
||||
style="color: blue">《内容转载授权说明》</a
|
||||
>,按照相关规定获得授权。未经授权,禁止转载、摘编,如有违反,追究法律责任;资讯内容中如有提及保险产品信息仅供参考,具体请以保险公司官方正式条款为准;如有涉及信息准确性偏差,请联系沃保官方客服。
|
||||
</div>
|
||||
<!-- 分享 -->
|
||||
<script>
|
||||
function hideMore(obj) {
|
||||
console.log();
|
||||
if ($(obj).hasClass("more-img-up")) {
|
||||
$(obj)
|
||||
.parent()
|
||||
.parent()
|
||||
.children(0)
|
||||
.children(1)
|
||||
.addClass("max-height");
|
||||
$(obj).removeClass("more-img-up");
|
||||
} else {
|
||||
$(obj)
|
||||
.parent()
|
||||
.parent()
|
||||
.children(0)
|
||||
.children(1)
|
||||
.removeClass("max-height");
|
||||
$(obj).addClass("more-img-up");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- 相关资讯 -->
|
||||
<div class="absoutnews">
|
||||
<div class="titleone titbg2">
|
||||
<span class="toleft">相关资讯</span>
|
||||
</div>
|
||||
<div class="pmain">
|
||||
{
|
||||
data.about.map(e => (
|
||||
<div class="z-main clearfix">
|
||||
<a title={e.title} href={`/news/${e.id}`} target="_blank">
|
||||
<div class="z-left fl">
|
||||
<img class="z-left__img" src={e.cover} alt={e.title} />
|
||||
</div>
|
||||
<div class="z-right fl">
|
||||
<p class="z-right__title">
|
||||
{e.title}
|
||||
</p>
|
||||
<p class="z-right__des" style="color:#AEADAB;">
|
||||
|
||||
</p>
|
||||
<span class="z-right__time">{e.created_at}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右边开始 -->
|
||||
<div class="main-right">
|
||||
<!-- 一周热门榜 -->
|
||||
<div id="WeeklyHot"></div>
|
||||
<div id="divZJ">
|
||||
<link
|
||||
href="/Content/News/newsappointmentpartial.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<div class="gnright fr sp-yzrmb">
|
||||
<div
|
||||
class="border-around clear week-hot new__821"
|
||||
style="margin-bottom:15px; padding:0 10px;"
|
||||
>
|
||||
<div
|
||||
class="titletwo titbg7 fl"
|
||||
style="margin: 15px 0 10px 0; width: 281px;"
|
||||
>
|
||||
<span class="toleft fl">推荐新闻</span>
|
||||
<span class="toright fr">
|
||||
<a
|
||||
href="javascript:void(0)"
|
||||
title=""
|
||||
style="display: none"
|
||||
>更多>></a
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
{
|
||||
data.about.slice(0,3).map(e => (
|
||||
<a href={`/news/${e.id}`} target="_blank" >
|
||||
<div style="clear:both; margin:15px 0px; display:inline-block;">
|
||||
<div style="position:relative;float: left;" >
|
||||
<img src={e.cover} alt={e.title} style="max-width:110px;" />
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size:16px;font-weight:bold;color:#666;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:134px;">
|
||||
{e.title}
|
||||
</div>
|
||||
<div style="display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; font-size:16px; color:#AEADAB; margin-top:5px;">
|
||||
{e.description}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
{
|
||||
data.about.slice(3,5).map(e => (
|
||||
<a href="/article/1145877620262775728.shtml" target="_blank" >
|
||||
<div style="clear:both; margin:15px 0px; display:inline-block; width: 281px;">
|
||||
<div style="float:left; width:100%;">
|
||||
<div style="font-size:16px;font-weight:bold;color:#666;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:100%;">
|
||||
{e.title}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</Layout>
|
||||
<style>
|
||||
.sort-main {
|
||||
background-color: #f9f9f9;
|
||||
margin-bottom: 0 !important;
|
||||
padding: 10px 0px;
|
||||
display: flex;
|
||||
}
|
||||
.sort-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.sort-title {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.sort-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.sort-right span {
|
||||
display: inline-block;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
padding: 10px 5px 10px 0;
|
||||
}
|
||||
.sort-main .h-sort {
|
||||
height: 45px !important;
|
||||
}
|
||||
.sort-main .h-sort .sort-left .left-img {
|
||||
width: 20px !important;
|
||||
}
|
||||
.h-sort {
|
||||
padding: 0 15px !important;
|
||||
}
|
||||
.spc-img {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.sort-main2 {
|
||||
background-color: #f9f9f9;
|
||||
text-align: center;
|
||||
padding: 0px 0px 10px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user