Commit 52415afc authored by jyx's avatar jyx

友盟埋点集成

parent 6f164e9f
package com.mints.goodmoney.ui.activitys package com.mints.goodmoney.ui.activitys
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils
import android.view.KeyEvent import android.view.KeyEvent
import android.view.View import android.view.View
import com.mints.goodmoney.R import com.mints.goodmoney.R
...@@ -68,6 +69,14 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener { ...@@ -68,6 +69,14 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 开启3秒倒计时 // 开启3秒倒计时
startTime() startTime()
if (!TextUtils.isEmpty(carrierType) && curCoin > 0) {
// 埋点上送事件
val map = mutableMapOf<String, String>()
map["userId"] = UserManager.getInstance().userID
map["coin"] = "" + curCoin
MobclickAgent.onEvent(this, carrierType, map)
}
when (carrierType) { when (carrierType) {
Constant.CARRIER_GAME_ONLINE, Constant.CARRIER_EATMEAL -> { Constant.CARRIER_GAME_ONLINE, Constant.CARRIER_EATMEAL -> {
val vo = HashMap<String, Any>() val vo = HashMap<String, Any>()
...@@ -102,12 +111,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener { ...@@ -102,12 +111,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
vo["carrierType"] = carrierType vo["carrierType"] = carrierType
awardPresenter.reportAddCoinMsg(vo) awardPresenter.reportAddCoinMsg(vo)
val map = mutableMapOf<String, String>()
map["userId"] = UserManager.getInstance().userID
map["carrierType"] = carrierType
map["coin"] = "" + curCoin
MobclickAgent.onEvent(this, "award_share_friend", map)
tvAwardContent.setText(curCoin.toString() + "金币已到账") tvAwardContent.setText(curCoin.toString() + "金币已到账")
tvAwardNext.setText("看视频再领${extraId}金币") tvAwardNext.setText("看视频再领${extraId}金币")
...@@ -164,9 +167,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener { ...@@ -164,9 +167,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardContent.setText("+" + curCoin + "金币") tvAwardContent.setText("+" + curCoin + "金币")
tvAwardNext.setText("看视频领取") tvAwardNext.setText("看视频领取")
} }
Constant.CARRIER_VERSUS_VIDEO ->{
tvAwardContent.setText(curCoin.toString() + "金币已到账")
}
else -> { else -> {
tvAwardContent.setText(curCoin.toString() + "金币已到账") tvAwardContent.setText(curCoin.toString() + "金币已到账")
} }
......
...@@ -120,21 +120,17 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC ...@@ -120,21 +120,17 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
} }
override fun onPageSelected(position: Int) { override fun onPageSelected(position: Int) {
when (position) { when (view_pager_friends.currentItem) {
0 -> { 0 -> {
if (allData.size <= 0) {
friendsPresenter.getContributionBigLeaders() friendsPresenter.getContributionBigLeaders()
} }
}
1 -> { 1 -> {
if (todayData.size <= 0) {
friendsPresenter.getFriendsGiveTodayList() friendsPresenter.getFriendsGiveTodayList()
} }
}
2 -> { 2 -> {
if (yesterdayData.size <= 0) {
friendsPresenter.getContributionLeaders() friendsPresenter.getContributionLeaders()
} }
else -> {
} }
} }
} }
...@@ -236,7 +232,11 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC ...@@ -236,7 +232,11 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
btn_get_bonus.text = data.button btn_get_bonus.text = data.button
btn_get_bonus.isEnabled = data.status == 0 && data.cash > 0 btn_get_bonus.isEnabled = data.status == 0 && data.cash > 0
if (btn_get_bonus.isEnabled) {
if (data.button == "戳我分红") {
btn_get_bonus.isEnabled = true
btn_get_bonus.setTextColor(resources.getColor(R.color.white))
btn_get_bonus.setBackgroundResource(R.drawable.shape_btn_friends_unenabled)
showRedbox(btn_get_bonus) showRedbox(btn_get_bonus)
} else { } else {
stopRedbox() stopRedbox()
...@@ -363,10 +363,15 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC ...@@ -363,10 +363,15 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
if (it.cash.toInt() > 0 && it.status == 0) { if (it.cash.toInt() > 0 && it.status == 0) {
// 去提现 // 去提现
friendsPresenter.getContributionOutToCash() friendsPresenter.getContributionOutToCash()
} else {
if (it.button == "戳我分红") {
// 玩法规则
ruleDialog()
} else { } else {
showToast("您的贡献值未达到提现要求") showToast("您的贡献值未达到提现要求")
} }
} }
}
} }
} }
......
...@@ -233,7 +233,6 @@ ...@@ -233,7 +233,6 @@
android:layout_height="26dp" android:layout_height="26dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginStart="20dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:background="@drawable/btn_friends_selectored" android:background="@drawable/btn_friends_selectored"
android:text="结算中" android:text="结算中"
......
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