From 0551d7062fb6bef788630a32d825c38d80bdd595 Mon Sep 17 00:00:00 2001 From: hejin Date: Sat, 12 Jul 2025 19:41:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5=EF=BC=9A?= =?UTF-8?q?=20=20=20=20=20=20=E9=A6=96=E9=A1=B5=EF=BC=9A=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=201.=20=E9=A6=96=E9=A1=B5=E8=BD=AE=E6=92=AD?= =?UTF-8?q?=E5=9B=BE=20=20=20=20=20=20=20=20=20=20=202.=20=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=85=AC=E5=8F=B8=E7=AE=80=E4=BB=8B=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=203.=20=E7=83=AD=E9=97=A8=E4=BA=A7=E5=93=81=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=204.=20=E6=99=AE=E9=80=9A=E4=BA=A7?= =?UTF-8?q?=E5=93=81=20=20=20=20=20=20=20=E6=96=B0=E9=97=BB=EF=BC=9A=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=201.=E5=88=86=E7=B1=BB=20=20=20=20=20?= =?UTF-8?q?=20footer=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/aside-tree.vue | 67 +++++++++------------------------------ components/footer.vue | 24 +++++++++----- env.js | 7 ++-- locales/en.json | 12 +++++++ locales/zh.json | 12 +++++++ middleware/footer.js | 7 ++++ nuxt.config.js | 2 +- pages/index.vue | 65 +++++++++++++++++++++++-------------- pages/news.vue | 31 +++++++++++++++++- pages/products.vue | 27 +++++++++++++++- plugins/axios.js | 7 +++- store/index.js | 6 +++- 12 files changed, 175 insertions(+), 92 deletions(-) create mode 100644 middleware/footer.js diff --git a/components/aside-tree.vue b/components/aside-tree.vue index efac75f..1f998a2 100644 --- a/components/aside-tree.vue +++ b/components/aside-tree.vue @@ -7,6 +7,7 @@ :data="treeData" node-key="id" highlight-current + :props="props" /> @@ -43,61 +44,23 @@ export default { headerTitle: { type: String, default: '' + }, + treeData: { + type: Array, + default: () => [] + }, + props: { + type: Object, + default: () => { + return { + children: 'children', + label: 'label' + } + } } }, data () { - return { - treeData: [ - { - id: 1, - label: 'Level 1 - 1', - children: [ - { - id: 4, - label: 'Level 2 - 1-1', - children: [ - { - id: 9, - label: 'Level 3 - 1-1-1' - }, - { - id: 10, - label: 'Level 3 - 1-1-2' - } - ] - } - ] - }, - { - id: 2, - label: 'Level 1 - 2', - children: [ - { - id: 5, - label: 'Level 2 - 2-1' - }, - { - id: 6, - label: 'Level 2 - 2-2' - } - ] - }, - { - id: 3, - label: 'Level 1 - 3', - children: [ - { - id: 7, - label: 'Level 2 - 3-1' - }, - { - id: 8, - label: 'Level 2 - 3-2' - } - ] - } - ] - } + return {} }, mounted () { diff --git a/components/footer.vue b/components/footer.vue index 4a33609..20e4b61 100644 --- a/components/footer.vue +++ b/components/footer.vue @@ -5,23 +5,26 @@
{{ $t('footer.contactUs') }}
+
+
+
Contact Us
- About Us + About Us
- Contact us + Contact us
- Feedback + Feedback
@@ -46,26 +49,31 @@
- -

Scan the code and check us out

+ +

{{ footerInfo.companyName }}

diff --git a/env.js b/env.js index 5cf9277..a255ddd 100644 --- a/env.js +++ b/env.js @@ -2,16 +2,17 @@ module.exports = { // 测试环境 接口请求地址 (http)或(https)://www.a.com(换成你的域名)/api test: { MODE: 'test', - VUE_APP_API_URL: 'http://www.suodee.com/api' + VUE_APP_API_URL: 'http://122.51.230.86:8099/' }, // 开发环境 接口请求地址 (http)或(https)://www.a.com(换成你的域名)/api dev: { MODE: 'dev', - VUE_APP_API_URL: 'http://www.suodee.com/api' + VUE_APP_API_URL: 'http://122.51.230.86:8099/' }, // 生产环境 接口请求地址 (http)或(https)://www.a.com(换成你的域名)/api 非独立部署默认为空 prod: { MODE: 'prod', - VUE_APP_API_URL: 'http://www.suodee.com/api' + VUE_APP_API_URL: 'http://122.51.230.86:8099/' } }; + diff --git a/locales/en.json b/locales/en.json index efc3012..b7b41e6 100644 --- a/locales/en.json +++ b/locales/en.json @@ -95,5 +95,17 @@ }, "footer": { "contactUs": "Contact us" + }, + "seo": { + "news": { + "title": "China National Heavy Duty Truck Group Co., Ltd. - News List", + "keywords": "China National Heavy Duty Truck Group (CNHTC) HOWO, HOWO Trucks, Heavy Truck Sales, Commercial Vehicles, Heavy duty Trucks, HOWO News, CNHTC News, Truck Trading, HOWO After sales Service, Large Trucks", + "description": "China National Heavy Duty Truck Group Co., Ltd. provides the latest news, product information, and industry trends on HOWO trucks, focusing on heavy-duty truck sales and services. Understand the information of HOWO models, grasp the trends of the heavy-duty truck industry, and help you make wise purchasing decisions." + }, + "product": { + "title": "China National Heavy Duty Truck Group HOWO Product Display - HOWO Truck Series", + "keywords": "China National Heavy Duty Truck Group (CNHTC) HOWO, HOWO Trucks, Heavy Truck Products, Heavy duty Trucks, Commercial Vehicles, HOWO Models, CNHTC Products, HOWO Truck Series, Large Trucks, Commercial Vehicle Products", + "description": "China National Heavy Duty Truck Group Co., Ltd. provides a rich range of HOWO truck products, including various models and configurations. Understand the performance, technical specifications, and industry advantages of our heavy-duty trucks to meet your procurement needs." + } } } \ No newline at end of file diff --git a/locales/zh.json b/locales/zh.json index 74aab94..ab4861a 100644 --- a/locales/zh.json +++ b/locales/zh.json @@ -95,5 +95,17 @@ }, "footer": { "contactUs": "联系我们" + }, + "seo": { + "news": { + "title": "中国重汽豪沃销售有限公司 - 新闻列表", + "keywords": "中国重汽豪沃, 豪沃卡车, 重卡销售, 商用车, 重型卡车, 豪沃新闻, 重汽新闻, 卡车交易, 豪沃售后服务, 大型卡车", + "description": "中国重汽豪沃销售有限公司提供最新的豪沃卡车新闻、产品信息及行业动态,专注于重卡销售与服务。了解豪沃车型资讯,掌握重型卡车行业趋势,助您做出明智的采购决策。" + }, + "product": { + "title": "中国重汽豪沃产品展示 - 豪沃卡车系列", + "keywords": "中国重汽豪沃, 豪沃卡车, 重卡产品, 重型卡车, 商用车, 豪沃车型, 重汽产品, 豪沃卡车系列, 大型卡车, 商用车产品", + "description": "中国重汽豪沃销售有限公司提供丰富的豪沃卡车产品系列,包括各种车型和配置。了解我们的重型卡车性能、技术参数及行业优势,满足您的采购需求。" + } } } \ No newline at end of file diff --git a/middleware/footer.js b/middleware/footer.js new file mode 100644 index 0000000..bf27273 --- /dev/null +++ b/middleware/footer.js @@ -0,0 +1,7 @@ +export default async function ({ + $axios, + store +}) { + const footerInfo = await $axios.$get('/web/footerInfo') + store.commit('SET_FOOTER_INFO', footerInfo) +} \ No newline at end of file diff --git a/nuxt.config.js b/nuxt.config.js index fde4c90..14c2ac0 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -77,7 +77,7 @@ export default { icons: false }, router: { - middleware: 'i18n' + middleware: ['i18n', 'footer'] }, /* ** Build configuration diff --git a/pages/index.vue b/pages/index.vue index f7bfbfd..6c035b3 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -14,8 +14,8 @@ @@ -26,7 +26,7 @@
{{ $t('index.companyProfile') }}

{{ $t('index.corporateName') }}

-

{{ $t('index.companyProfileContent') }}

+