From 8277a99aaedda30c2e20980f7d0a302c98cea523 Mon Sep 17 00:00:00 2001 From: xuan <3142316616@qq.com> Date: Wed, 27 Nov 2024 19:58:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3honneybtn=E5=92=8C=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E5=AD=97=E7=AC=A6=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chat/ChatCard.vue | 2 +- src/views/chat/HonneyBtn.vue | 31 ++++++-- src/views/chat/chat.vue | 146 ++++++++++++----------------------- 3 files changed, 74 insertions(+), 105 deletions(-) diff --git a/src/views/chat/ChatCard.vue b/src/views/chat/ChatCard.vue index 7d0325c3..749e6b16 100644 --- a/src/views/chat/ChatCard.vue +++ b/src/views/chat/ChatCard.vue @@ -4,7 +4,7 @@
{{ item.name }}
-{{ getLatestNew[index][0] }}
+{{ getLatestNew(item) }}
{{ getLatestNew[index][1] }}
+{{ item.chatHistory[item.chatHistory.length - 1].time.split(' ')[1] }}
关注他
-关注他{{ getFriendObject.concern_status }}
+拉黑他
-拉黑他{{ getFriendObject.black_status }}
+可能感兴趣的人
@@ -84,35 +84,34 @@ export default { return{ searchName: '', new_msg_nums: 1, - chatWith:'潇潇', + chatWith:'', userInfo:{ name:'我', icon:'/icon/abc.jpg' }, - beeing_friends_time: 302, sendingMsg: '', // !!!!注意!!!! // 头像显示的是第一列好友列表,使用循环渲染。这时如果在assets文件夹里面会被服务器临时编译到public文件夹里面。 // 由于编译后文件夹名称会发生改变,所以把icon图片单独放到服务器的文件夹下面以此来跳过编译(public文件夹) // 这里文件路径命名是相对于public的绝对路径 friendsInfoList: [ - {name:'潇潇',icon:'/icon/icon.png',position:'london',birth:'2004-1-1',concern_status:false,black_status:true, + {name:'潇潇',icon:'/icon/icon.png',position:'london',birth:'2004-1-1',concern_status:false,black_status:true,beeing_friends_time: 302, chatHistory:[ {name:'我',content:'早重中之重做做做做做做做做做做做做做做做做做做做战争之子战争之子做做做做',time:'2024-11-24 1:24'}, {name:'潇潇',content:'中',time:'2024-11-24 2:11'}, {name:'我',content:'晚',time:'2024-11-24 3:24'}, ]}, - {name:'小刚','icon':'/icon/UserIcon.png',position:'china',birth:'2003-3-4',concern_status:false,black_status:false, + {name:'小刚','icon':'/icon/UserIcon.png',position:'china',birth:'2003-3-4',concern_status:false,black_status:false,beeing_friends_time: 2, chatHistory:[ {name:'我',content:'you are',time:'2024-11-24 22:24'}, - {name:'小刚',content:'hhh',time:'2024-11-25 22:11'}, + {name:'小刚',content:'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh',time:'2024-11-25 22:11'}, ]}, - {name:'吴伟',icon:'/icon/icon.png',position:'endland',birth:'2004-5-2',concern_status:false,black_status:false, + {name:'吴伟',icon:'/icon/icon.png',position:'endland',birth:'2004-5-2',concern_status:false,black_status:false,beeing_friends_time: 32, chatHistory:[ {name:'我',content:'早上好',time:'2024-11-24 22:25'}, {name:'吴伟',content:'iii',time:'2024-11-24 23:11'}, ]}, - {name:'小闽','icon':'/icon/UserIcon.png',position:'china',birth:'2003-3-4',concern_status:false,black_status:false, + {name:'小闽','icon':'/icon/UserIcon.png',position:'china',birth:'2003-3-4',concern_status:false,black_status:false,beeing_friends_time: 1, chatHistory:[ {name:'我',content:'you are',time:'2024-11-24 22:24'}, {name:'小闽',content:'h',time:'2024-11-25 22:11'}, @@ -127,7 +126,8 @@ export default { } }, mounted(){ - this.showSearchList = this.friendsInfoList + if(this.searchName == '') + this.showSearchList = this.friendsInfoList }, components:{ HonneyBtn, @@ -151,11 +151,41 @@ export default { for(let i=0;i