【埋点】宝箱领取事件中领取总金额和可领取宝箱数属性上报为空
This commit is contained in:
parent
55c79e7d7e
commit
5f7131e00c
|
|
@ -90,7 +90,6 @@ class HomeFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnSwit
|
|||
mutableListOf(
|
||||
PopMenuView.MenuItem(R.mipmap.home_menu_1, 0, 0) {
|
||||
Router.Benefit.startActivity(requireActivity())
|
||||
StatisticUtil.reportEvents(StatisticUtil.KEY_Chest_Claim_Click)
|
||||
},
|
||||
PopMenuView.MenuItem(R.mipmap.home_menu_2,R.mipmap.icon_gold_ss_new, 0) {
|
||||
WatchAdDialog(requireActivity(), VidiConst.WATCH_AD_FOR_DAILY_EARN_GOLD_POPMENU, WatchAdDialog.FROM_HOME_MENU,null).show()
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ class TasksFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnTab
|
|||
|
||||
llTaskBenefit->{
|
||||
Router.Benefit.startActivity(requireActivity())
|
||||
StatisticUtil.reportEvents(StatisticUtil.KEY_Chest_Claim_Click)
|
||||
}
|
||||
|
||||
llTaskWatchAd->{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.ama.core.architecture.util.DateUtil
|
|||
import com.ama.core.architecture.util.ResUtil
|
||||
import com.ama.core.architecture.util.SpUtil
|
||||
import com.ama.core.architecture.util.eventbus.NotifyMan
|
||||
import com.gamedog.statisticreporter.StatisticUtil
|
||||
import com.viddin.videos.free.R
|
||||
import com.gamedog.vididin.VididinEvents
|
||||
import com.gamedog.vididin.beans.RECORD_CASH_PLUS_BOX_TASK
|
||||
|
|
@ -76,7 +77,7 @@ class BoxTaskHelper: BaseTaskHelper<TaskStateBoxRoot, BoxTaskRoot>() {
|
|||
task.reward_type, task.reward_value, task.is_one_time, task.status,
|
||||
boxSubTaskStateList, DateUtil.getCurTimeMs()))
|
||||
}
|
||||
|
||||
sendEnterNewSubBoxEvent(0)
|
||||
return TaskStateBoxRoot(boxStateList)
|
||||
}
|
||||
|
||||
|
|
@ -89,6 +90,9 @@ class BoxTaskHelper: BaseTaskHelper<TaskStateBoxRoot, BoxTaskRoot>() {
|
|||
if (taskType == subTask.task_type
|
||||
&& !isBoxSubTaskFinished(currentBoxIndex, index)) {
|
||||
subTask.finishedNum++
|
||||
if (isBoxTasksFinished(currentBoxIndex)) {
|
||||
sendSubBoxFinishEvent(currentBoxIndex)
|
||||
}
|
||||
saveState2Sp()
|
||||
notifyEvent()
|
||||
}
|
||||
|
|
@ -108,6 +112,8 @@ class BoxTaskHelper: BaseTaskHelper<TaskStateBoxRoot, BoxTaskRoot>() {
|
|||
mStateBean.boxList[index].boxStartMs = DateUtil.getCurTimeMs()
|
||||
saveState2Sp()
|
||||
notifyEvent()
|
||||
|
||||
sendEnterNewSubBoxEvent(index)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -115,6 +121,26 @@ class BoxTaskHelper: BaseTaskHelper<TaskStateBoxRoot, BoxTaskRoot>() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun sendEnterNewSubBoxEvent(index: Int) {
|
||||
val subBox = getBoxState(index)
|
||||
|
||||
subBox?.let {
|
||||
val resetBoxCount = mStateBean.boxList.size - index - 1
|
||||
StatisticUtil.reportEvents(StatisticUtil.KEY_Chest_Claim_Click,
|
||||
mapOf("total_amount" to it.reward_value, "chest_count" to resetBoxCount, "task_type" to "subBox", "task_progress" to "0"))
|
||||
}
|
||||
}
|
||||
|
||||
private fun sendSubBoxFinishEvent(index: Int) {
|
||||
val subBox = getBoxState(index)
|
||||
|
||||
subBox?.let {
|
||||
val resetBoxCount = mStateBean.boxList.size - index - 1
|
||||
StatisticUtil.reportEvents(StatisticUtil.KEY_Welfare_Task_Click,
|
||||
mapOf("total_amount" to it.reward_value, "chest_count" to resetBoxCount, "task_type" to "subBox", "task_progress" to "100"))
|
||||
}
|
||||
}
|
||||
|
||||
private fun notifyEvent() {
|
||||
NotifyMan.instance().sendEvent(VididinEvents.EVENT_BOX_TASK_STATE_CHANGED, null)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue