Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
5f1b5fc7
Commit
5f1b5fc7
authored
Nov 26, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 相关提示
parent
f4efad64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
YHIMTestViewController.swift
...vestreamSales(直播销售)/IM(环信)/C/YHIMTestViewController.swift
+15
-1
No files found.
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/IM(环信)/C/YHIMTestViewController.swift
View file @
5f1b5fc7
...
@@ -233,9 +233,10 @@ private extension YHIMTestViewController {
...
@@ -233,9 +233,10 @@ private extension YHIMTestViewController {
//4.获取历史消息
//4.获取历史消息
@objc
func
fetchHistoryMessage
(){
@objc
func
fetchHistoryMessage
(){
let
option
=
EMFetchServerMessagesOption
()
let
option
=
EMFetchServerMessagesOption
()
EMClient
.
shared
()
.
chatManager
?
.
fetchMessagesFromServer
(
by
:
self
.
roomID
,
conversationType
:
.
chatRoom
,
cursor
:
"0"
,
pageSize
:
50
,
option
:
option
,
completion
:
{
result
,
err
in
EMClient
.
shared
()
.
chatManager
?
.
fetchMessagesFromServer
(
by
:
self
.
roomID
,
conversationType
:
.
chatRoom
,
cursor
:
nil
,
pageSize
:
50
,
option
:
option
,
completion
:
{
result
,
err
in
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
if
let
err
=
err
{
if
let
err
=
err
{
// 获取失败
// 获取失败
printLog
(
"获取历史消息--失败"
)
printLog
(
"获取历史消息--失败"
)
...
@@ -246,7 +247,20 @@ private extension YHIMTestViewController {
...
@@ -246,7 +247,20 @@ private extension YHIMTestViewController {
// 获取成功
// 获取成功
printLog
(
result
)
printLog
(
result
)
YHHUD
.
flash
(
message
:
"获取历史消息-成功"
)
YHHUD
.
flash
(
message
:
"获取历史消息-成功"
)
if
let
ret
=
result
,
let
arr
=
ret
.
list
,
arr
.
count
>
0
{
YHHUD
.
flash
(
message
:
"获取历史消息
\(
arr
.
count
)
条"
)
for
(
index
,
item
)
in
arr
.
enumerated
()
{
printLog
(
item
)
}
}
else
{
YHHUD
.
flash
(
message
:
"获取历史消息 (0) 条"
)
}
}
}
}
DispatchQueue
.
main
.
async
{
}
}
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment