Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OffcnIMSDKiOS
Overview
Overview
Details
Activity
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
opensource
OffcnIMSDKiOS
Commits
60e090ba
Commit
60e090ba
authored
Sep 04, 2020
by
zhangyunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时序排序
parent
cf0bfd16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
21 deletions
+39
-21
OffcnIMSDKiOS.m
OffcnIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMSDKiOS.m
+10
-2
OffcnIMZYJFMDBHandler.m
...nIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMZYJFMDBHandler.m
+17
-16
SDGeneralTool.h
OffcnIMSDKiOS/Tools-(工具)/GeneralTool/SDGeneralTool.h
+3
-1
SDGeneralTool.m
OffcnIMSDKiOS/Tools-(工具)/GeneralTool/SDGeneralTool.m
+7
-1
OffcnNetworkExecutor.m
...IMSDKiOS/Tools-(工具)/NetworkManager/OffcnNetworkExecutor.m
+2
-1
No files found.
OffcnIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMSDKiOS.m
View file @
60e090ba
//
//
...
@@ -114,7 +114,9 @@ static OffcnIMSDKiOS *liveTelecastSDK;
...
@@ -114,7 +114,9 @@ static OffcnIMSDKiOS *liveTelecastSDK;
-
(
void
)
sendMsgWithMsg_fromID
:
(
NSString
*
)
msg_fromID
msg_toID
:
(
NSString
*
)
msg_toID
msg_type
:
(
OffcnSDKMsgType
)
msg_type
text
:
(
NSString
*
)
text
filePath
:
(
NSString
*
)
filePath
Finished
:
(
void
(
^
)(
BOOL
success
,
OffcnIMSendMsgModel
*
sendMsgModel
,
NSString
*
errorMessage
))
finished
ProgressPercent
:
(
void
(
^
)(
NSString
*
key
,
float
percent
))
progressPercent
{
-
(
void
)
sendMsgWithMsg_fromID
:
(
NSString
*
)
msg_fromID
msg_toID
:
(
NSString
*
)
msg_toID
msg_type
:
(
OffcnSDKMsgType
)
msg_type
text
:
(
NSString
*
)
text
filePath
:
(
NSString
*
)
filePath
Finished
:
(
void
(
^
)(
BOOL
success
,
OffcnIMSendMsgModel
*
sendMsgModel
,
NSString
*
errorMessage
))
finished
ProgressPercent
:
(
void
(
^
)(
NSString
*
key
,
float
percent
))
progressPercent
{
KWeakSelf
KWeakSelf
NSString
*
tidStr
=
[
NSString
stringWithFormat
:
@"%@_%@"
,
msg_toID
,[
SDGeneralTool
getNowSSSTimeTimestamp
]];
NSString
*
msg_seqStr
=
[
SDGeneralTool
getNowSSSTimeTimestamp
];
NSString
*
send_timeStr
=
[
SDGeneralTool
getIMAllTimeWithSeconds
:[
msg_seqStr
integerValue
]];
NSString
*
tidStr
=
[
NSString
stringWithFormat
:
@"%@__%@"
,
msg_toID
,
msg_seqStr
];
if
(
msg_type
==
OffcnSDKMsgTypeText
)
{
if
(
msg_type
==
OffcnSDKMsgTypeText
)
{
if
(
!
text
||
!
text
.
length
)
{
if
(
!
text
||
!
text
.
length
)
{
...
@@ -127,6 +129,8 @@ static OffcnIMSDKiOS *liveTelecastSDK;
...
@@ -127,6 +129,8 @@ static OffcnIMSDKiOS *liveTelecastSDK;
BodyModel
.
msg_to
=
msg_toID
;
BodyModel
.
msg_to
=
msg_toID
;
BodyModel
.
msg_type
=
msg_type
;
BodyModel
.
msg_type
=
msg_type
;
BodyModel
.
tid
=
tidStr
;
BodyModel
.
tid
=
tidStr
;
BodyModel
.
msg_seq
=
[
msg_seqStr
integerValue
];
BodyModel
.
send_time
=
send_timeStr
;
MsgModel
.
msg
=
text
;
MsgModel
.
msg
=
text
;
BodyModel
.
msg
=
MsgModel
;
BodyModel
.
msg
=
MsgModel
;
BodyModel
.
isSentSuccess
=
0
;
BodyModel
.
isSentSuccess
=
0
;
...
@@ -152,6 +156,8 @@ static OffcnIMSDKiOS *liveTelecastSDK;
...
@@ -152,6 +156,8 @@ static OffcnIMSDKiOS *liveTelecastSDK;
BodyModel
.
msg_to
=
msg_toID
;
BodyModel
.
msg_to
=
msg_toID
;
BodyModel
.
msg_type
=
msg_type
;
BodyModel
.
msg_type
=
msg_type
;
BodyModel
.
tid
=
tidStr
;
BodyModel
.
tid
=
tidStr
;
BodyModel
.
msg_seq
=
[
msg_seqStr
integerValue
];
BodyModel
.
send_time
=
send_timeStr
;
BodyModel
.
isSentSuccess
=
0
;
BodyModel
.
isSentSuccess
=
0
;
BodyModel
.
bymyself
=
1
;
BodyModel
.
bymyself
=
1
;
BodyModel
.
isRead
=
0
;
BodyModel
.
isRead
=
0
;
...
@@ -227,6 +233,8 @@ static OffcnIMSDKiOS *liveTelecastSDK;
...
@@ -227,6 +233,8 @@ static OffcnIMSDKiOS *liveTelecastSDK;
BodyModel
.
msg_to
=
msg_toID
;
BodyModel
.
msg_to
=
msg_toID
;
BodyModel
.
msg_type
=
msg_type
;
BodyModel
.
msg_type
=
msg_type
;
BodyModel
.
tid
=
tidStr
;
BodyModel
.
tid
=
tidStr
;
BodyModel
.
msg_seq
=
[
msg_seqStr
integerValue
];
BodyModel
.
send_time
=
send_timeStr
;
BodyModel
.
isSentSuccess
=
0
;
BodyModel
.
isSentSuccess
=
0
;
BodyModel
.
bymyself
=
1
;
BodyModel
.
bymyself
=
1
;
BodyModel
.
isRead
=
0
;
BodyModel
.
isRead
=
0
;
...
...
OffcnIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMZYJFMDBHandler.m
View file @
60e090ba
This diff is collapsed.
Click to expand it.
OffcnIMSDKiOS/Tools-(工具)/GeneralTool/SDGeneralTool.h
View file @
60e090ba
//
//
...
@@ -42,6 +42,8 @@
...
@@ -42,6 +42,8 @@
+
(
NSString
*
)
getHHTimeWithSeconds
:(
NSTimeInterval
)
s
;
+
(
NSString
*
)
getHHTimeWithSeconds
:(
NSTimeInterval
)
s
;
+
(
NSString
*
)
getIMAllTimeWithSeconds
:(
NSTimeInterval
)
s
;
+
(
NSString
*
)
getTimeWithSeconds
:(
NSTimeInterval
)
s
;
+
(
NSString
*
)
getTimeWithSeconds
:(
NSTimeInterval
)
s
;
+
(
NSString
*
)
getTimeWithDate
:(
NSDate
*
)
date
;
+
(
NSString
*
)
getTimeWithDate
:(
NSDate
*
)
date
;
...
...
OffcnIMSDKiOS/Tools-(工具)/GeneralTool/SDGeneralTool.m
View file @
60e090ba
//
//
...
@@ -245,6 +245,12 @@
...
@@ -245,6 +245,12 @@
NSDate
*
date
=
[
NSDate
dateWithTimeIntervalSince1970
:
s
/
1000
];
NSDate
*
date
=
[
NSDate
dateWithTimeIntervalSince1970
:
s
/
1000
];
return
[
format
stringFromDate
:
date
];
return
[
format
stringFromDate
:
date
];
}
}
+
(
NSString
*
)
getIMAllTimeWithSeconds
:
(
NSTimeInterval
)
s
{
NSDateFormatter
*
format
=
[[
NSDateFormatter
alloc
]
init
];
[
format
setDateFormat
:
@"yyyy-MM-dd HH:mm:ss"
];
NSDate
*
date
=
[
NSDate
dateWithTimeIntervalSince1970
:
s
/
1000
];
return
[
format
stringFromDate
:
date
];
}
+
(
NSString
*
)
getTimeWithSeconds
:
(
NSTimeInterval
)
s
{
+
(
NSString
*
)
getTimeWithSeconds
:
(
NSTimeInterval
)
s
{
NSDateFormatter
*
format
=
[[
NSDateFormatter
alloc
]
init
];
NSDateFormatter
*
format
=
[[
NSDateFormatter
alloc
]
init
];
[
format
setDateFormat
:
@"yyyy-MM-dd HH:mm:ss"
];
[
format
setDateFormat
:
@"yyyy-MM-dd HH:mm:ss"
];
...
...
OffcnIMSDKiOS/Tools-(工具)/NetworkManager/OffcnNetworkExecutor.m
View file @
60e090ba
//
//
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
BodyModel
.
send_time
=
SendMsgModel
.
send_time
;
BodyModel
.
send_time
=
SendMsgModel
.
send_time
;
BodyModel
.
session_id
=
SendMsgModel
.
session_id
;
BodyModel
.
session_id
=
SendMsgModel
.
session_id
;
BodyModel
.
tid
=
SendMsgModel
.
tid
;
BodyModel
.
tid
=
SendMsgModel
.
tid
;
BodyModel
.
msg_seq
=
[[[
tid
componentsSeparatedByString
:
@"__"
]
lastObject
]
integerValue
];
BodyModel
.
isSentSuccess
=
1
;
BodyModel
.
isSentSuccess
=
1
;
BodyModel
.
msg_type
=
msg_type
;
BodyModel
.
msg_type
=
msg_type
;
if
(
msg_type
==
1
)
{
if
(
msg_type
==
1
)
{
...
...
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