dl_site_nuxt/pages/products.vue
2025-07-15 22:54:24 +08:00

74 lines
1.5 KiB
Vue

<template>
<!-- 新闻 -->
<div class="content">
<BannerTop :options="bannerTopOptions"/>
<section class="container pt-4 pb-4">
<div class="row">
<AsideTree
class="col-md-3 mb-4 mb-md-0"
:treeData="categoryTree"
:headerTitle="$t('products.allProducts')"
baseUrl="/products"
/>
<main class="col-md-9">
<div class="pretty-header">
<h2>Low Bed Trailer</h2>
</div>
<nuxt-child />
</main>
</div>
</section>
</div>
</template>
<script>
export default {
name: 'products',
data() {
return {
bannerTopOptions: {
title: this.$t('products.products'),
subTitle: this.$t('products.allProducts'),
img: require('../assets/image/banner/products-banner.png')
},
}
},
async asyncData({$axios}) {
// 获取新闻分类
const categoryTree = await $axios.$get('/web/prodCategory')
return {
categoryTree
}
},
head() {
return {
title: this.$t('seo.product.title'), // 页面标题
meta: [
{
hid: 'keywords',
name: 'keywords',
content: this.$t('seo.product.keywords')
},
{
hid: 'description',
name: 'description',
content: this.$t('seo.product.description')
}
]
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
height: 100%;
}
</style>