You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
931 B
47 lines
931 B
<script setup lang="ts">
|
|
import { useRouter } from 'vue-router'
|
|
import { websiteConfig } from '@/config/website.config'
|
|
import { storage } from '@/utils/Storage'
|
|
import { CURRENT_USER } from '@/store/mutation-types'
|
|
|
|
defineOptions({ name: 'Index' })
|
|
|
|
const router = useRouter()
|
|
|
|
function clickHandler() {
|
|
const userInfo = storage.get(CURRENT_USER)
|
|
if (userInfo && userInfo.frontmenuTList) {
|
|
if (userInfo.frontmenuTList.find(item => item.resUrl == '/home'))
|
|
router.push({ path: '/home' })
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="logo">
|
|
<img :src="websiteConfig.logo" alt="" @click="clickHandler">
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="less" scoped>
|
|
.logo {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 64px;
|
|
line-height: 64px;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
|
|
img {
|
|
width: auto;
|
|
height: 32px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.title {
|
|
margin: 0;
|
|
}
|
|
}
|
|
</style>
|