From f7f0e44c4be8eb0e77fd310296c3b43bde21e4f9 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期四, 23 六月 2022 14:17:01 +0800
Subject: [PATCH] 新增联动场景

---
 src/views/connectUs/index.vue |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/views/connectUs/index.vue b/src/views/connectUs/index.vue
index 2b60e9e..72a0ffb 100644
--- a/src/views/connectUs/index.vue
+++ b/src/views/connectUs/index.vue
@@ -8,7 +8,7 @@
           class="navItem"
           :key="index"
           :class="{ active: activeNav == index }"
-          @click="activeNav = index"
+          @click="jump(index)"
         >
           {{ item }}
         </div>
@@ -31,6 +31,14 @@
   components: {
     consult,
   },
+  methods: {
+    jump(index) {
+      this.activeNav = index;
+      if (index == 0) {
+        this.$router.push("/");
+      }
+    },
+  },
 };
 </script>
 

--
Gitblit v1.8.0