From cee338f18d22bbbb989d79c0add082fdb4e2b8ef Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Fri, 08 Sep 2023 11:09:00 +0800
Subject: [PATCH] store添加projectId

---
 src/components/common/topbar.vue |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/components/common/topbar.vue b/src/components/common/topbar.vue
index acec2c6..b575521 100644
--- a/src/components/common/topbar.vue
+++ b/src/components/common/topbar.vue
@@ -40,7 +40,7 @@
 import { message } from 'ant-design-vue'
 import { defineComponent, onMounted, ref } from 'vue'
 import { getRoot } from '/@/root'
-import { getPlatformInfo } from '/@/api/manage'
+import { getPlatformInfo, loginOut } from '/@/api/manage'
 import { ELocalStorageKey, ERouterName } from '/@/types'
 import { UserOutlined, ExportOutlined } from '@ant-design/icons-vue'
 import cloudapi from '/@/assets/icons/cloudapi.png'
@@ -71,16 +71,18 @@
 const selected = ref<string>(root.$route.path)
 
 onMounted(() => {
-  getPlatformInfo().then(res => {
-    workspaceName.value = res.data.workspace_name
-  })
+  // getPlatformInfo().then(res => {
+  //   workspaceName.value = res.data.workspace_name
+  // })
 })
 
 function selectedRoute (path: string) {
   selected.value = path
 }
 
-const logout = () => {
+const logout = async () => {
+  const res = await loginOut()
+  console.log(res, 'Res')
   localStorage.clear()
   root.$router.push(ERouterName.LOGIN)
 }

--
Gitblit v1.9.3