Selaa lähdekoodia

跳转首页功能

princeLee 4 vuotta sitten
vanhempi
sitoutus
ea6fe37a52

+ 1 - 1
src/components/newLayout/Aside.vue

@@ -158,7 +158,7 @@ section {
     align-items: center;
     color: #333333;
     font-size: 18px;
-    border: 1px solid #eeeeee;
+    border-bottom: 1px solid #eeeeee;
     white-space: nowrap;
     .business-select {
       cursor: pointer;

+ 5 - 1
src/components/newLayout/Head.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="head-wrapper">
     <div class="head-logo">
-      <svg-icon icon-class="zhihui-logo" />
+      <svg-icon icon-class="zhihui-logo" @click="topHome()" />
     </div>
     <div v-for="item in headList" :key="item.path" class="nav-tag" @click="changeNavTag(item)">
       <div v-if="item.icon" class="icon">
@@ -86,6 +86,9 @@ export default {
     // 退出登录
     layout() {
       window.location.href = logoutUrl
+    },
+    topHome() {
+      this.$router.push({ path: '/' })
     }
   }
 }
@@ -108,6 +111,7 @@ export default {
   width: 40px;
   margin-bottom: 42px;
   .svg-icon {
+    cursor: pointer;
     width: 100%;
     height: 100%;
   }

+ 8 - 1
src/components/newLayout/Main.vue

@@ -8,7 +8,7 @@
       'no-sidebar': !showNavTag
     }"
   >
-    <div class="main-wrapper">
+    <div class="main-wrapper" @click="listenClick">
       <router-view />
     </div>
   </div>
@@ -103,6 +103,13 @@ export default {
       } else {
         this.$router.push({ name: '业务线选择' })
       }
+    },
+    // 整个页面的点击次数
+    listenClick(event) {
+      this.$store.dispatch('app/addClickCount')
+    },
+    handleClickOutside() {
+      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
     }
   }
 }