ct/app/components/DevelopNews.vue

147 lines
4.3 KiB
Vue
Raw Normal View History

2025-09-29 18:02:28 +08:00
<template>
2025-09-30 12:02:39 +08:00
<div class="bg-default py-12">
2025-09-29 18:02:28 +08:00
<div class="container mx-auto px-4 max-w-6xl">
<!-- 页面标题 -->
<div class="text-center mb-12">
2025-09-30 12:02:39 +08:00
<h1 class="text-3xl lg:text-4xl font-bold text-default mb-2">
2025-09-29 18:02:28 +08:00
开发资讯
</h1>
2025-09-30 12:02:39 +08:00
<p class="text-lg text-muted">NEWS</p>
2025-09-29 18:02:28 +08:00
</div>
<!-- 三栏资讯布局 -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<!-- 解决方案栏目 -->
2025-09-30 12:02:39 +08:00
<div class="bg-default border border-divider rounded-lg shadow-sm">
<div class="p-6 border-b border-divider">
<h2 class="text-xl font-semibold text-default">解决方案</h2>
2025-09-29 18:02:28 +08:00
</div>
<div class="p-6 space-y-6">
2025-10-07 17:10:00 +08:00
<div
v-for="article in articles.solutions"
:key="article.id"
class="group cursor-pointer"
@click="handleArticleClick(article.link)"
>
2025-09-30 12:02:39 +08:00
<h3 class="text-lg font-medium text-default group-hover:text-primary transition-colors mb-2 line-clamp-2">
2025-10-07 17:10:00 +08:00
{{ article.title }}
2025-09-29 18:02:28 +08:00
</h3>
2025-10-07 17:10:00 +08:00
<p class="text-sm text-muted">{{ article.date }}</p>
2025-09-29 18:02:28 +08:00
</div>
</div>
</div>
<!-- 开发知识栏目 -->
2025-09-30 12:02:39 +08:00
<div class="bg-default border border-divider rounded-lg shadow-sm">
<div class="p-6 border-b border-divider">
<h2 class="text-xl font-semibold text-default">开发知识</h2>
2025-09-29 18:02:28 +08:00
</div>
<div class="p-6 space-y-6">
2025-10-07 17:10:00 +08:00
<div
v-for="article in articles.knowledge"
:key="article.id"
class="group cursor-pointer"
@click="handleArticleClick(article.link)"
>
2025-09-30 12:02:39 +08:00
<h3 class="text-lg font-medium text-default group-hover:text-primary transition-colors mb-2">
2025-10-07 17:10:00 +08:00
{{ article.title }}
2025-09-29 18:02:28 +08:00
</h3>
2025-10-07 17:10:00 +08:00
<p class="text-sm text-muted">{{ article.date }}</p>
2025-09-29 18:02:28 +08:00
</div>
</div>
</div>
<!-- 行业动态栏目 -->
2025-09-30 12:02:39 +08:00
<div class="bg-default border border-divider rounded-lg shadow-sm">
<div class="p-6 border-b border-divider">
<h2 class="text-xl font-semibold text-default">行业动态</h2>
2025-09-29 18:02:28 +08:00
</div>
<div class="p-6 space-y-6">
2025-10-07 17:10:00 +08:00
<div
v-for="article in articles.trends"
:key="article.id"
class="group cursor-pointer"
@click="handleArticleClick(article.link)"
>
2025-09-30 12:02:39 +08:00
<h3 class="text-lg font-medium text-default group-hover:text-primary transition-colors mb-2">
2025-10-07 17:10:00 +08:00
{{ article.title }}
2025-09-29 18:02:28 +08:00
</h3>
2025-10-07 17:10:00 +08:00
<p class="text-sm text-muted">{{ article.date }}</p>
2025-09-29 18:02:28 +08:00
</div>
</div>
</div>
</div>
</div>
</div>
</template>
2025-09-30 12:02:39 +08:00
<script setup>
// 数据定义
const articles = {
solutions: [
{
2025-10-07 17:10:00 +08:00
id: 1,
2025-09-30 12:02:39 +08:00
title: "创特景区SaaS平台 打造专业景区共享出行综合解决方案",
2025-10-07 17:10:00 +08:00
date: "2025-07-08 12:40",
link: "/new"
2025-09-30 12:02:39 +08:00
},
{
2025-10-07 17:10:00 +08:00
id: 2,
2025-09-30 12:02:39 +08:00
title: "为什么说景区共享代步车的未来发展空间巨大?",
2025-10-07 17:10:00 +08:00
date: "2023-05-08 11:25",
link: "/news/scenic-shared-vehicle-future"
2025-09-30 12:02:39 +08:00
}
],
knowledge: [
{
2025-10-07 17:10:00 +08:00
id: 3,
2025-09-30 12:02:39 +08:00
title: "共享电动车为何能在共享经济中独树一帜?",
2025-10-07 17:10:00 +08:00
date: "2023-06-29 12:26",
link: "/news/shared-ebike-unique-position"
2025-09-30 12:02:39 +08:00
},
{
2025-10-07 17:10:00 +08:00
id: 4,
2025-09-30 12:02:39 +08:00
title: "景区共享智能代步车运营方案有哪些?",
2025-10-07 17:10:00 +08:00
date: "2023-05-10 10:23",
link: "/news/scenic-smart-vehicle-operations"
2025-09-30 12:02:39 +08:00
}
],
trends: [
{
2025-10-07 17:10:00 +08:00
id: 5,
2025-09-30 12:02:39 +08:00
title: "景区共享电动代步车如何引领景区发展趋势?",
2025-10-07 17:10:00 +08:00
date: "2024-12-11 23:53",
link: "/news/scenic-ebike-trend-leadership"
2025-09-30 12:02:39 +08:00
},
{
2025-10-07 17:10:00 +08:00
id: 6,
2025-09-30 12:02:39 +08:00
title: "景区共享观光代步车为何如此火爆?",
2025-10-07 17:10:00 +08:00
date: "2023-07-13 15:42",
link: "/news/scenic-sightseeing-vehicle-popularity"
2025-09-30 12:02:39 +08:00
}
]
}
2025-10-07 17:10:00 +08:00
// 处理文章点击事件
const handleArticleClick = (articleLink) => {
// 使用Nuxt的navigateTo进行路由跳转
navigateTo(articleLink)
}
2025-09-30 12:02:39 +08:00
</script>
2025-09-29 18:02:28 +08:00
<style scoped>
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* 响应式调整 */
@media (max-width: 1024px) {
.grid {
gap: 1.5rem;
}
}
</style>