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
bfb48028
Commit
bfb48028
authored
Nov 16, 2020
by
Mazy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/master'
parents
57a38c6d
0fd68957
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
54 deletions
+72
-54
GYCashSixAwardAlertView.m
GYDemo/GYDemo/Alert/GYCashSixAwardAlertView.m
+4
-2
IOSADManager.m
GYDemo/GYDemo/SCAds/IOSADManager.m
+36
-19
AddGDTADManager.m
GYDemo/GYDemo/SCAds/platform/AddGDTADManager.m
+6
-6
AddRuiShiADManager.m
GYDemo/GYDemo/SCAds/platform/AddRuiShiADManager.m
+5
-5
AddSigmobADManager.m
GYDemo/GYDemo/SCAds/platform/AddSigmobADManager.m
+21
-22
No files found.
GYDemo/GYDemo/Alert/GYCashSixAwardAlertView.m
View file @
bfb48028
...
@@ -112,10 +112,12 @@
...
@@ -112,10 +112,12 @@
if
(
success
)
{
if
(
success
)
{
UIView
*
flowView
=
[
IOSADManager
shareADManager
].
flowBgView
;
UIView
*
flowView
=
[
IOSADManager
shareADManager
].
flowBgView
;
[
self
.
adContentView
addSubview
:
flowView
];
if
(
flowView
)
{
[
weakSelf
.
adContentView
addSubview
:
flowView
];
}
}
}
CGFloat
offset
=
(
UIScreen
.
mainScreen
.
bounds
.
size
.
height
-
s
elf
.
mainContentView
.
bounds
.
size
.
height
)
/
2
-
40
-
statusBarFrameHeight
;
CGFloat
offset
=
(
UIScreen
.
mainScreen
.
bounds
.
size
.
height
-
weakS
elf
.
mainContentView
.
bounds
.
size
.
height
)
/
2
-
40
-
statusBarFrameHeight
;
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
weakSelf
.
mainContentView
.
transform
=
CGAffineTransformMakeTranslation
(
0
,
-
offset
);
weakSelf
.
mainContentView
.
transform
=
CGAffineTransformMakeTranslation
(
0
,
-
offset
);
weakSelf
.
adContentView
.
transform
=
CGAffineTransformMakeTranslation
(
0
,
-
offset
);
weakSelf
.
adContentView
.
transform
=
CGAffineTransformMakeTranslation
(
0
,
-
offset
);
...
...
GYDemo/GYDemo/SCAds/IOSADManager.m
View file @
bfb48028
...
@@ -230,7 +230,9 @@ static IOSADManager * manager = nil;
...
@@ -230,7 +230,9 @@ static IOSADManager * manager = nil;
/// @param AdType 广告类型
/// @param AdType 广告类型
-
(
void
)
loadAdWithData
:
(
GYAdsTrackModel
*
)
loadADModel
withADType
:
(
eADType
)
AdType
;{
-
(
void
)
loadAdWithData
:
(
GYAdsTrackModel
*
)
loadADModel
withADType
:
(
eADType
)
AdType
;{
NSLog
(
@">>>>>>> 准备缓存 平台 = %@ ID = %@ type= %@ <<<<<<<<<"
,
loadADModel
.
adPlatform
,
loadADModel
.
codeId
,
loadADModel
.
slotName
);
NSLog
(
@">>>>>>> 准备缓存 平台 = %@ ID = %@ type= %@ <<<<<<<<<"
,
loadADModel
.
adPlatform
,
loadADModel
.
codeId
,
loadADModel
.
slotName
);
if
(
AdType
==
ADType_Video
)
{
NSLog
(
@">>>>>>> 🆚 %@ %@"
,[
NSDate
date
],
loadADModel
.
adPlatform
);
}
self
.
haveLodeAD
=
YES
;
self
.
haveLodeAD
=
YES
;
loadADModel
.
loadADType
=
AdType
;
loadADModel
.
loadADType
=
AdType
;
if
([
self
.
loadADDataArray
count
]
>
6
)
{
if
([
self
.
loadADDataArray
count
]
>
6
)
{
...
@@ -248,11 +250,15 @@ static IOSADManager * manager = nil;
...
@@ -248,11 +250,15 @@ static IOSADManager * manager = nil;
if
([
self
contentADDataWith
:
loadADModel
])
{
//有数据
if
([
self
contentADDataWith
:
loadADModel
])
{
//有数据
// 什么都不做或者 直接加载
// 什么都不做或者 直接加载
}
else
{
}
else
{
NSInteger
time
=
0
.
1
;
__block
NSInteger
time
=
0
.
1
;
if
(
self
.
csjAd
==
nil
||
self
.
loadADDataArray
.
count
>
1
)
{
if
(
self
.
csjAd
==
nil
||
self
.
loadADDataArray
.
count
>
1
)
{
time
=
0
.
1
;
time
=
0
.
1
;
}
else
{
}
else
{
time
=
5
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
time
=
2
;
});
}
}
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
time
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
time
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
// 去加载
// 去加载
...
@@ -427,22 +433,23 @@ static IOSADManager * manager = nil;
...
@@ -427,22 +433,23 @@ static IOSADManager * manager = nil;
[
weakSelf
.
ruishiAd
showAdWithData
:
showData
withADType
:
adType
];
[
weakSelf
.
ruishiAd
showAdWithData
:
showData
withADType
:
adType
];
}
}
if
([
showData
.
adPlatform
isEqualToString
:
@"sigmob"
]){
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
3
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
if
(
weakSelf
.
videoModels
.
count
<=
1
)
{
[
weakSelf
requestVideoAD
];
}
else
{
[
weakSelf
loadAdWithData
:
weakSelf
.
videoModels
[
1
]
withADType
:
ADType_Video
];
}
});
}
else
{
// if ([showData.adPlatform isEqualToString:@"sigmob"]){
if
(
weakSelf
.
videoModels
.
count
<=
1
)
{
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[
weakSelf
requestVideoAD
];
// if (weakSelf.videoModels.count <= 1) {
}
else
{
// [weakSelf requestVideoAD];
[
weakSelf
loadAdWithData
:
weakSelf
.
videoModels
[
1
]
withADType
:
ADType_Video
];
// }else{
}
// [weakSelf loadAdWithData:weakSelf.videoModels[1] withADType:ADType_Video];
}
// }
// });
//
// } else {
// if (weakSelf.videoModels.count <= 1) {
// [weakSelf requestVideoAD];
// }else{
// [weakSelf loadAdWithData:weakSelf.videoModels[1] withADType:ADType_Video];
// }
// }
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// if (weakSelf.videoModels.count <= 1) {
// if (weakSelf.videoModels.count <= 1) {
...
@@ -644,6 +651,8 @@ static IOSADManager * manager = nil;
...
@@ -644,6 +651,8 @@ static IOSADManager * manager = nil;
if
(
weakSelf
.
showNow
){
if
(
weakSelf
.
showNow
){
[
weakSelf
showADType
:
ADType_Video
resultBlock
:
weakSelf
.
adShowBlock
];
[
weakSelf
showADType
:
ADType_Video
resultBlock
:
weakSelf
.
adShowBlock
];
}
}
NSLog
(
@">>>>>>> ✅ %@ %@"
,[
NSDate
date
],
model
.
adPlatform
);
}
else
{
}
else
{
if
(
weakSelf
.
videoModels
.
count
>
weakSelf
.
cachevideo
.
count
)
{
if
(
weakSelf
.
videoModels
.
count
>
weakSelf
.
cachevideo
.
count
)
{
...
@@ -706,6 +715,7 @@ static IOSADManager * manager = nil;
...
@@ -706,6 +715,7 @@ static IOSADManager * manager = nil;
[
self
trackingADWith
:
model
.
pullsucc_tracking
.
firstObject
];
[
self
trackingADWith
:
model
.
pullsucc_tracking
.
firstObject
];
NSLog
(
@">>>>>>> 缓存 成功 平台 = %@ ID = %@ type= %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
,
model
.
slotName
);
NSLog
(
@">>>>>>> 缓存 成功 平台 = %@ ID = %@ type= %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
,
model
.
slotName
);
model
.
cacheDate
=
[
NSDate
date
];
// 缓存成功时间
model
.
cacheDate
=
[
NSDate
date
];
// 缓存成功时间
}
else
{
}
else
{
[
self
trackingADWith
:
model
.
pullfail_tracking
.
firstObject
];
[
self
trackingADWith
:
model
.
pullfail_tracking
.
firstObject
];
NSLog
(
@">>>>>>> 缓存 失败 平台 = %@ ID = %@ type= %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
,
model
.
slotName
);
NSLog
(
@">>>>>>> 缓存 失败 平台 = %@ ID = %@ type= %@ <<<<<<<<<"
,
model
.
adPlatform
,
model
.
codeId
,
model
.
slotName
);
...
@@ -743,6 +753,7 @@ static IOSADManager * manager = nil;
...
@@ -743,6 +753,7 @@ static IOSADManager * manager = nil;
if
(
model
.
loadADType
==
ADType_Video
){
if
(
model
.
loadADType
==
ADType_Video
){
// [NSObject cancelPreviousPerformRequestsWithTarget:self];
// [NSObject cancelPreviousPerformRequestsWithTarget:self];
weakSelf
.
adShowBlock
(
success
);
weakSelf
.
adShowBlock
(
success
);
...
@@ -774,6 +785,12 @@ static IOSADManager * manager = nil;
...
@@ -774,6 +785,12 @@ static IOSADManager * manager = nil;
[
weakSelf
clearCache
:
model
];
[
weakSelf
clearCache
:
model
];
if
(
weakSelf
.
videoModels
.
count
<
1
)
{
[
weakSelf
requestVideoAD
];
}
else
{
[
weakSelf
loadAdWithData
:
weakSelf
.
videoModels
.
firstObject
withADType
:
ADType_Video
];
}
}
else
if
(
model
.
loadADType
==
ADType_OpenScreen
){
}
else
if
(
model
.
loadADType
==
ADType_OpenScreen
){
if
(
success
)
{
if
(
success
)
{
[[
CGUserManager
shared
]
addLocCollection
:
@"splash_back"
value
:
@"splash_display_success"
];
[[
CGUserManager
shared
]
addLocCollection
:
@"splash_back"
value
:
@"splash_display_success"
];
...
...
GYDemo/GYDemo/SCAds/platform/AddGDTADManager.m
View file @
bfb48028
...
@@ -48,11 +48,11 @@
...
@@ -48,11 +48,11 @@
// });
// });
}
else
if
(
AdType
==
ADType_Video
){
//视频
}
else
if
(
AdType
==
ADType_Video
){
//视频
GYAdsTrackModel
*
oldData
=
[
IOSADManager
shareADManager
].
cachevideo
.
firstObject
;
//
GYAdsTrackModel * oldData = [IOSADManager shareADManager].cachevideo.firstObject;
if
([
oldData
.
adPlatform
isEqualToString
:
@"guangdiantong"
])
{
//
if ([oldData.adPlatform isEqualToString: @"guangdiantong"]) {
self
.
loadSuccessCallbackBlock
(
self
.
currentData
,
NO
);
//
self.loadSuccessCallbackBlock(self.currentData, NO);
return
;
//
return;
}
//
}
self
.
rewardVideoAd
=
[[
GDTRewardVideoAd
alloc
]
initWithPlacementId
:
model
.
codeId
];
self
.
rewardVideoAd
=
[[
GDTRewardVideoAd
alloc
]
initWithPlacementId
:
model
.
codeId
];
self
.
rewardVideoAd
.
videoMuted
=
NO
;
self
.
rewardVideoAd
.
videoMuted
=
NO
;
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
/// @param adType 广告类型
/// @param adType 广告类型
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
WEAKSELF
WEAKSELF
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
0
.
5
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
0
.
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
}
else
if
(
adType
==
ADType_Video
){
//视频
}
else
if
(
adType
==
ADType_Video
){
//视频
...
...
GYDemo/GYDemo/SCAds/platform/AddRuiShiADManager.m
View file @
bfb48028
...
@@ -34,11 +34,11 @@
...
@@ -34,11 +34,11 @@
}
else
if
(
AdType
==
ADType_Video
){
//视频
}
else
if
(
AdType
==
ADType_Video
){
//视频
GYAdsTrackModel
*
oldData
=
[
IOSADManager
shareADManager
].
cachevideo
.
firstObject
;
//
GYAdsTrackModel * oldData = [IOSADManager shareADManager].cachevideo.firstObject;
if
([
oldData
.
adPlatform
isEqualToString
:
@"ruishi"
])
{
//
if ([oldData.adPlatform isEqualToString: @"ruishi"]) {
self
.
loadSuccessCallbackBlock
(
self
.
currentData
,
NO
);
//
self.loadSuccessCallbackBlock(self.currentData, NO);
return
;
//
return;
}
//
}
NSString
*
ADID
=
model
.
codeId
;
NSString
*
ADID
=
model
.
codeId
;
...
...
GYDemo/GYDemo/SCAds/platform/AddSigmobADManager.m
View file @
bfb48028
...
@@ -34,11 +34,11 @@
...
@@ -34,11 +34,11 @@
}
else
if
(
AdType
==
ADType_Video
){
//视频
}
else
if
(
AdType
==
ADType_Video
){
//视频
GYAdsTrackModel
*
oldData
=
[
IOSADManager
shareADManager
].
cachevideo
.
firstObject
;
//
GYAdsTrackModel * oldData = [IOSADManager shareADManager].cachevideo.firstObject;
if
([
oldData
.
adPlatform
isEqualToString
:
@"sigmob"
])
{
//
if ([oldData.adPlatform isEqualToString: @"sigmob"]) {
weakSelf
.
loadSuccessCallbackBlock
(
weakSelf
.
currentData
,
NO
);
//
weakSelf.loadSuccessCallbackBlock(weakSelf.currentData, NO);
return
;
//
return;
}
//
}
NSString
*
ADID
=
model
.
codeId
;
NSString
*
ADID
=
model
.
codeId
;
...
@@ -67,7 +67,6 @@
...
@@ -67,7 +67,6 @@
WEAKSELF
WEAKSELF
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
0
.
25
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
0
.
25
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
NSString
*
ADID
=
showData
.
codeId
;
NSString
*
ADID
=
showData
.
codeId
;
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
...
@@ -94,7 +93,7 @@
...
@@ -94,7 +93,7 @@
}
else
if
(
adType
==
ADType_BigImage
){
//大图
}
else
if
(
adType
==
ADType_BigImage
){
//大图
}
}
});
});
});
...
...
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