From 3667807a7b7418efc090ee3fa6a6b734bc3080bf Mon Sep 17 00:00:00 2001
From: xieb <vip_xiaobin810@163.com>
Date: Wed, 13 Sep 2023 20:36:29 +0800
Subject: [PATCH] Merge branch 'develop' of http://s16s652780.51mypc.cn:49896/r/yskj/iot_drone_web into develop

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

diff --git a/src/components/common/topbar.vue b/src/components/common/topbar.vue
index acec2c6..72cd5f2 100644
--- a/src/components/common/topbar.vue
+++ b/src/components/common/topbar.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="width-100 flex-row flex-justify-between flex-align-center" style="height: 60px;">
     <div class="height-100">
-      <a-avatar :size="40" shape="square" :src="cloudapi" />
+      <!-- <a-avatar :size="40" shape="square" :src="cloudapi" /> -->
       <span class="ml10 fontBold">{{ workspaceName }}</span>
     </div>
 
@@ -27,7 +27,7 @@
           <a-menu theme="dark" class="flex-column flex-justify-between flex-align-center">
             <a-menu-item>
               <span class="mr10" style="font-size: 16px;"><ExportOutlined /></span>
-              <span @click="logout">Log Out</span>
+              <span @click="logout">退出登录</span>
             </a-menu-item>
           </a-menu>
         </template>
@@ -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