feat:logo、默认头像更换
This commit is contained in:
BIN
Yi.Bbs.Vue3/public/acquiesce.png
Normal file
BIN
Yi.Bbs.Vue3/public/acquiesce.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 17 KiB |
@@ -63,14 +63,14 @@ const userInfo = reactive({
|
|||||||
level: "",
|
level: "",
|
||||||
userLimit: "",
|
userLimit: "",
|
||||||
});
|
});
|
||||||
const iconUrl = ref("/favicon.ico");
|
const iconUrl = ref("/acquiesce.png");
|
||||||
const iconUrlHandler = (icon) => {
|
const iconUrlHandler = (icon) => {
|
||||||
if (
|
if (
|
||||||
userInfo.icon == null ||
|
userInfo.icon == null ||
|
||||||
userInfo.icon == undefined ||
|
userInfo.icon == undefined ||
|
||||||
userInfo.icon == ""
|
userInfo.icon == ""
|
||||||
) {
|
) {
|
||||||
return "/favicon.ico";
|
return "/acquiesce.png";
|
||||||
} else {
|
} else {
|
||||||
return import.meta.env.VITE_APP_BASEAPI + "/file/" + icon;
|
return import.meta.env.VITE_APP_BASEAPI + "/file/" + icon;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const useUserStore = defineStore("user", {
|
|||||||
const user = res.user;
|
const user = res.user;
|
||||||
const avatar =
|
const avatar =
|
||||||
user.icon == "" || user.icon == null
|
user.icon == "" || user.icon == null
|
||||||
? "/favicon.ico"
|
? "/acquiesce.png"
|
||||||
: import.meta.env.VITE_APP_BASEAPI + "/file/" + user.icon;
|
: import.meta.env.VITE_APP_BASEAPI + "/file/" + user.icon;
|
||||||
if (res.roleCodes && res.roleCodes.length > 0) {
|
if (res.roleCodes && res.roleCodes.length > 0) {
|
||||||
// 验证返回的roles是否是一个非空数组
|
// 验证返回的roles是否是一个非空数组
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ const userImageSrc = computed(() => {
|
|||||||
if (props.pointsData.icon) {
|
if (props.pointsData.icon) {
|
||||||
return import.meta.env.VITE_APP_BASEAPI + "/file/" + props.pointsData.icon;
|
return import.meta.env.VITE_APP_BASEAPI + "/file/" + props.pointsData.icon;
|
||||||
} else {
|
} else {
|
||||||
return "favicon.ico";
|
return "acquiesce.png";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const userImageSrc = computed(() => {
|
|||||||
if (props.friendData.icon) {
|
if (props.friendData.icon) {
|
||||||
return import.meta.env.VITE_APP_BASEAPI + "/file/" + props.friendData.icon;
|
return import.meta.env.VITE_APP_BASEAPI + "/file/" + props.friendData.icon;
|
||||||
} else {
|
} else {
|
||||||
return "favicon.ico";
|
return "acquiesce.png";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user