更新首页

This commit is contained in:
2026-09-11 12:25:38 +08:00
parent 9e24153eac
commit c29c3be942
326 changed files with 6564 additions and 44307 deletions
+247
View File
@@ -0,0 +1,247 @@
<template>
<div class="member-detail-page">
<PortalHeader active-path="/membership" />
<main class="container member-detail-main">
<div class="breadcrumb-bar">
<NuxtLink to="/">首页</NuxtLink>
<span>/</span>
<NuxtLink to="/membership">会员服务</NuxtLink>
<span>/</span>
<span>{{ service.title || "会员服务详情" }}</span>
</div>
<div v-if="loading" class="state-wrap">
<a-skeleton active :paragraph="{ rows: 10 }" />
</div>
<div v-else-if="!service.serviceId" class="state-wrap">
<a-result status="404" title="会员服务不存在" sub-title="您查找的会员服务不存在或已下线">
<template #extra>
<a-button type="primary" @click="navigateTo('/membership')">返回会员服务</a-button>
</template>
</a-result>
</div>
<article v-else class="member-detail-card">
<div class="member-head">
<div>
<div class="service-badge">{{ service.categoryName }}</div>
<h1>{{ service.title }}</h1>
<p>{{ service.summary || "会员服务详情" }}</p>
</div>
<span v-if="service.publishTime" class="join-time">发布时间{{ service.publishTime }}</span>
</div>
<div v-if="service.tags?.length" class="tag-list">
<span v-for="tag in service.tags" :key="tag">{{ tag }}</span>
</div>
<section class="content-section">
<h2>服务介绍</h2>
<div v-if="service.content" class="content-body" v-html="service.content" />
<div v-else class="content-body">
<p>{{ service.summary || "暂无详情。" }}</p>
</div>
</section>
</article>
</main>
<footer class="site-footer">
<PortalFooter />
</footer>
</div>
</template>
<script setup lang="ts">
import { message } from "ant-design-vue"
import { getSiteMembershipService, type SiteMembershipService } from "@/api/site"
import { usePageSeo } from "@/composables/usePageSeo"
definePageMeta({
layout: "blank"
})
usePageSeo({
title: "会员服务详情",
description: "广西决策咨询网会员服务详情页"
})
const route = useRoute()
const memberId = computed(() => route.params.id as string)
const loading = ref(true)
const service = ref<Partial<SiteMembershipService>>({})
useHead({
title: computed(() => `${service.value.title || "会员服务详情"} - 广西决策咨询网`),
meta: [
{ name: "description", content: computed(() => service.value.summary || "广西决策咨询网会员服务详情页") }
]
})
async function loadMember() {
loading.value = true
try {
service.value = await getSiteMembershipService(memberId.value)
} catch (error) {
service.value = {}
if (!(error instanceof Error && /404/.test(error.message))) {
message.error(error instanceof Error ? error.message : "加载失败")
}
} finally {
loading.value = false
}
}
watch(memberId, () => {
loadMember()
})
onMounted(() => {
loadMember()
})
</script>
<style scoped>
.member-detail-page {
min-height: 100vh;
background: #f5f7fa;
}
.container {
width: min(1200px, calc(100% - 32px));
margin: 0 auto;
}
.member-detail-main {
padding: 28px 0 48px;
}
.breadcrumb-bar {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 24px;
color: #7d8a98;
font-size: 14px;
}
.breadcrumb-bar a {
color: #4a6fa1;
}
.member-detail-card {
padding: 32px;
background: #fff;
border: 1px solid #e5ebf2;
}
.member-head {
display: flex;
align-items: start;
justify-content: space-between;
gap: 24px;
padding-bottom: 24px;
border-bottom: 1px solid #edf1f5;
}
.service-badge {
display: inline-flex;
margin-bottom: 14px;
padding: 6px 14px;
border-radius: 999px;
background: #eef5ff;
color: #2d7af0;
font-size: 13px;
}
.member-head h1 {
margin: 0 0 10px;
color: #1f2d3d;
font-size: 34px;
line-height: 1.2;
}
.member-head p {
margin: 0;
color: #64707d;
font-size: 15px;
}
.join-time {
flex-shrink: 0;
color: #7d8a98;
font-size: 14px;
}
.tag-list {
display: flex;
flex-wrap: wrap;
gap: 12px;
padding: 24px 0 10px;
}
.tag-list span {
padding: 7px 14px;
border: 1px solid #9fc3ff;
border-radius: 12px;
color: #2d7af0;
font-size: 14px;
}
.content-section {
padding-top: 8px;
}
.content-section h2 {
margin: 0 0 16px;
color: #1f2d3d;
font-size: 22px;
}
.content-body {
color: #495463;
font-size: 15px;
line-height: 2;
}
.content-body :deep(p) {
margin: 0 0 16px;
}
.content-body :deep(*:last-child) {
margin-bottom: 0;
}
.state-wrap {
padding: 40px 0;
}
.site-footer {
margin-top: 24px;
}
.footer-nav {
background: #1f4fa3;
}
.footer-nav-inner {
display: flex;
align-items: center;
justify-content: center;
gap: 32px;
min-height: 58px;
}
.footer-nav-inner a {
color: rgba(255, 255, 255, 0.9);
font-size: 14px;
}
@media (max-width: 768px) {
.member-head {
flex-direction: column;
}
}
</style>
+249 -176
View File
@@ -1,149 +1,137 @@
<template>
<div class="membership-page">
<div class="page-header">
<h1 class="page-title">会员服务</h1>
<p class="page-desc">为企业会员和个人会员提供专业高效的咨询服务</p>
</div>
<PortalHeader active-path="/membership" />
<!-- 分类标签 -->
<div class="category-tabs">
<a-radio-group v-model:value="activeType" button-style="solid" @change="handleTypeChange">
<a-radio-button value="">全部</a-radio-button>
<a-radio-button value="consult">企业咨询</a-radio-button>
<a-radio-button value="service">专项服务</a-radio-button>
</a-radio-group>
</div>
<!-- 服务列表 -->
<div class="service-grid">
<div v-for="service in services" :key="service.id" class="service-card" @click="handleView(service)">
<div class="service-icon">{{ service.icon }}</div>
<h3 class="service-title">{{ service.title }}</h3>
<p class="service-desc">{{ service.description }}</p>
<div class="service-tags">
<a-tag v-for="tag in service.tags" :key="tag" color="blue">{{ tag }}</a-tag>
<main class="container membership-main">
<div class="page-head">
<div>
<h1>会员服务</h1>
<p>企业会员和个人会员提供专业高效的咨询服务</p>
</div>
<div class="page-summary">
<span>{{ total }} 项服务内容</span>
</div>
</div>
<div v-if="loading" class="loading-placeholder">
<a-spin size="large" />
<div class="filter-bar">
<button
v-for="item in tabs"
:key="item.key"
type="button"
class="filter-btn"
:class="{ active: activeTab === item.key }"
@click="handleTabChange(item.key)"
>
{{ item.label }}
</button>
</div>
<div v-if="!loading && services.length === 0" class="empty-placeholder">
<a-empty description="暂无服务" />
<div v-if="loading" class="state-wrap">
<a-skeleton v-for="i in 6" :key="i" active :paragraph="{ rows: 3 }" />
</div>
</div>
<!-- 联系我们 -->
<div class="contact-section">
<h2>联系我们</h2>
<p>如有疑问或需要帮助请随时与我们联系</p>
<a-space size="large" direction="vertical">
<a-space size="large">
<span>📞</span>
<span>联系电话0771-5386339</span>
</a-space>
<a-space size="large">
<span>📧</span>
<span>咨询邮箱gxjzxzx@126.com</span>
</a-space>
<a-space size="large">
<span></span>
<span>服务时间周一至周五 9:00-17:00</span>
</a-space>
</a-space>
<div style="margin-top: 20px;">
<a-button type="primary" size="large" @click="navigateTo('/about/consultation')">
了解咨询服务详情
</a-button>
<div v-else-if="!services.length" class="state-wrap">
<a-empty description="暂无会员服务" />
</div>
</div>
<div v-else class="service-grid">
<article
v-for="item in services"
:key="item.serviceId || item.id"
class="service-card"
@click="goDetail(item)"
>
<div class="service-card-icon">{{ item.icon || "•" }}</div>
<div class="service-card-top">
<h3>{{ item.title }}</h3>
<span>{{ item.categoryName }}</span>
</div>
<p>{{ item.summary || "暂无简介" }}</p>
<div v-if="item.tags?.length" class="service-card-tags">
<span v-for="tag in item.tags" :key="tag">{{ tag }}</span>
</div>
</article>
</div>
</main>
<footer class="site-footer">
<PortalFooter />
</footer>
</div>
</template>
<script setup lang="ts">
import { message } from 'ant-design-vue'
import { message } from "ant-design-vue"
import { pageSiteMembershipServices, type SiteMembershipService } from "@/api/site"
import { usePageSeo } from "@/composables/usePageSeo"
useHead({ title: '会员服务 - 决策咨询网' })
definePageMeta({
layout: "blank"
})
const activeType = ref((useRoute().query.type as string) || '')
const loading = ref(false)
const services = ref<any[]>([])
usePageSeo({
title: "会员服务",
description: "广西决策咨询网会员服务"
})
const mockServices = [
{
id: 1,
type: 'consult',
icon: '🏢',
title: '企业决策咨询',
description: '为企业提供战略规划、政策解读、市场分析等专业决策咨询服务,助力企业把握发展机遇。',
tags: ['企业咨询', '战略规划'],
},
{
id: 2,
type: 'service',
icon: '📊',
title: '专题研究报告',
description: '提供行业专题研究、政策分析报告、区域发展研究等专业研究成果。',
tags: ['研究报告', '深度分析'],
},
{
id: 3,
type: 'consult',
icon: '🎯',
title: '政策合规指导',
description: '协助企业理解最新政策法规,确保企业运营符合政策要求,规避合规风险。',
tags: ['政策合规', '风险规避'],
},
{
id: 4,
type: 'service',
icon: '📋',
title: '专家论证会',
description: '组织相关领域专家为企业重大决策提供专业论证和咨询建议。',
tags: ['专家论证', '专业咨询'],
},
{
id: 5,
type: 'service',
icon: '🌐',
title: '数据服务',
description: '提供决策所需的经济数据、行业数据、区域数据等专业数据服务(仅限会员)。',
tags: ['数据服务', '会员专享'],
},
{
id: 6,
type: 'consult',
icon: '💼',
title: '培训与讲座',
description: '为企业及个人提供政策解读、决策方法等专题培训和讲座服务。',
tags: ['培训讲座', '能力提升'],
},
const route = useRoute()
const router = useRouter()
const tabs = [
{ key: "all", label: "全部" },
{ key: "consult", label: "企业咨询" },
{ key: "service", label: "专项服务" },
]
const total = ref(0)
const loading = ref(false)
const services = ref<SiteMembershipService[]>([])
const activeTab = ref(((route.query.type as string) || "all"))
async function loadServices() {
loading.value = true
try {
// TODO: 接入实际API获取会员服务列表
// 暂时使用模拟数据
await new Promise(resolve => setTimeout(resolve, 300))
const type = activeType.value
services.value = type ? mockServices.filter(s => s.type === type) : mockServices
} catch (e: any) {
message.error('加载失败')
const data = await pageSiteMembershipServices({
page: 1,
limit: 60,
categoryKey: activeTab.value === "all" ? undefined : activeTab.value,
})
total.value = data.count || 0
services.value = data.list || []
} catch (error) {
services.value = []
total.value = 0
message.error(error instanceof Error ? error.message : "加载会员服务失败")
} finally {
loading.value = false
}
}
function handleTypeChange() {
function updateRoute(type: string) {
router.replace({
query: {
...(type !== "all" ? { type } : {}),
}
})
}
function handleTabChange(type: string) {
if (activeTab.value === type) {
return
}
activeTab.value = type
updateRoute(type)
loadServices()
}
function handleView(service: any) {
message.info(`服务「${service.title}」详情页开发中,请联系工作人员获取更多信息`)
function goDetail(item: SiteMembershipService) {
router.push(`/membership/${item.serviceId || item.id}`)
}
watch(() => route.query.type, (value) => {
activeTab.value = (value as string) || "all"
loadServices()
})
onMounted(() => {
loadServices()
})
@@ -151,116 +139,201 @@ onMounted(() => {
<style scoped>
.membership-page {
max-width: 1200px;
min-height: 100vh;
background: #f5f7fa;
}
.container {
width: min(1200px, calc(100% - 32px));
margin: 0 auto;
padding: 40px 20px;
}
.page-header {
text-align: center;
margin-bottom: 40px;
.membership-main {
padding: 32px 0 48px;
}
.page-title {
font-size: 32px;
font-weight: 700;
color: #1f2937;
margin: 0 0 12px;
.page-head {
display: flex;
align-items: end;
justify-content: space-between;
gap: 24px;
margin-bottom: 22px;
}
.page-desc {
font-size: 16px;
color: #6b7280;
.page-head h1 {
margin: 0 0 10px;
color: #1f2d3d;
font-size: 34px;
line-height: 1.2;
}
.page-head p {
margin: 0;
color: #697586;
font-size: 15px;
}
.category-tabs {
margin-bottom: 32px;
text-align: center;
.page-summary {
color: #7d8a98;
font-size: 14px;
}
.filter-bar {
display: inline-flex;
margin-bottom: 36px;
border: 1px solid #d8dee7;
border-radius: 14px;
overflow: hidden;
}
.filter-btn {
min-width: 132px;
padding: 12px 20px;
border: none;
background: #fff;
color: #233245;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s ease, color 0.2s ease;
}
.filter-btn + .filter-btn {
border-left: 1px solid #d8dee7;
}
.filter-btn.active {
background: #2d7af0;
color: #fff;
}
.service-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 22px;
}
.service-card {
min-height: 240px;
padding: 34px 38px;
border: 1px solid #eef2f7;
border-radius: 22px;
background: #fff;
border-radius: 12px;
padding: 24px;
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
cursor: pointer;
transition: all 0.2s;
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
box-shadow: 0 18px 40px rgba(17, 34, 68, 0.06);
}
.service-card:hover {
box-shadow: 0 4px 16px rgba(0,0,0,0.1);
transform: translateY(-4px);
border-color: #cfe0ff;
box-shadow: 0 20px 42px rgba(36, 82, 156, 0.12);
transform: translateY(-2px);
}
.service-icon {
font-size: 48px;
margin-bottom: 16px;
.service-card-icon {
margin-bottom: 18px;
color: #4b6ea8;
font-size: 56px;
line-height: 1;
}
.service-title {
font-size: 18px;
font-weight: 600;
color: #1f2937;
margin: 0 0 8px;
.service-card-top {
display: flex;
align-items: start;
justify-content: space-between;
gap: 16px;
margin-bottom: 14px;
}
.service-desc {
.service-card-top h3 {
margin: 0;
color: #1f2d3d;
font-size: 24px;
line-height: 1.4;
}
.service-card-top span {
flex-shrink: 0;
color: #7c8eab;
font-size: 14px;
color: #6b7280;
margin: 0 0 16px;
line-height: 1.6;
}
.service-tags {
.service-card p {
margin: 0 0 18px;
color: #66768a;
font-size: 16px;
line-height: 1.85;
}
.service-card-tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
gap: 12px;
}
.contact-section {
margin-top: 60px;
padding: 40px;
background: #f9fafb;
border-radius: 16px;
text-align: center;
}
.contact-section h2 {
font-size: 20px;
font-weight: 600;
color: #1f2937;
margin: 0 0 8px;
}
.contact-section p {
.service-card-tags span {
padding: 6px 14px;
border: 1px solid #99c1ff;
border-radius: 12px;
color: #2d7af0;
font-size: 14px;
color: #6b7280;
margin: 0 0 16px;
line-height: 1.2;
}
.loading-placeholder,
.empty-placeholder {
grid-column: 1 / -1;
padding: 60px 0;
text-align: center;
.state-wrap {
display: grid;
gap: 20px;
}
.site-footer {
margin-top: 24px;
}
.footer-nav {
background: #1f4fa3;
}
.footer-nav-inner {
display: flex;
align-items: center;
justify-content: center;
gap: 32px;
min-height: 58px;
}
.footer-nav-inner a {
color: rgba(255, 255, 255, 0.9);
font-size: 14px;
}
@media (max-width: 1024px) {
.service-grid {
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 640px) {
@media (max-width: 768px) {
.membership-main {
padding-top: 24px;
}
.page-head {
flex-direction: column;
align-items: stretch;
}
.filter-bar {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.service-grid {
grid-template-columns: 1fr;
}
.service-card {
min-height: auto;
padding: 28px 22px;
}
}
</style>