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
93c765ca
Commit
93c765ca
authored
Nov 13, 2020
by
zhangshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 广告bug
parent
f19e326b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
170 additions
and
109 deletions
+170
-109
CGNetworkTools.m
GYDemo/GYDemo/Network/CGNetworkTools.m
+1
-0
IOSADManager.m
GYDemo/GYDemo/SCAds/IOSADManager.m
+114
-66
AddCSJADManager.m
GYDemo/GYDemo/SCAds/platform/AddCSJADManager.m
+14
-10
AddGDTADManager.m
GYDemo/GYDemo/SCAds/platform/AddGDTADManager.m
+13
-11
AddRuiShiADManager.m
GYDemo/GYDemo/SCAds/platform/AddRuiShiADManager.m
+13
-9
AddSigmobADManager.m
GYDemo/GYDemo/SCAds/platform/AddSigmobADManager.m
+15
-13
No files found.
GYDemo/GYDemo/Network/CGNetworkTools.m
View file @
93c765ca
...
@@ -357,6 +357,7 @@ static CGNetworkTools* _tools = nil;
...
@@ -357,6 +357,7 @@ static CGNetworkTools* _tools = nil;
if
([[
data
Read
]
objectForKey
:
@"source"
])
{
if
([[
data
Read
]
objectForKey
:
@"source"
])
{
[
dict
setValue
:
[[
data
Read
]
objectForKey
:
@"source"
]
forKey
:
@"source"
];
[
dict
setValue
:
[[
data
Read
]
objectForKey
:
@"source"
]
forKey
:
@"source"
];
}
}
[
dict
setValue
:
@"toutiao"
forKey
:
@"source"
];
NSString
*
uid
=
[[
data
Read
]
objectForKey
:
@"uid"
];
NSString
*
uid
=
[[
data
Read
]
objectForKey
:
@"uid"
];
if
(
uid
!=
nil
)
{
[
dict
setValue
:
uid
forKey
:
@"uid"
];
}
if
(
uid
!=
nil
)
{
[
dict
setValue
:
uid
forKey
:
@"uid"
];
}
...
...
GYDemo/GYDemo/SCAds/IOSADManager.m
View file @
93c765ca
This diff is collapsed.
Click to expand it.
GYDemo/GYDemo/SCAds/platform/AddCSJADManager.m
View file @
93c765ca
...
@@ -72,17 +72,21 @@
...
@@ -72,17 +72,21 @@
/// @param adType 广告类型
/// @param adType 广告类型
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
}
else
if
(
adType
==
ADType_Video
){
//视频
if
(
self
.
rewardedAd
.
isAdValid
)
{
}
else
if
(
adType
==
ADType_Video
){
//视频
[
self
.
rewardedAd
showAdFromRootViewController
:
self
.
currentVC
];
if
(
self
.
rewardedAd
.
isAdValid
)
{
}
else
{
[
self
.
rewardedAd
showAdFromRootViewController
:
self
.
currentVC
];
self
.
showSuccessCallbackBlock
(
showData
,
NO
);
}
else
{
self
.
showSuccessCallbackBlock
(
showData
,
NO
);
}
}
else
if
(
adType
==
ADType_BigImage
){
//大图
}
}
}
else
if
(
adType
==
ADType_BigImage
){
//大图
}
);
}
}
}
...
...
GYDemo/GYDemo/SCAds/platform/AddGDTADManager.m
View file @
93c765ca
...
@@ -66,18 +66,20 @@
...
@@ -66,18 +66,20 @@
/// @param showData 广告对象
/// @param showData 广告对象
/// @param adType 广告类型
/// @param adType 广告类型
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
}
else
if
(
adType
==
ADType_Video
){
//视频
}
else
if
(
adType
==
ADType_Video
){
//视频
if
(
self
.
rewardVideoAd
.
isAdValid
)
{
if
(
self
.
rewardVideoAd
.
isAdValid
)
{
[
self
.
rewardVideoAd
showAdFromRootViewController
:
self
.
currentVC
];
[
self
.
rewardVideoAd
showAdFromRootViewController
:
self
.
currentVC
];
}
else
{
}
else
{
self
.
showSuccessCallbackBlock
(
showData
,
NO
);
self
.
showSuccessCallbackBlock
(
showData
,
NO
);
}
}
else
if
(
adType
==
ADType_BigImage
){
//大图
}
}
}
else
if
(
adType
==
ADType_BigImage
){
//大图
});
}
}
}
//MARK:开屏
//MARK:开屏
...
...
GYDemo/GYDemo/SCAds/platform/AddRuiShiADManager.m
View file @
93c765ca
...
@@ -62,15 +62,19 @@
...
@@ -62,15 +62,19 @@
/// @param adType 广告类型
/// @param adType 广告类型
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
}
else
if
(
adType
==
ADType_Video
){
//视频
}
else
if
(
adType
==
ADType_Video
){
//视频
[
self
.
vlnVideoAD
showAdFromRootViewController
:
self
.
currentVC
];
[
self
.
vlnVideoAD
showAdFromRootViewController
:
self
.
currentVC
];
}
else
if
(
adType
==
ADType_BigImage
){
//大图
}
else
if
(
adType
==
ADType_BigImage
){
//大图
}
}
});
}
}
...
...
GYDemo/GYDemo/SCAds/platform/AddSigmobADManager.m
View file @
93c765ca
...
@@ -57,20 +57,22 @@
...
@@ -57,20 +57,22 @@
/// @param showData 广告对象
/// @param showData 广告对象
/// @param adType 广告类型
/// @param adType 广告类型
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
-
(
void
)
showAdWithData
:(
GYAdsTrackModel
*
)
showData
withADType
:(
eADType
)
adType
;{
NSString
*
ADID
=
showData
.
codeId
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
NSString
*
ADID
=
showData
.
codeId
;
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
if
(
adType
==
ADType_OpenScreen
)
{
// 开屏
}
else
if
(
adType
==
ADType_Video
){
//视频
}
else
if
(
adType
==
ADType_Video
){
//视频
if
([[
WindRewardedVideoAd
sharedInstance
]
isReady
:
ADID
])
{
if
([[
WindRewardedVideoAd
sharedInstance
]
isReady
:
ADID
])
{
[[
WindRewardedVideoAd
sharedInstance
]
playAd
:
self
.
currentVC
withPlacementId
:
ADID
options
:
@{}
error
:
nil
];
[[
WindRewardedVideoAd
sharedInstance
]
playAd
:
self
.
currentVC
withPlacementId
:
ADID
options
:
@{}
error
:
nil
];
}
else
{
}
else
{
self
.
showSuccessCallbackBlock
(
showData
,
NO
);
self
.
showSuccessCallbackBlock
(
showData
,
NO
);
}
}
else
if
(
adType
==
ADType_BigImage
){
//大图
}
}
}
else
if
(
adType
==
ADType_BigImage
){
//大图
});
}
}
}
//MARK: ---- 开屏 ----
//MARK: ---- 开屏 ----
...
...
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