Commit eb7e8f16 authored by jyx's avatar jyx

CPD模块逻辑优化

parent 5e1e1257
...@@ -168,21 +168,41 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -168,21 +168,41 @@ class TaskCpdFragment : BaseFragment(), TaskView,
} }
// 珊瑚和CPD展示顺序 // 珊瑚和CPD展示顺序
if (CPD_ORDER == "CPD_SYD") { when (CPD_ORDER) {
if (cpdMax > 0) { "CPD_SYD" -> {
when {
cpdMax > 0 -> {
// 拉取数组数据 // 拉取数组数据
// loadCPDDataList() // loadCPDDataList()
// 循环拉取数据 // 循环拉取数据
loadCPDDataCycle() loadCPDDataCycle()
} }
} else if (CPD_ORDER == "CPD_SH") { shMax > 0 -> {
if (shMax > 0) {
loadShDataList() loadShDataList()
} }
} else { else -> {
notifyDataAndShowAd()
}
}
}
"CPD_SH" -> {
when {
shMax > 0 -> {
loadShDataList()
}
cpdMax > 0 -> {
loadCPDDataCycle()
}
else -> {
notifyDataAndShowAd() notifyDataAndShowAd()
} }
} }
}
else -> {
notifyDataAndShowAd()
}
}
}
private fun loadShDataList() { private fun loadShDataList() {
// 珊瑚CPD广告拉取 // 珊瑚CPD广告拉取
......
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