From 7d0a954d23d21c0cdaff6ed20ad7291b3dbf889a Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 30 六月 2022 17:45:39 +0800
Subject: [PATCH] 1.完成制造模型(工序定义)页面开发

---
 src/layout/components/Navbar.vue |   27 +++------------------------
 1 files changed, 3 insertions(+), 24 deletions(-)

diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 4b04a7c..c94a446 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -72,30 +72,9 @@
       this.$store.dispatch('app/toggleSideBar')
     },
     async logout() {
-      // await this.$store.dispatch('user/logout')
-      const usercode = getCookie('navTabId')
-      const username = getCookie('admin')
-      const usertype = getCookie('usertype')
-      const userid = getCookie('userid')
-      const data = {
-        usercode,
-        username,
-        usertype,
-        userid
-      }
-      const res = await logout(data)
-      if (res.code === '200') {
-        removeToken()
-        resetRouter()
-        removeCookie('admin')
-        removeCookie('navTabId')
-        removeCookie('usertype')
-        removeCookie('userid')
-        this.$message.success('閫�鍑烘垚鍔燂紒')
-        this.$router.push('/login')
-        // this.$router.push(`/login?redirect=${this.$route.fullPath}`)
-      }
-      // this.$router.push(`/login`)
+      await this.$store.dispatch('user/logout')
+      this.$message.success('閫�鍑烘垚鍔燂紒')
+      this.$router.push(`/login`)
     }
   }
 }

--
Gitblit v1.9.3