Commit a1539bb7 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent fc4bd616
......@@ -18,7 +18,14 @@ object UserWeight {
private val videoAdingManager by lazy { VideoAdingManager.getInstance(ForegroundOrBackground.getApp_activity()) }
fun initAdWeight(data: UserTaskMsgBean) {
AppConfig.isVideoSleep=data.vedioRules.isVedioSleep
AppConfig.isVideoSleep = data.vedioRules.isVedioSleep
var groMoreRate = 0
var groMoreCount = 0
if (data.vedioRules.gromorE_VEDIO != null) {
groMoreRate = data.vedioRules.gromorE_VEDIO.rate
groMoreCount = data.vedioRules.gromorE_VEDIO.surplus
}
videoAdingManager.initAdWeight(data.vedioRules.csJ_VEDIO.rate,
data.vedioRules.ylH_VEDIO.rate,
......@@ -27,7 +34,7 @@ object UserWeight {
data.vedioRules.corAl_VIDEO.rate,
data.vedioRules.csjfulL_VEDIO.rate,
data.vedioRules.kS_VEDIO.rate,
data.vedioRules.gromorE_VEDIO.rate,
groMoreRate,
data.vedioRules.oW_VEDIO.rate
)
LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} " +
......@@ -36,7 +43,7 @@ object UserWeight {
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} " +
"shWeight:${data.vedioRules.corAl_VIDEO.rate} " +
"flWeight:${data.vedioRules.fL_VEDIO.rate} " +
"groMoreWeight:${data.vedioRules.gromorE_VEDIO.rate} "+
"groMoreWeight:${groMoreRate} " +
"owWeight:${data.vedioRules.oW_VEDIO.rate} " +
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
......@@ -49,7 +56,7 @@ object UserWeight {
AppConfig.ksVideoAdCount = data.vedioRules.kS_VEDIO.surplus
AppConfig.owVideoAdCount = data.vedioRules.oW_VEDIO.surplus
AppConfig.csjFullVideoAdCount = data.vedioRules.csjfulL_VEDIO.surplus
AppConfig.groMoreVideoAdCount = data.vedioRules.gromorE_VEDIO.surplus
AppConfig.groMoreVideoAdCount = groMoreCount
LogUtil.d(TAG, "首页视频数:csjCount:${AppConfig.csjVideoAdCount} " +
"ylhCount:${AppConfig.ylhAdCount} " +
"sdhzCount:${AppConfig.wnVideoAdCount} " +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment