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
5dc9f2ae
Commit
5dc9f2ae
authored
Mar 25, 2020
by
井庆林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review
parent
31344624
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
Phobos.m
GMPhobos/Classes/Phobos.m
+6
-0
PhobosDataManager.h
GMPhobos/Classes/PhobosDataManager.h
+0
-1
PhobosSendManager.m
GMPhobos/Classes/PhobosSendManager.m
+1
-1
PhobosUtil.m
GMPhobos/Classes/PhobosUtil.m
+1
-1
No files found.
GMPhobos/Classes/Phobos.m
View file @
5dc9f2ae
...
...
@@ -208,6 +208,12 @@ static BOOL isGray = NO;
_oldPhobos
.
getTopController
=
getTopController
;
}
-
(
NSString
*
)
serverAPI
{
if
(
isGray
)
{
return
_rePhobos
.
serverAPI
;
}
else
_oldPhobos
.
serverAPI
;
}
@end
...
...
GMPhobos/Classes/PhobosDataManager.h
View file @
5dc9f2ae
...
...
@@ -12,7 +12,6 @@
NS_ASSUME_NONNULL_BEGIN
typedef
NS_ENUM
(
NSInteger
,
PhobosDataSendStatus
)
{
PhobosDataSendStatusNormal
=
0
,
// 普通埋点数据
PhobosDataSendStatusToBeSend
=
1
,
// 待发送数据
PhobosDataSendStatusSending
=
2
,
// 发送中数据
PhobosDataSendStatusFinish
=
3
,
// 发送完成数据
...
...
GMPhobos/Classes/PhobosSendManager.m
View file @
5dc9f2ae
...
...
@@ -35,7 +35,7 @@
[
total
addObjectsFromArray
:
normalDataArray
];
[
total
addObjectsFromArray
:
immiDataArray
];
if
(
total
.
count
>
0
)
{
[
self
sendDataArray
:
total
currentAPI
:
Phobos
.
sharedClient
.
apiHost
success
:^
(
NSInteger
code
)
{
[
self
sendDataArray
:
total
currentAPI
:
Phobos
.
sharedClient
.
serverAPI
success
:^
(
NSInteger
code
)
{
if
(
code
)
{
[
GMCache
removeObjectAtDocumentPathWithkey
:
PhobosCacheKey
];
[
GMCache
removeObjectAtDocumentPathWithkey
:
PhobosTempCacheKey
];
...
...
GMPhobos/Classes/PhobosUtil.m
View file @
5dc9f2ae
...
...
@@ -116,7 +116,7 @@
+
(
void
)
sendData
:(
NSData
*
)
data
success
:(
SendDataSuccessBlock
)
success
{
@try
{
NSMutableURLRequest
*
request
=
[[
NSMutableURLRequest
alloc
]
initWithURL
:[
NSURL
URLWithString
:
[
Phobos
sharedClient
]
.
serverAPI
]];
NSMutableURLRequest
*
request
=
[[
NSMutableURLRequest
alloc
]
initWithURL
:[
NSURL
URLWithString
:
Phobos
.
sharedClient
.
serverAPI
]];
[
request
setValue
:
@"gzip"
forHTTPHeaderField
:
@"Content-Encoding"
];
request
.
HTTPBody
=
data
;
request
.
HTTPMethod
=
@"POST"
;
...
...
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