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 @@ 青岛海威物联科技有限公司,致力于工业物联网软硬件系统研发、生产和销售,提供感知互联的工业化联网整体解决方案。
-
+