Commit 787978cf authored by jyx's avatar jyx

代码优化

parent 6828cd00
......@@ -203,10 +203,10 @@ class TaskCpdFragment : BaseFragment(), TaskView,
taskPresenter.getCpdDetail(outNetIp)
}
private fun loadCPDDataList() {
// 圣于地CPD广告拉取
taskPresenter.getCpdListDetail(outNetIp, cpdMax)
}
// private fun loadCPDDataList() {
// // 圣于地CPD广告拉取
// taskPresenter.getCpdListDetail(outNetIp, cpdMax)
// }
override fun getCpdModelSuc(dataBean: CpdModelBean.DataBean) {
......@@ -404,7 +404,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
for (tzTaskBean in mFakeTaskList) {
if (!tzTaskBean.isShCpd) {
val trackerBean = tzTaskBean.trackerListBean
val trackerBean = tzTaskBean.trackerBean
// val trackerBean = tzTaskBean.trackerBean
if (trackerBean != null) {
LogUtil.d("CPD -> show")
......@@ -431,10 +431,10 @@ class TaskCpdFragment : BaseFragment(), TaskView,
LogUtil.d(TAG, "shanhu onLoadSuccess")
if (cpdMax == 0 || cpdLoadCountTime >= cpdMax) {
notifyDataAndShowAd()
getCpdRepeatPkg()
} else {
// 珊瑚拉取完成后 调用圣于地广告
loadCPDDataList()
loadCPDDataCycle()
}
}
......@@ -445,14 +445,14 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 次数刷新完 且未拿到数据 提示
if (shLoadCountTime++ >= shMax - 1) {
if (cpdMax == 0) {
notifyDataAndShowAd()
getCpdRepeatPkg()
return
}
// for (i in 0 until cpdMax) {
// loadCPDData()
// }
loadCPDDataList()
loadCPDDataCycle()
}
}
......@@ -566,7 +566,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
} else {
taskCpdDialog = TaskCpdDialog(requireActivity(), object : DialogListener() {
override fun onClick(v: View?) {
val trackerBean = mFakeTaskList[position].trackerListBean
val trackerBean = mFakeTaskList[position].trackerBean
if (trackerBean != null) {
LogUtil.d("CPD -> clikc")
......@@ -617,7 +617,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 上报珊瑚安装完成
mDownloadProcess?.reportInstallSuccess(false)
} else {
val trackerBean = mFakeTaskList[position].trackerListBean
val trackerBean = mFakeTaskList[position].trackerBean
if (trackerBean != null) {
// 上报CPD开始安装
LogUtil.d("CPD -> install_start")
......@@ -662,7 +662,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 上报珊瑚激活完成
mDownloadProcess?.reportAppActivated()
} else {
val trackerBean = mFakeTaskList[position].trackerListBean
val trackerBean = mFakeTaskList[position].trackerBean
if (trackerBean != null) {
// 上报CPD激活完成
......@@ -683,7 +683,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 上报珊瑚激活完成
mDownloadProcess?.reportAppActivated()
} else {
val trackerBean = mFakeTaskList[position].trackerListBean
val trackerBean = mFakeTaskList[position].trackerBean
if (trackerBean != null) {
// 上报CPD激活完成
LogUtil.d("CPD -> activation")
......@@ -734,7 +734,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
} else {
LogUtil.d("CPD -> onDownloadStart")
val trackerBean = mFakeTaskList[position].trackerListBean
val trackerBean = mFakeTaskList[position].trackerBean
if (trackerBean != null) {
// 上报CPD下载开始
taskPresenter.cmtImp(trackerBean.download_start[0])
......@@ -755,7 +755,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
} else {
LogUtil.d("CPD -> onDownloadSuccess")
val trackerBean = mFakeTaskList[position].trackerListBean
val trackerBean = mFakeTaskList[position].trackerBean
if (trackerBean != null) {
// 上报CPD下载成功
taskPresenter.cmtImp(trackerBean.download_finish[0])
......
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