diff --git a/src/renderer/src/layout/components/Aside.vue b/src/renderer/src/layout/components/Aside.vue index bde5ccd..d87208d 100644 --- a/src/renderer/src/layout/components/Aside.vue +++ b/src/renderer/src/layout/components/Aside.vue @@ -5,7 +5,7 @@ @@ -75,6 +75,9 @@ const activeId = ref('/home') const version = ref(pkc.version) const popoverRef = ref('') +// 默认图片 +const img = ref('') +const defaultImg = ['/img/avatar-default.jpg','/images/img-avatar.png','/src/assets/images/img-avatar.png'] //是否是基地人员 const isStadium = () => { @@ -224,6 +227,11 @@ const logout = () => { onMounted(() => { userStore.getDeptInfo() // getregisterinfo() + if(defaultImg.includes(userStore.user.avatar)){ + img.value = defaultUserImg + }else{ + img.value = dev_api.value + userStore.user.avatar + } }) diff --git a/src/renderer/src/views/profile/userAvatar.vue b/src/renderer/src/views/profile/userAvatar.vue index a0cc82e..755a3f6 100644 --- a/src/renderer/src/views/profile/userAvatar.vue +++ b/src/renderer/src/views/profile/userAvatar.vue @@ -19,7 +19,7 @@