Jelajahi Sumber

优化: 会话、好友、群列表使用缩略图

xsx 7 bulan lalu
induk
melakukan
056cf2a268

+ 1 - 1
im-platform/src/main/java/com/bx/implatform/service/impl/FriendServiceImpl.java

@@ -132,7 +132,7 @@ public class FriendServiceImpl extends ServiceImpl<FriendMapper, Friend> impleme
         friend.setUserId(userId);
         friend.setFriendId(friendId);
         User friendInfo = userMapper.selectById(friendId);
-        friend.setFriendHeadImage(friendInfo.getHeadImage());
+        friend.setFriendHeadImage(friendInfo.getHeadImageThumb());
         friend.setFriendNickName(friendInfo.getNickName());
         friend.setDeleted(false);
         this.saveOrUpdate(friend);

+ 1 - 1
im-uniapp/components/group-item/group-item.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="group-item" @click="showGroupInfo()">
-		<head-image :name="group.showGroupName" :url="group.headImage" size="small"></head-image>
+		<head-image :name="group.showGroupName" :url="group.headImageThumb" size="small"></head-image>
 		<view class="group-name">
 			<view>{{ group.showGroupName }}</view>
 		</view>

+ 1 - 1
im-uniapp/pages/common/user-info.vue

@@ -61,7 +61,7 @@ export default {
 				type: 'PRIVATE',
 				targetId: this.userInfo.id,
 				showName: this.userInfo.nickName,
-				headImage: this.userInfo.headImage,
+				headImage: this.userInfo.headImageThumb,
 			};
 			if (this.isFriend) {
 				chat.isDnd = this.friendInfo.isDnd;

+ 1 - 1
im-uniapp/pages/friend/friend-add.vue

@@ -60,7 +60,7 @@ export default {
 				let friend = {
 					id: user.id,
 					nickName: user.nickName,
-					headImage: user.headImage,
+					headImage: user.headImageThumb,
 					online: user.online,
 					delete: false
 				}

+ 1 - 1
im-uniapp/pages/group/group-info.vue

@@ -122,7 +122,7 @@ export default {
 				type: 'GROUP',
 				targetId: this.group.id,
 				showName: this.group.showGroupName,
-				headImage: this.group.headImage,
+				headImage: this.group.headImageThumb,
 				isDnd: this.group.isDnd
 			};
 			this.chatStore.openChat(chat);

+ 1 - 1
im-web/src/components/common/UserInfo.vue

@@ -65,7 +65,7 @@ export default {
 				type: 'PRIVATE',
 				targetId: user.id,
 				showName: user.nickName,
-				headImage: user.headImage
+				headImage: user.headImageThumb
 			};
 			if (this.isFriend) {
 				chat.isDnd = this.friendInfo.isDnd;

+ 1 - 1
im-web/src/components/friend/AddFriend.vue

@@ -79,7 +79,7 @@ export default {
 				let friend = {
 					id: user.id,
 					nickName: user.nickName,
-					headImage: user.headImage,
+					headImage: user.headImageThumb,
 					online: user.online,
 					deleted: false
 				}

+ 1 - 1
im-web/src/components/group/GroupItem.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="group-item" :class="active ? 'active' : ''">
 		<div class="group-avatar">
-			<head-image :size="42" :name="group.showGroupName" :url="group.headImage"> </head-image>
+			<head-image :size="42" :name="group.showGroupName" :url="group.headImageThumb"> </head-image>
 		</div>
 		<div class="group-name">
 			<div>{{ group.showGroupName }}</div>

+ 1 - 1
im-web/src/view/Friend.vue

@@ -118,7 +118,7 @@ export default {
 				let friend = {
 					id: user.id,
 					nickName: user.nickName,
-					headImage: user.headImage,
+					headImage: user.headImageThumb,
 					online: user.online
 				}
 				this.friendStore.addFriend(friend);

+ 1 - 1
im-web/src/view/Group.vue

@@ -240,7 +240,7 @@ export default {
 				type: 'GROUP',
 				targetId: this.activeGroup.id,
 				showName: this.activeGroup.showGroupName,
-				headImage: this.activeGroup.headImage,
+				headImage: this.activeGroup.headImageThumb,
 				isDnd: this.activeGroup.isDnd
 			};
 			this.chatStore.openChat(chat);