From 17f6cce8baba88c9ce1a87c2c725aac25ecad8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Fri, 29 Aug 2025 18:21:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/menu/index.vue | 6 ++-- src/views/contactUs/index.vue | 29 ++++++++++++++++-- src/views/industrySolutions/index.vue | 13 ++++---- src/views/productCenter/index.vue | 44 ++++++++++++++++++++++++--- src/views/serviceSupport/index.vue | 1 - 5 files changed, 78 insertions(+), 15 deletions(-) diff --git a/src/components/menu/index.vue b/src/components/menu/index.vue index 030f6a8..c4543cd 100644 --- a/src/components/menu/index.vue +++ b/src/components/menu/index.vue @@ -109,9 +109,11 @@ export default { } else if (id === 1) { this.$router.push('/index') } else if (e.ancestors.split(',').includes("2")) { - this.$router.push('/contactUs#item' + id) + // this.$router.push('/contactUs#item' + id) + this.$router.push('/contactUs?id=' + id) } else if (e.ancestors.split(',').includes("7")) { - this.$router.push('/productCenter#item' + id) + // this.$router.push('/productCenter#item' + id) + this.$router.push('/productCenter?id=' + id) } else if (e.ancestors.split(',').includes("24")) { this.$router.push('/serviceSupport?type=' + id) }else{ diff --git a/src/views/contactUs/index.vue b/src/views/contactUs/index.vue index 4e08d24..5415283 100644 --- a/src/views/contactUs/index.vue +++ b/src/views/contactUs/index.vue @@ -16,13 +16,18 @@ -
+
+ + + + @@ -62,6 +67,7 @@ export default { bannerTitle: '', tabsActive: 0, tabsList: [], + itemId: 3, data:{ banner:'http://1.13.177.47:9665/statics/2025/07/24/mesnac_20250724093713A002.jpg', tabsList:[ @@ -151,10 +157,29 @@ export default { mounted() { this.getData() }, + watch: { + '$route'() { + let id = parseFloat(this.$route.query.id || '3') + if (id === 3) { + this.tabsActive = 0 + } + if (id === 8) { + this.tabsActive = 1 + } + if (id === 9) { + this.tabsActive = 2 + } + if (id === 10) { + this.tabsActive = 3 + } + this.itemId = id + } + }, methods: { checkTabs(e,k) { this.tabsActive = k - document.querySelector('#item' + e.id).scrollIntoView(); // 使用JavaScript实现平滑滚动到指定元素 + this.itemId = e.id + // document.querySelector('#item' + e.id).scrollIntoView(); // 使用JavaScript实现平滑滚动到指定元素 }, getData() { getAboutUsInfo().then(e => { diff --git a/src/views/industrySolutions/index.vue b/src/views/industrySolutions/index.vue index 9809b3e..ac14996 100644 --- a/src/views/industrySolutions/index.vue +++ b/src/views/industrySolutions/index.vue @@ -9,7 +9,7 @@ 青岛海威物联科技有限公司,致力于工业物联网软硬件系统研发、生产和销售,提供感知互联的工业化联网整体解决方案。
-
+