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: "",
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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是否是一个非空数组
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user