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
e403d611
Commit
e403d611
authored
Jun 19, 2020
by
周亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂提
parent
0f35f164
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
7 deletions
+10
-7
NewPhobos.m
GMPhobos/Classes/NewPhobos.m
+2
-1
OldPhobos.m
GMPhobos/Classes/OldPhobos.m
+2
-1
Phobos.m
GMPhobos/Classes/Phobos.m
+3
-2
PhobosPVProtocol.h
GMPhobos/Classes/PhobosPVProtocol.h
+1
-1
UIResponder+PhobosPV.m
GMPhobos/Classes/UIResponder+PhobosPV.m
+2
-2
No files found.
GMPhobos/Classes/NewPhobos.m
View file @
e403d611
...
...
@@ -284,7 +284,8 @@ static dispatch_semaphore_t _phobos_semaphore;
[
dict
setObject
:
PhobosSafeString
(
page
.
messageId
)
forKey
:
@"message_id"
];
[
dict
setObject
:
PhobosSafeString
(
page
.
inTimeMillis
)
forKey
:
@"in_time_millis"
];
[
dict
setObject
:
PhobosSafeString
([
PhobosUtil
currentMMTime
])
forKey
:
@"out_time_millis"
];
[
dict
setObject
:
@
(
page
.
isFirst
)
forKey
:
@"is_first"
];
//首次进来为1,再次进入的时候都为0
[
dict
setObject
:
page
.
isFirst
?
@
(
0
):
@
(
1
)
forKey
:
@"is_first"
];
if
(
page
.
inTime
.
length
>
0
)
{
// 页面显示时间为空时不记录页面pv事件
...
...
GMPhobos/Classes/OldPhobos.m
View file @
e403d611
...
...
@@ -362,7 +362,8 @@ static OldPhobos *sharedClient = nil;
[
dict
setObject
:
PhobosSafeString
(
page
.
messageId
)
forKey
:
@"message_id"
];
[
dict
setObject
:
PhobosSafeString
(
page
.
inTimeMillis
)
forKey
:
@"in_time_millis"
];
[
dict
setObject
:
PhobosSafeString
([
PhobosUtil
currentMMTime
])
forKey
:
@"out_time_millis"
];
[
dict
setObject
:
@
(
page
.
isFirst
)
forKey
:
@"is_first"
];
//首次进来为1,再次进入的时候都为0
[
dict
setObject
:
page
.
isFirst
?
@
(
0
):
@
(
1
)
forKey
:
@"is_first"
];
if
(
page
.
inTime
.
length
>
0
)
{
// 页面显示时间为空时不记录页面pv事件
...
...
GMPhobos/Classes/Phobos.m
View file @
e403d611
...
...
@@ -137,8 +137,9 @@ static BOOL isGray = NO;
-
(
void
)
onPVEnd
:
(
UIResponder
<
PhobosPVProtocol
>
*
)
page
{
[
_rePhobos
onPVEnd
:
page
];
[
_oldPhobos
onPVEnd
:
page
];
//发送完一次pv就要置为0
page
.
isFirst
=
0
;
if
(
page
.
isFirst
==
0
)
{
page
.
isFirst
=
1
;
}
}
/**
...
...
GMPhobos/Classes/PhobosPVProtocol.h
View file @
e403d611
...
...
@@ -93,7 +93,7 @@ typedef void(^PhobosUpdatePVBlock)(void);
是否是第一次来到这个页面,在viewDidLoad赋值为1
在即将消失的方法赋值为0
*/
@property
(
nonatomic
,
assign
)
NSInteger
isFirst
;
@property
(
nonatomic
,
assign
)
BOOL
isFirst
;
/// 业务层更新PVStart信息
@property
(
nonatomic
,
copy
)
PhobosUpdatePVBlock
updatePVStartBlock
;
...
...
GMPhobos/Classes/UIResponder+PhobosPV.m
View file @
e403d611
...
...
@@ -254,11 +254,11 @@
objc_setAssociatedObject
(
self
,
@selector
(
updatePVStartBlock
),
updatePVStartBlock
,
OBJC_ASSOCIATION_COPY_NONATOMIC
);
}
-
(
void
)
setIsFirst
:
(
NSInteger
)
isFirst
{
-
(
void
)
setIsFirst
:
(
BOOL
)
isFirst
{
objc_setAssociatedObject
(
self
,
@selector
(
isFirst
),
@
(
isFirst
),
OBJC_ASSOCIATION_ASSIGN
);
}
-
(
NSInteger
)
isFirst
{
-
(
BOOL
)
isFirst
{
NSNumber
*
num
=
objc_getAssociatedObject
(
self
,
_cmd
);
return
[
num
integerValue
];
}
...
...
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