解决发送消息之后,显示延迟的问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import store from '@/store/index.js'
|
||||
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
|
||||
|
||||
const getMessageList = (conversationType, targetId, callback) => {
|
||||
const getMessageList = (conversationType, targetId, timeStamp, count, isForward, callback) => {
|
||||
// 获取消息列表
|
||||
const objectNames = [
|
||||
'RC:TxtMsg',
|
||||
@@ -16,10 +16,12 @@ const getMessageList = (conversationType, targetId, callback) => {
|
||||
'RC:ReferenceMsg',
|
||||
'RC:CombineMsg'
|
||||
]
|
||||
const timeStamp = new Date().getTime()
|
||||
const count = 10 // 获取的消息数量
|
||||
const isForward = true // 是否向前获取
|
||||
RongIMLib.getHistoryMessagesByTimestamp(conversationType, targetId, objectNames, timeStamp,
|
||||
|
||||
RongIMLib.getHistoryMessagesByTimestamp(
|
||||
conversationType,
|
||||
targetId,
|
||||
objectNames,
|
||||
timeStamp + 1000,
|
||||
count,
|
||||
isForward,
|
||||
({
|
||||
|
||||
Reference in New Issue
Block a user