Browse Source

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

master
xsx 8 months ago
parent
commit
056cf2a268
  1. 2
      im-platform/src/main/java/com/bx/implatform/service/impl/FriendServiceImpl.java
  2. 2
      im-uniapp/components/group-item/group-item.vue
  3. 2
      im-uniapp/pages/common/user-info.vue
  4. 2
      im-uniapp/pages/friend/friend-add.vue
  5. 2
      im-uniapp/pages/group/group-info.vue
  6. 2
      im-web/src/components/common/UserInfo.vue
  7. 2
      im-web/src/components/friend/AddFriend.vue
  8. 2
      im-web/src/components/group/GroupItem.vue
  9. 2
      im-web/src/view/Friend.vue
  10. 2
      im-web/src/view/Group.vue

2
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.setUserId(userId);
friend.setFriendId(friendId); friend.setFriendId(friendId);
User friendInfo = userMapper.selectById(friendId); User friendInfo = userMapper.selectById(friendId);
friend.setFriendHeadImage(friendInfo.getHeadImage()); friend.setFriendHeadImage(friendInfo.getHeadImageThumb());
friend.setFriendNickName(friendInfo.getNickName()); friend.setFriendNickName(friendInfo.getNickName());
friend.setDeleted(false); friend.setDeleted(false);
this.saveOrUpdate(friend); this.saveOrUpdate(friend);

2
im-uniapp/components/group-item/group-item.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="group-item" @click="showGroupInfo()"> <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 class="group-name">
<view>{{ group.showGroupName }}</view> <view>{{ group.showGroupName }}</view>
</view> </view>

2
im-uniapp/pages/common/user-info.vue

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

2
im-uniapp/pages/friend/friend-add.vue

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

2
im-uniapp/pages/group/group-info.vue

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

2
im-web/src/components/common/UserInfo.vue

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

2
im-web/src/components/friend/AddFriend.vue

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

2
im-web/src/components/group/GroupItem.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="group-item" :class="active ? 'active' : ''"> <div class="group-item" :class="active ? 'active' : ''">
<div class="group-avatar"> <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>
<div class="group-name"> <div class="group-name">
<div>{{ group.showGroupName }}</div> <div>{{ group.showGroupName }}</div>

2
im-web/src/view/Friend.vue

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

2
im-web/src/view/Group.vue

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

Loading…
Cancel
Save