Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckFarm
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmj
LuckFarm
Commits
0357690c
Commit
0357690c
authored
Nov 13, 2020
by
Mazy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/master'
parents
85e55703
f19e326b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
IOSADManager.m
GYDemo/GYDemo/SCAds/IOSADManager.m
+21
-10
No files found.
GYDemo/GYDemo/SCAds/IOSADManager.m
View file @
0357690c
...
...
@@ -143,7 +143,9 @@ static IOSADManager * manager = nil;
}
}
else
{
[
MBProgressHUD
showLoading
:
@"请稍等..."
];
MBProgressHUD
*
hud
=
[
MBProgressHUD
showMessage
:
@"请稍等..."
];
hud
.
minShowTime
=
3
;
self
.
showNow
=
YES
;
...
...
@@ -311,7 +313,9 @@ static IOSADManager * manager = nil;
}
else
{
if
(
AdType
==
ADType_Video
)
{
// 视频
GYAdsTrackModel
*
adData
=
self
.
videoModels
.
firstObject
;
GYAdsTrackModel
*
adData
=
loadADModel
;
NSLog
(
@">>>>>>> 缓存 失败 %@ 不支持"
,
adData
.
adPlatform
);
if
(
adData
.
firstFailure
==
NO
)
{
adData
.
firstFailure
=
YES
;
}
else
{
...
...
@@ -320,7 +324,7 @@ static IOSADManager * manager = nil;
if
(
adData
.
backups
.
count
)
{
[
self
loadAdWithData
:
adData
.
backups
.
firstObject
withADType
:
AdType
];
}
else
{
[
self
.
videoModels
removeObject
:
self
.
videoModels
.
firstObject
];
[
self
.
videoModels
removeObject
:
loadADModel
];
if
(
self
.
videoModels
.
count
)
{
[
self
loadAdWithData
:
self
.
videoModels
.
firstObject
withADType
:
AdType
];
...
...
@@ -371,6 +375,7 @@ static IOSADManager * manager = nil;
/// @param adType 广告类型
-
(
void
)
showAdWithData
:
(
GYAdsTrackModel
*
)
showData
withADType
:
(
eADType
)
adType
;{
if
(
adType
==
ADType_Video
)
{
// 视频
NSLog
(
@">>>>>>> 正在播放 成功 平台 = %@ ID = %@ <<<<<<<<<"
,
showData
.
adPlatform
,
showData
.
codeId
);
WEAKSELF
;
if
([
showData
.
adPlatform
isEqualToString
:
@"chuanshanjia"
])
{
[
self
.
csjAd
showAdWithData
:
showData
withADType
:
adType
];
...
...
@@ -384,10 +389,13 @@ static IOSADManager * manager = nil;
}
else
if
([
showData
.
adPlatform
isEqualToString
:
@"ruishi"
]){
[
self
.
ruishiAd
showAdWithData
:
showData
withADType
:
adType
];
}
if
(
self
.
videoModels
.
count
<=
1
)
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
weakSelf
requestVideoAD
];
});
}
else
{
[
self
loadAdWithData
:
self
.
videoModels
[
1
]
withADType
:
ADType_Video
];
}
}
else
if
(
adType
==
ADType_BigImage
){
//大图
...
...
@@ -526,15 +534,18 @@ static IOSADManager * manager = nil;
[
weakSelf
.
videoModels
addObjectsFromArray
:
models
];
//有缓存
if
(
weakSelf
.
cachevideo
.
count
==
0
&&
weakSelf
.
videoModels
.
count
==
1
)
{
[
weakSelf
loadAdWithData
:
weakSelf
.
videoModels
.
firstObject
withADType
:
ADType_Video
];
if
(
weakSelf
.
cachevideo
.
count
<=
1
)
{
if
(
weakSelf
.
videoModels
.
count
>
1
)
{
[
weakSelf
loadAdWithData
:
weakSelf
.
videoModels
[
1
]
withADType
:
ADType_Video
];
}
else
{
[
weakSelf
loadAdWithData
:
weakSelf
.
videoModels
.
firstObject
withADType
:
ADType_Video
];
}
}
else
{
if
(
weakSelf
.
videoModels
.
count
>=
2
)
{
[
weakSelf
loadAdWithData
:
weakSelf
.
videoModels
[
1
]
withADType
:
ADType_Video
];
}
else
{
NSLog
(
@">>>>weakSelf.cachevideo == %lu"
,(
unsigned
long
)
weakSelf
.
videoModels
.
count
);
}
}
}
else
{
[[
CGUserManager
shared
]
addLocCollection
:
@"reward_request"
value
:
@"reward_request_failed"
];
...
...
@@ -558,11 +569,11 @@ static IOSADManager * manager = nil;
WEAKSELF
;
if
(
success
)
{
//埋点
[
self
trackingADWith
:
model
.
pullsucc_tracking
.
firstObject
];
NSLog
(
@">>>>>>> 缓存 成功 平台 = %@ ID = %@
<<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
);
NSLog
(
@">>>>>>> 缓存 成功 平台 = %@ ID = %@
type= %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
,
model
.
slotName
);
model
.
cacheDate
=
[
NSDate
date
];
// 缓存成功时间
}
else
{
[
self
trackingADWith
:
model
.
pullfail_tracking
.
firstObject
];
NSLog
(
@">>>>>>> 缓存 失败 平台 = %@ ID = %@
<<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
);
NSLog
(
@">>>>>>> 缓存 失败 平台 = %@ ID = %@
type= %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
,
model
.
slotName
);
}
if
(
model
.
loadADType
==
ADType_Video
){
...
...
@@ -616,11 +627,11 @@ static IOSADManager * manager = nil;
-
(
void
)
blockResultShowWithData
:
(
GYAdsTrackModel
*
)
model
andSuccess
:
(
BOOL
)
success
;{
WEAKSELF
;
if
(
success
)
{
//埋点
NSLog
(
@">>>>>>>
缓存 成功 平台 = %@ ID = %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
);
NSLog
(
@">>>>>>>
展示 成功 平台 = %@ ID = %@ type = %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
,
model
.
slotName
);
[
self
trackingADWith
:
model
.
imp_tracking
.
firstObject
];
[
self
trackingADWith
:
model
.
playcomplete_trackings
.
firstObject
];
}
else
{
NSLog
(
@">>>>>>>
缓存 失败 平台 = %@ ID = %@ %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
,
model
.
ADError
);
NSLog
(
@">>>>>>>
展示 失败 平台 = %@ ID = %@ %@ type = %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
,
model
.
ADError
,
model
.
slotName
);
[
self
trackingADWith
:
model
.
showfail_tracking
.
firstObject
];
}
...
...
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