|
@@ -42,9 +42,9 @@
|
|
<template v-slot:activator="{ props }">
|
|
<template v-slot:activator="{ props }">
|
|
<div class="d-flex ml-5 pl-2 align-center cursor-pointer" v-bind="props" @click="handleToPersonalCenter">
|
|
<div class="d-flex ml-5 pl-2 align-center cursor-pointer" v-bind="props" @click="handleToPersonalCenter">
|
|
<v-avatar>
|
|
<v-avatar>
|
|
- <v-img alt="John" :src="baseInfo.avatar ?? 'https://cdn.vuetifyjs.com/images/john.jpg'"></v-img>
|
|
|
|
|
|
+ <v-img alt="John" :src="baseInfo?.avatar ?? 'https://cdn.vuetifyjs.com/images/john.jpg'"></v-img>
|
|
</v-avatar>
|
|
</v-avatar>
|
|
- <div class="ml-2">{{ baseInfo.name ?? $t('sys.tourist') }}</div>
|
|
|
|
|
|
+ <div class="ml-2">{{ baseInfo?.name ?? $t('sys.tourist') }}</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -111,7 +111,6 @@ defineProps({
|
|
|
|
|
|
const localeStore = useLocaleStore()
|
|
const localeStore = useLocaleStore()
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
-const baseInfo = userStore.baseInfo // 人才信息
|
|
|
|
|
|
|
|
const list = ref([
|
|
const list = ref([
|
|
{ text: '首页', path: '/home' },
|
|
{ text: '首页', path: '/home' },
|
|
@@ -153,6 +152,7 @@ const items = ref([
|
|
{ title: '切换为招聘者', icon: 'mdi-swap-horizontal', change: changeRole },
|
|
{ title: '切换为招聘者', icon: 'mdi-swap-horizontal', change: changeRole },
|
|
{ title: '退出登录', icon: 'mdi-logout', change: handleLogout }
|
|
{ title: '退出登录', icon: 'mdi-logout', change: handleLogout }
|
|
])
|
|
])
|
|
|
|
+const baseInfo = JSON.parse(localStorage.getItem('baseInfo')) // 人才信息
|
|
|
|
|
|
const handleLogin = () => {
|
|
const handleLogin = () => {
|
|
router.push({ path: '/login' })
|
|
router.push({ path: '/login' })
|