聊天记录

This commit is contained in:
2023-12-05 20:24:36 +08:00
parent 8aa642ecb4
commit 228943fc02
7 changed files with 110 additions and 85 deletions

View File

@@ -199,7 +199,7 @@
},
onLoad(e) {
uni.$on('PageScroll', ()=>{
uni.$on('PageScroll', () => {
this.scrolltoBottom()
})
@@ -285,7 +285,7 @@
this.isMobile = true
}
// TODO PC开发
this.isMobile = true
// this.isMobile = true
if (this.chatListInfo && this.chatListInfo.nickName) {
uni.setNavigationBarTitle({
@@ -363,6 +363,20 @@
console.log("########### 此时需要发送已读回执 ###########")
this.$store.dispatch('sendP2PMessageReciveAck', message)
setTimeout(() => {
this.$store.dispatch('updateChartHistoryFromServerLimit5', {
userId: this.talkTo.userId,
data: ""
})
setTimeout(() => {
this.$store.dispatch('updateChartHistoryFromServerLimit5', {
userId: this.talkTo.userId,
data: ""
})
}, 1000)
}, 1500)
},
addMsg(e) {
this.msg += e;

View File

@@ -61,6 +61,10 @@
console.log("首页获取到url参数")
console.log(options)
console.log(location.href)
// // 监听接收聊天信息
uni.$on('onP2PMessage', this.onMessage)
if (options.imUserSign) {
uni.showLoading({
title: "数据加载中...",
@@ -185,6 +189,7 @@
},
onShow() {
var i=0
this.$store.dispatch('queryConversationList');
this.$store.dispatch('tabBarpull');
this.timer = setInterval(() => {
i=i+1;
@@ -204,6 +209,11 @@
console.log('beforeUnmount');
},
methods: {
onMessage(){
setTimeout(() => {
this.$store.dispatch('queryConversationList')
}, 1000)
},
longpressItem(e, i, v) {
// console.log(e,i,v)
this.longTapItemKey = i;