Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMPhobos
Project
Project
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMPhobos
Commits
eb03882f
Commit
eb03882f
authored
Apr 09, 2020
by
井庆林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review
parent
fef3d62e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
NewPhobos.m
GMPhobos/Classes/NewPhobos.m
+4
-6
No files found.
GMPhobos/Classes/NewPhobos.m
View file @
eb03882f
...
...
@@ -409,9 +409,8 @@ static NewPhobos *_sharedClient;
NSDictionary
*
dataDict
=
[
_sharedClient
prepareDictionaryForEvent
:
eventName
attributes
:
attributes
];
@try
{
NSData
*
JSON
=
[
PhobosUtil
encodeJSON
:
dataDict
];
[
PhobosDataManager
insertData
:
dataDict
sendAPI
:
currentAPI
completion
:^
(
BOOL
contextDidSave
,
NSError
*
_Nullable
error
)
{
[
self
disposeSendDataWithImmediately
:
sendNow
];
}];
[
PhobosDataManager
insertData
:
dataDict
sendAPI
:
currentAPI
];
[
self
disposeSendDataWithImmediately
:
sendNow
];
}
@catch
(
NSException
*
exception
)
{
NSAssert
(
NO
,
@"哎呀呀,VALUE不能为NSObject "
);
}
...
...
@@ -426,9 +425,8 @@ static NewPhobos *_sharedClient;
[
PhobosDataManager
updateDataEntities
:
entities
sendStatus
:
PhobosDataSendStatusSending
];
[
PhobosSendManager
sendDataWithEntities
:
entities
completion
:
^
(
NSArray
<
PhobosSendDataEntity
*>
*
_Nonnull
finishEntities
,
NSInteger
code
)
{
if
(
code
==
200
)
{
[
PhobosDataManager
updateDataEntities
:
finishEntities
sendStatus
:
PhobosDataSendStatusFinish
completion
:^
(
BOOL
contextDidSave
,
NSError
*
_Nullable
error
)
{
[
PhobosDataManager
deleteDataEntities
:
finishEntities
];
}];
[
PhobosDataManager
updateDataEntities
:
finishEntities
sendStatus
:
PhobosDataSendStatusFinish
];
[
PhobosDataManager
deleteDataEntities
:
finishEntities
];
}
else
{
[
PhobosDataManager
updateDataEntities
:
finishEntities
sendStatus
:
PhobosDataSendStatusError
];
}
...
...
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