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
d7d21314
Commit
d7d21314
authored
Jun 23, 2020
by
乔金柱
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jz/master' into 'master'
Jz/master See merge request
!64
parents
c024e582
a9554016
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
NewPhobos.m
GMPhobos/Classes/NewPhobos.m
+5
-5
OldPhobos.m
GMPhobos/Classes/OldPhobos.m
+5
-5
PhobosPVProtocol.h
GMPhobos/Classes/PhobosPVProtocol.h
+2
-2
UIResponder+PhobosPV.m
GMPhobos/Classes/UIResponder+PhobosPV.m
+3
-3
No files found.
GMPhobos/Classes/NewPhobos.m
View file @
d7d21314
...
...
@@ -262,8 +262,8 @@ static dispatch_semaphore_t _phobos_semaphore;
-
(
void
)
onPVEnd
:
(
UIResponder
<
PhobosPVProtocol
>
*
)
page
{
if
(
!
[
PhobosUtil
isNonEmpty
:
page
.
pageName
]
||
!
page
.
needLogPV
)
{
if
(
!
page
.
isFirst
)
{
page
.
isFirst
=
YES
;
if
(
!
page
.
isFirst
Entry
)
{
page
.
isFirst
Entry
=
YES
;
}
return
;
}
...
...
@@ -288,9 +288,9 @@ static dispatch_semaphore_t _phobos_semaphore;
[
dict
setObject
:
PhobosSafeString
(
page
.
inTimeMillis
)
forKey
:
@"in_time_millis"
];
[
dict
setObject
:
PhobosSafeString
([
PhobosUtil
currentMMTime
])
forKey
:
@"out_time_millis"
];
//首次进来为1,再次进入的时候都为0
[
dict
setObject
:
page
.
isFirst
?
@
(
0
):
@
(
1
)
forKey
:
@"is_first"
];
if
(
!
page
.
isFirst
)
{
page
.
isFirst
=
YES
;
[
dict
setObject
:
page
.
isFirst
Entry
?
@
(
0
):
@
(
1
)
forKey
:
@"is_first"
];
if
(
!
page
.
isFirst
Entry
)
{
page
.
isFirst
Entry
=
YES
;
}
if
(
page
.
inTime
.
length
>
0
)
{
// 页面显示时间为空时不记录页面pv事件
...
...
GMPhobos/Classes/OldPhobos.m
View file @
d7d21314
...
...
@@ -340,8 +340,8 @@ static OldPhobos *sharedClient = nil;
-
(
void
)
onPVEnd
:
(
UIResponder
<
PhobosPVProtocol
>
*
)
page
{
if
(
!
[
PhobosUtil
isNonEmpty
:
page
.
pageName
]
||
!
page
.
needLogPV
)
{
if
(
!
page
.
isFirst
)
{
page
.
isFirst
=
YES
;
if
(
!
page
.
isFirst
Entry
)
{
page
.
isFirst
Entry
=
YES
;
}
return
;
}
...
...
@@ -366,9 +366,9 @@ static OldPhobos *sharedClient = nil;
[
dict
setObject
:
PhobosSafeString
(
page
.
inTimeMillis
)
forKey
:
@"in_time_millis"
];
[
dict
setObject
:
PhobosSafeString
([
PhobosUtil
currentMMTime
])
forKey
:
@"out_time_millis"
];
//首次进来为1,再次进入的时候都为0
[
dict
setObject
:
page
.
isFirst
?
@
(
0
):
@
(
1
)
forKey
:
@"is_first"
];
if
(
!
page
.
isFirst
)
{
page
.
isFirst
=
YES
;
[
dict
setObject
:
page
.
isFirst
Entry
?
@
(
0
):
@
(
1
)
forKey
:
@"is_first"
];
if
(
!
page
.
isFirst
Entry
)
{
page
.
isFirst
Entry
=
YES
;
}
if
(
page
.
inTime
.
length
>
0
)
{
// 页面显示时间为空时不记录页面pv事件
...
...
GMPhobos/Classes/PhobosPVProtocol.h
View file @
d7d21314
...
...
@@ -91,9 +91,9 @@ typedef void(^PhobosUpdatePVBlock)(void);
@property
(
nonatomic
,
strong
)
NSArray
*
referrerLink
;
/**
是否是第一次来到这个页面,在viewDidLoad赋值为1
在即将消失的方法赋值为0
在即将消失的方法赋值为0
(是否是首次上报)
*/
@property
(
nonatomic
,
assign
)
BOOL
isFirst
;
@property
(
nonatomic
,
assign
)
BOOL
isFirst
Entry
;
/// 业务层更新PVStart信息
@property
(
nonatomic
,
copy
)
PhobosUpdatePVBlock
updatePVStartBlock
;
...
...
GMPhobos/Classes/UIResponder+PhobosPV.m
View file @
d7d21314
...
...
@@ -254,11 +254,11 @@
objc_setAssociatedObject
(
self
,
@selector
(
updatePVStartBlock
),
updatePVStartBlock
,
OBJC_ASSOCIATION_COPY_NONATOMIC
);
}
-
(
void
)
setIsFirst
:
(
BOOL
)
isFirst
{
objc_setAssociatedObject
(
self
,
@selector
(
isFirst
),
@
(
isFirst
),
OBJC_ASSOCIATION_ASSIGN
);
-
(
void
)
setIsFirst
Entry
:
(
BOOL
)
isFirstEntry
{
objc_setAssociatedObject
(
self
,
@selector
(
isFirst
Entry
),
@
(
isFirstEntry
),
OBJC_ASSOCIATION_ASSIGN
);
}
-
(
BOOL
)
isFirst
{
-
(
BOOL
)
isFirstEntry
{
NSNumber
*
num
=
objc_getAssociatedObject
(
self
,
_cmd
);
return
[
num
boolValue
];
}
...
...
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