diff --git a/src/views/chat/ChatList.vue b/src/views/chat/ChatList.vue new file mode 100644 index 00000000..a73fc077 --- /dev/null +++ b/src/views/chat/ChatList.vue @@ -0,0 +1,71 @@ + + + + + \ No newline at end of file diff --git a/src/views/chat/chat.vue b/src/views/chat/chat.vue index 328b6ecf..80f699d5 100644 --- a/src/views/chat/chat.vue +++ b/src/views/chat/chat.vue @@ -10,7 +10,8 @@
-
+ +

{{ item.name }}

@@ -18,12 +19,16 @@

{{ item.chatHistory[item.chatHistory.length - 1].time.split(' ')[1] }}

+
+
-
- -
+ +
+ +
+
@@ -77,7 +82,8 @@ // import RecycleScroller from 'vue-virtual-scroller'; import HonneyBtn from './HonneyBtn.vue'; -import ChatCard from './ChatCard.vue' +import ChatCard from './ChatCard.vue'; +import ChatList from './ChatList.vue'; export default { name: 'chatIndex', // 添加组件名称 data(){ @@ -116,6 +122,41 @@ export default { {name:'我',content:'you are',time:'2024-11-24 22:24'}, {name:'小闽',content:'h',time:'2024-11-25 22:11'}, ]}, + {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'}, + ]}, + {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'}, + ]}, + {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'}, + ]}, + {name:'kk','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:'kk',content:'h',time:'2024-11-25 22:11'}, + ]}, + {name:'44','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:'44',content:'h',time:'2024-11-25 22:11'}, + ]}, + {name:'77','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:'77',content:'h',time:'2024-11-25 22:11'}, + ]}, + {name:'88','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:'88',content:'h',time:'2024-11-25 22:11'}, + ]}, ], showSearchList: [], recomendList: [ @@ -132,15 +173,16 @@ export default { components:{ HonneyBtn, // RecycleScroller, - ChatCard + ChatCard, + ChatList }, methods:{ - clickFriendList(index){ - let who = this.friendsInfoList[index].name + clickFriendList(item){ + let who = item.name if(this.chatWith != who){ this.sendingMsg = '' } - this.chatWith = this.friendsInfoList[index].name + this.chatWith = item.name console.log(this.chatWith) },