husq
2023-09-13 5ac4e22d4c590216734fb4f9b93881a92a1f2f4e
src/components/common/topbar.vue
@@ -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)
}