Files
workspace/code/link-site/link-nuxt/app/pages/company/[slug].vue
T
2026-08-31 22:32:03 +08:00

44 lines
1.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import { getCompany } from '~/data/mock'
// 企业空间使用独立的 company 布局:顶部只有一根纯企业导航(到顶、不含公司信息),
// 公司身份信息下放到导航下方的内容 hero(CompanyIdentityHeader),满足“导航上方无特殊信息”。
definePageMeta({
layout: 'company'
})
const route = useRoute()
const company = getCompany(route.params.slug as string)
if (!company) {
throw createError({
statusCode: 404,
statusMessage: '企业不存在',
fatal: true
})
}
useSeoMeta({
title: `${company.name} - 链通物流`,
description: `${company.description}`,
ogTitle: company.name,
ogDescription: company.description
})
// 传给子页面(/company/[slug]/index、about、articles、services、contact)
provide('company', company)
</script>
<template>
<div v-if="company">
<!-- 顶部:纯企业导航(唯一一根栏,不含公司信息) -->
<CompanyPageTabs :company="company" />
<!-- 导航下方:企业 hero(公司信息放在内容区,不在导航栏) -->
<CompanyIdentityHeader :company="company" />
<NuxtPage />
</div>
</template>