Compare commits

...

2 Commits

Author SHA1 Message Date
yangws 55efc7f3e1 Merge pull request 'fix:修复头像问题;' (#144) from yws_dev into main
Reviewed-on: #144
2024-12-16 17:06:28 +08:00
小杨 122c5341e9 fix:修复头像问题; 2024-12-16 17:06:01 +08:00
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
<el-popover ref="popoverRef" placement="right" trigger="hover" popper-class="popoverStyle" :tabindex="999" >
<template #reference>
<div class="user-info">
<el-image class="user-img" :src="userStore.user.avatar ==='/img/avatar-default.jpg' || '/images/img-avatar.png' ? defaultUserImg : dev_api + userStore.user.avatar" />
<el-image class="user-img" :src="userStore.user.avatar ==='/img/avatar-default.jpg' || userStore.user.avatar ==='/images/img-avatar.png' ? defaultUserImg : dev_api + userStore.user.avatar" />
<span>{{ userStore.user.nickName }}</span>
</div>
</template>

View File

@ -33,7 +33,7 @@ const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
//
const options = reactive({
img: userStore.user.avatar ==='/img/avatar-default.jpg' || '/images/img-avatar.png' ? defaultUserImg : dev_api.value + userStore.user.avatar, //
img: userStore.user.avatar ==='/img/avatar-default.jpg' || userStore.user.avatar ==='/images/img-avatar.png' ? defaultUserImg : dev_api.value + userStore.user.avatar, //
autoCrop: true, //
autoCropWidth: 400, //
autoCropHeight: 400, //
@ -69,7 +69,7 @@ function uploadImg(data) {
/** 关闭窗口 */
function closeDialog() {
options.img = userStore.user.avatar ==='/img/avatar-default.jpg' || '/images/img-avatar.png' ? defaultUserImg : dev_api.value + userStore.user.avatar
options.img = userStore.user.avatar ==='/img/avatar-default.jpg' || userStore.user.avatar ==='/images/img-avatar.png' ? defaultUserImg : dev_api.value + userStore.user.avatar
options.visible = false
}
const cancle = () => {