修改消息拉取记录

This commit is contained in:
2023-12-04 22:25:19 +08:00
parent 6f690c1987
commit d2a3af7f1f
4 changed files with 262 additions and 110 deletions

View File

@@ -1,9 +1,9 @@
<template>
<view>
<view class="chatNavBar">
<uni-nav-bar :leftIcon="isMobile==true?'left':''"
@clickLeft="clickLeftHandler">
<view class="navBarTitle">{{title}}</view></uni-nav-bar>
<uni-nav-bar :leftIcon="isMobile==true?'left':''" @clickLeft="clickLeftHandler">
<view class="navBarTitle">{{title}}</view>
</uni-nav-bar>
</view>
<watermark></watermark>
<uni-popup ref="popup" type="center">
@@ -199,6 +199,10 @@
},
onLoad(e) {
uni.$on('PageScroll', ()=>{
this.scrolltoBottom()
})
// // 监听接收聊天信息
uni.$on('onP2PMessage', this.onMessage)
@@ -280,6 +284,8 @@
if (hd_gps_location != null) {
this.isMobile = true
}
// TODO PC开发
this.isMobile = true
if (this.chatListInfo && this.chatListInfo.nickName) {
uni.setNavigationBarTitle({
@@ -356,6 +362,7 @@
//如果当前消息发送人和当前窗口的聊天对象一致,则发送已读回执
console.log("########### 此时需要发送已读回执 ###########")
this.$store.dispatch('sendP2PMessageReciveAck', message)
},
addMsg(e) {
this.msg += e;
@@ -888,6 +895,11 @@
console.log("==============sdk:")
console.log(this.talkTo.userId)
setTimeout(() => {
this.scrolltoBottom();
}, 1000)
// this.imsdk.lim.im.sendP2PMessage(this.imsdk.lim.im.createP2PTextMessage(this.talkTo.userId, e))
// #endif
@@ -957,9 +969,8 @@
</script>
<style lang="scss" scoped>
.navBarTitle{
width: 100%;
.navBarTitle {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
@@ -967,6 +978,7 @@
font-size: 16px !important;
font-weight: bold !important;
}
.chatNavBar {
position: fixed;
top: 0;