Commit fd015458 authored by jyx's avatar jyx

CPD取值错误代码修复

parent 4d71e0ed
...@@ -70,6 +70,8 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -70,6 +70,8 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 圣于地第二次拉取重复不拉取 // 圣于地第二次拉取重复不拉取
// private var isTwiceGetCpd = false // private var isTwiceGetCpd = false
// 圣于地是否是List请求 TODO
private val outNetIp by lazy { SPUtil.getInstance().getString(Constant.OUT_NET_IP) } private val outNetIp by lazy { SPUtil.getInstance().getString(Constant.OUT_NET_IP) }
private var mCoin = 0 private var mCoin = 0
...@@ -146,8 +148,9 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -146,8 +148,9 @@ class TaskCpdFragment : BaseFragment(), TaskView,
hideLoading() hideLoading()
// showToast("今日任务已完成,请明日再试") // showToast("今日任务已完成,请明日再试")
// 跳转试玩任务
notifyDataAndShowAd() notifyDataAndShowAd()
// 跳转试玩任务
if (AppConfig.useAppCpdModelShow) { if (AppConfig.useAppCpdModelShow) {
(activity as TaskCpdActivity).selectTwoFragment() (activity as TaskCpdActivity).selectTwoFragment()
} }
...@@ -225,7 +228,12 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -225,7 +228,12 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 圣于地广告 循环完成后去重 // 圣于地广告 循环完成后去重
if (cpdLoadCountTime++ >= cpdMax - 1) { if (cpdLoadCountTime++ >= cpdMax - 1) {
if (shMax == 0 || shLoadCountTime >= shMax) {
getCpdRepeatPkg() getCpdRepeatPkg()
} else {
// 圣于地拉取完成后 调用珊瑚广告
loadShDataList()
}
} }
LogUtil.d(TAG, "syd getCpdModelSuc $cpdLoadCountTime") LogUtil.d(TAG, "syd getCpdModelSuc $cpdLoadCountTime")
...@@ -236,10 +244,9 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -236,10 +244,9 @@ class TaskCpdFragment : BaseFragment(), TaskView,
LogUtil.d(TAG, "syd getCpdModelFail") LogUtil.d(TAG, "syd getCpdModelFail")
if (cpdLoadCountTime++ >= cpdMax - 1) { if (cpdLoadCountTime++ >= cpdMax - 1) {
getCpdRepeatPkg()
if (shMax == 0 || shLoadCountTime >= shMax) { if (shMax == 0 || shLoadCountTime >= shMax) {
notifyDataAndShowAd() getCpdRepeatPkg()
} else { } else {
// 圣于地拉取完成后 调用珊瑚广告 // 圣于地拉取完成后 调用珊瑚广告
loadShDataList() loadShDataList()
...@@ -267,11 +274,9 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -267,11 +274,9 @@ class TaskCpdFragment : BaseFragment(), TaskView,
mFakeTaskList.add(tzTaskBean) mFakeTaskList.add(tzTaskBean)
} }
if (shMax == 0 || shLoadCountTime >= shMax) {
// 圣于地广告 循环完成后去重 // 圣于地广告 循环完成后去重
getCpdRepeatPkg() getCpdRepeatPkg()
if (shMax == 0 || shLoadCountTime >= shMax) {
notifyDataAndShowAd()
} else { } else {
cpdLoadCountTime = cpdMax cpdLoadCountTime = cpdMax
...@@ -310,6 +315,7 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -310,6 +315,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
newPkgData.add(oldTaskBean) newPkgData.add(oldTaskBean)
} else { } else {
for (newTaskBean in newPkgData) { for (newTaskBean in newPkgData) {
LogUtil.d(newTaskBean.title)
if (!newTaskBean.isShCpd && !oldTaskBean.isShCpd) { if (!newTaskBean.isShCpd && !oldTaskBean.isShCpd) {
flag = newTaskBean.downLoadPkgName == oldTaskBean.downLoadPkgName flag = newTaskBean.downLoadPkgName == oldTaskBean.downLoadPkgName
} }
...@@ -358,14 +364,7 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -358,14 +364,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
mFakeTaskList.clear() mFakeTaskList.clear()
mFakeTaskList.addAll(t) mFakeTaskList.addAll(t)
if (shMax == 0 || shLoadCountTime >= shMax) {
notifyDataAndShowAd() notifyDataAndShowAd()
} else {
// 圣于地拉取完成后 调用珊瑚广告
loadShDataList()
}
// notifyDataAndShowAd()
// 重新获取数据 // 重新获取数据
// if (cpdLoadCountTime in 1..cpdMax) { // if (cpdLoadCountTime in 1..cpdMax) {
...@@ -378,7 +377,6 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -378,7 +377,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// } else { // } else {
// notifyDataAndShowAd() // notifyDataAndShowAd()
// } // }
} }
}) })
} }
...@@ -402,10 +400,12 @@ class TaskCpdFragment : BaseFragment(), TaskView, ...@@ -402,10 +400,12 @@ class TaskCpdFragment : BaseFragment(), TaskView,
* 上报圣于地展示 * 上报圣于地展示
*/ */
private fun uploadSydImp() { private fun uploadSydImp() {
for (tzTaskBean in mFakeTaskList) { for (tzTaskBean in mFakeTaskList) {
if (!tzTaskBean.isShCpd) { if (!tzTaskBean.isShCpd) {
val trackerBean = tzTaskBean.trackerBean val trackerBean = tzTaskBean.trackerListBean
// val trackerBean = tzTaskBean.trackerBean
if (trackerBean != null) { if (trackerBean != null) {
LogUtil.d("CPD -> show") LogUtil.d("CPD -> show")
......
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