diff --git a/Touchkebao/src/pages/pc/ckbox/weChat/components/SidebarMenu/FriendsCicle/index.tsx b/Touchkebao/src/pages/pc/ckbox/weChat/components/SidebarMenu/FriendsCicle/index.tsx index f7e054af..76d7f87a 100644 --- a/Touchkebao/src/pages/pc/ckbox/weChat/components/SidebarMenu/FriendsCicle/index.tsx +++ b/Touchkebao/src/pages/pc/ckbox/weChat/components/SidebarMenu/FriendsCicle/index.tsx @@ -72,6 +72,9 @@ const FriendsCircle: React.FC = ({ wechatFriendId }) => { }); }; + // 默认头像路径 + const defaultAvatar = "/assets/face/smile.png"; + const collapseItems = [ { key: "1", @@ -79,8 +82,15 @@ const FriendsCircle: React.FC = ({ wechatFriendId }) => {
客服头像 { + // 如果图片加载失败,使用默认头像 + const target = e.target as HTMLImageElement; + if (target.src !== defaultAvatar) { + target.src = defaultAvatar; + } + }} /> 我的朋友圈