Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
b9fb057f
Commit
b9fb057f
authored
Dec 10, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频权重优化
parent
13f26067
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
23 deletions
+10
-23
VedioAdingManager.java
.../java/com/mints/goodmoney/ad/video/VedioAdingManager.java
+1
-17
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+6
-4
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+3
-2
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/VedioAdingManager.java
View file @
b9fb057f
...
...
@@ -92,17 +92,6 @@ public class VedioAdingManager {
loadAdVedio
(
getVedioAdType
(),
bean
);
}
/**
* 根据类型加载对应视频(第一次加载)
*
* @param bean
*/
public
void
loadAding
(
Activity
activity
,
VedioAdingBean
bean
,
int
i
)
{
this
.
activity
=
activity
;
isVedioAdDownload
=
false
;
loadAdVedio
(
Constant
.
FL_VEDIO_AD
,
bean
);
}
/**
* 加载失败优先级对应视频
*
...
...
@@ -116,19 +105,15 @@ public class VedioAdingManager {
/**
* 根据广告优先级获取下一个
* <p>
* 穿山甲激励> 优量汇>闪电盒子> 珊瑚>创神>mintegral>全屏>多盟>东方网
*/
private
String
getNextAdType
()
{
String
nextAdType
=
""
;
if
(
AppConfig
.
csjVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_VEDIO_AD
;
}
else
if
(
AppConfig
.
flVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
FL_VEDIO_AD
;
}
else
if
(
AppConfig
.
ylhAdCount
>
0
)
{
nextAdType
=
Constant
.
YLH_VEDIO_AD
;
}
else
{
nextAdType
=
Constant
.
SDHZ
_VEDIO_AD
;
nextAdType
=
Constant
.
FL
_VEDIO_AD
;
}
return
nextAdType
;
}
...
...
@@ -156,7 +141,6 @@ public class VedioAdingManager {
int
weight
=
0
;
// 若没有视频完成数,不加入权重计算范围内
// 穿山甲激励> 优量汇
if
(
AppConfig
.
wnVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
wnWeight
,
Constant
.
SDHZ_VEDIO_AD
));
weight
=
weight
+
wnWeight
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
b9fb057f
...
...
@@ -491,14 +491,16 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
//
vedioAdingManager?.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate, data.vedioRules.fL_VEDIO.rate)
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ
_VEDIO.rate}"
)
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate}"
+
" sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} flWeight:${data.vedioRules.fL
_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVedioAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount}"
)
AppConfig
.
flVedioAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount}"
+
" sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}"
)
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
b9fb057f
...
...
@@ -872,13 +872,14 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
vedioAdingManager
.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
)
//
vedioAdingManager.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate, data.vedioRules.fL_VEDIO.rate)
//
vedioAdingManager.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate, data.vedioRules.sdhZ_VEDIO.rate)
vedioAdingManager
.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} flWeight:${data.vedioRules.fL_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVedioAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVedioAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}"
)
}
}
\ No newline at end of file
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