feat:logo、默认头像更换

This commit is contained in:
Xwen
2024-01-03 10:48:28 +08:00
parent ffaa3153b3
commit a78c2d805d
7 changed files with 5 additions and 5 deletions

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

View File

@@ -63,14 +63,14 @@ const userInfo = reactive({
level: "",
userLimit: "",
});
const iconUrl = ref("/favicon.ico");
const iconUrl = ref("/acquiesce.png");
const iconUrlHandler = (icon) => {
if (
userInfo.icon == null ||
userInfo.icon == undefined ||
userInfo.icon == ""
) {
return "/favicon.ico";
return "/acquiesce.png";
} else {
return import.meta.env.VITE_APP_BASEAPI + "/file/" + icon;
}

View File

@@ -47,7 +47,7 @@ const useUserStore = defineStore("user", {
const user = res.user;
const avatar =
user.icon == "" || user.icon == null
? "/favicon.ico"
? "/acquiesce.png"
: import.meta.env.VITE_APP_BASEAPI + "/file/" + user.icon;
if (res.roleCodes && res.roleCodes.length > 0) {
// 验证返回的roles是否是一个非空数组

View File

@@ -71,7 +71,7 @@ const userImageSrc = computed(() => {
if (props.pointsData.icon) {
return import.meta.env.VITE_APP_BASEAPI + "/file/" + props.pointsData.icon;
} else {
return "favicon.ico";
return "acquiesce.png";
}
});
</script>

View File

@@ -69,7 +69,7 @@ const userImageSrc = computed(() => {
if (props.friendData.icon) {
return import.meta.env.VITE_APP_BASEAPI + "/file/" + props.friendData.icon;
} else {
return "favicon.ico";
return "acquiesce.png";
}
});
</script>