From 6e41ce0ab4300758ebd77ea257c3d9532e3df7e0 Mon Sep 17 00:00:00 2001
From: zhangxiaoxu123456 <zxx19900626>
Date: 星期二, 10 五月 2022 11:58:22 +0800
Subject: [PATCH] 接口对接

---
 src/pages/components/showIndexTitle.vue |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/pages/components/showIndexTitle.vue b/src/pages/components/showIndexTitle.vue
index 91c2402..0a5c2e8 100644
--- a/src/pages/components/showIndexTitle.vue
+++ b/src/pages/components/showIndexTitle.vue
@@ -60,7 +60,7 @@
             <h1>鏂囨。涓績</h1>
           </div>
         </el-menu-item>
-        <el-menu-item index="/login">
+        <el-menu-item @click="goOut">
           <div class="showIndex-block">
             <h1>閫�鍑虹櫥褰�</h1>
           </div>
@@ -82,7 +82,18 @@
       this.$route.meta.routerParent && (this.activeIndex = '/' + this.$route.meta.routerParent)
   },
   methods: {
+      goOut() {
+          this.$confirm('鏄惁閫�鍑虹郴缁�, 鏄惁缁х画?', '鎻愮ず', {
+              confirmButtonText: '纭畾',
+              cancelButtonText: '鍙栨秷',
+              type: 'warning'
+          }).then(() => {
+              this.$store.dispatch('logout').then(res => {
+                  this.$router.push('/login')
+              })
+          })
 
+      }
   },
 };
 </script>

--
Gitblit v1.9.1