From 72e96330456a574c7b6408aea0094d014c675e0a Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 30 Aug 2023 13:21:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=8B=E7=82=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/views/FunGamesViewHolder.java | 4 +-- .../yunbao/live/adapter/LiveChatAdapter.java | 2 +- .../live/dialog/LiveGameDialogFragment.java | 5 +++ .../live/views/LiveAudienceViewHolder.java | 2 +- .../yunbao/live/views/LiveRoomViewHolder.java | 19 ++++++++--- .../live/views/PortraitLiveManager.java | 1 + .../yunbao/main/activity/MainActivity.java | 33 ++++++++++--------- .../yunbao/main/views/MainMeViewHolder.java | 5 +++ 8 files changed, 45 insertions(+), 26 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/views/FunGamesViewHolder.java b/common/src/main/java/com/yunbao/common/views/FunGamesViewHolder.java index 8c07a5a8d..1266df02a 100644 --- a/common/src/main/java/com/yunbao/common/views/FunGamesViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/FunGamesViewHolder.java @@ -79,9 +79,7 @@ public class FunGamesViewHolder extends RecyclerView.ViewHolder { .append("&token=") .append(userInfo.getToken()); } - Map map_ekv = new HashMap(); - map_ekv.put("link", htmlUrl.toString()); - MobclickAgent.onEvent(itemView.getContext(), "live_room_slide", map_ekv); + Bus.get().post(new CustomDrawerPopupEvent() .setDisMiss(true) .setHtmlUrl(htmlUrl.toString()) diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java index 87ff13b0d..17eecd2cf 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -159,7 +159,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter { Log.i(TAG, "onScrolled: " + dy); mRecyclerViewScrolledDy = dy; isBottom = false; - MobclickAgent.onEvent(mContext, "live_room_chat_list", "滑动直播间聊天列表"); + } @Override diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java index 4aa7606a8..1b3c78293 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java @@ -50,7 +50,9 @@ import com.yunbao.live.activity.LiveRyAnchorActivity; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * 趣味游戏对话框 @@ -253,6 +255,9 @@ public class LiveGameDialogFragment extends AbsDialogFragment { if (tab != null) { tab.select(); ActiveModel model = (ActiveModel) tab.getTag(); + Map map_ekv = new HashMap(); + map_ekv.put("link", model.getActiveSrc()); + MobclickAgent.onEvent(mContext, "live_room_slide", map_ekv); switch (model.getActiveName()) { case "闖關熱戀": MobclickAgent.onEvent(mContext, "through_index", "进入闯关页面"); diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index 53ada05c8..94273cd3b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -183,7 +183,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_cheat), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - MobclickAgent.onEvent(mContext, "live_room_h5_game", "直播间任意点用户头像"); + MobclickAgent.onEvent(mContext, "live_room_h5_game", "直播间下面鼓掌按钮"); Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.WE_CHEAT)); diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index d104e8de4..1e56d38a0 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1799,9 +1799,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append(System.currentTimeMillis()) .append("&isZh=") .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); - Map map_ekv = new HashMap(); - map_ekv.put("link", htmlUrl.toString()); - MobclickAgent.onEvent(mContext, "live_room_star", map_ekv); } else { type = bean.getShow_type(); htmlUrl.append(bean.getLink()) @@ -1816,6 +1813,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append("&isZh=") .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } + if (htmlUrl.toString().contains("StarChallenge")){ + Map map_ekv = new HashMap(); + map_ekv.put("link", htmlUrl.toString()); + MobclickAgent.onEvent(mContext, "live_room_star", map_ekv); + } if (TextUtils.equals(type, "1")) { ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 1); } else { @@ -1865,6 +1867,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append(System.currentTimeMillis()) .append("&isZh=") .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + } else { type = bean.getShow_type(); htmlUrl.append(bean.getLink()) @@ -1882,6 +1885,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .append("&isZh=") .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); } + if (htmlUrl.toString().contains("StarChallenge")){ + Map map_ekv = new HashMap(); + map_ekv.put("link", htmlUrl.toString()); + MobclickAgent.onEvent(mContext, "live_room_star", map_ekv); + } if (TextUtils.equals(type, "1")) { ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 1); } else { @@ -2284,8 +2292,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis initPkRankView(bean); if (!StringUtil.isEmpty(bean.getClickUrl())) { - MobclickAgent.onEvent(mContext, "live_room_sky", "天梯赛按钮"); + pkRankVf.setOnClickListener(v -> { + MobclickAgent.onEvent(mContext, "live_room_sky", "天梯赛按钮"); Bundle bundle = new Bundle(); String path = bean.getClickUrl(); if (!path.startsWith("/") && !path.startsWith("http")) { @@ -4129,7 +4138,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis @Override public void onBannerClick(List datas, int p) { - if (TextUtils.equals("特惠首充", mBannerList4.get(p).getName())){ + if (TextUtils.equals("特惠首冲", mBannerList4.get(p).getName())){ Map map_ekv = new HashMap(); map_ekv.put("link", mBannerList4.get(p).getLink()); diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index fd7ce6297..4170e2ddf 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -276,6 +276,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe @Override public synchronized void onAdd(LiveBean data, int liveType, int liveTypeVal, int liveSdk) { isEnterRoom = false; + MobclickAgent.onEvent(mContext, "live_room_chat_list", "滑动直播间聊天列表"); openParametersModel = new OpenParametersModel(); if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.UpPkTwo(); diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 0d9e0025f..a88fdfdac 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -334,7 +334,21 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public void onPageSelected(int position) { - + switch (position) { + case 0: + //点击埋点 + MobclickAgent.onEvent(mContext, "home_page", "首页"); + break; + case 1: + MobclickAgent.onEvent(mContext, "community", "社区"); + break; + case 2: + MobclickAgent.onEvent(mContext, "information", "消息"); + break; + case 3: + MobclickAgent.onEvent(mContext, "my", "我的"); + break; + } if (mTabButtonGroup.getCurPosition() != position) { System.err.println("重连IM:" + IMLoginManager.isLogin(mContext)); if (!IMLoginManager.isLogin(mContext)) { @@ -715,6 +729,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene int i = v.getId(); if (i == R.id.btn_start) { showStartDialog(); + MobclickAgent.onEvent(mContext, "broadcast", "开播按钮"); } else if (i == R.id.btn_search) { SearchActivity.forward(mContext); @@ -1082,21 +1097,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene ToastUtil.showDebug("Holders为空"); return; } - switch (position) { - case 0: - //点击埋点 - MobclickAgent.onEvent(mContext, "home_page", "首页"); - break; - case 1: - MobclickAgent.onEvent(mContext, "community", "社区"); - break; - case 2: - MobclickAgent.onEvent(mContext, "information", "消息"); - break; - case 3: - MobclickAgent.onEvent(mContext, "my", "我的"); - break; - } + AbsMainViewHolder vh = mViewHolders[position]; if (vh == null) { if (mViewList != null && position < mViewList.size()) { diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index b7fa56b82..95e2a3d50 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -141,6 +141,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi ViewClicksAntiShake.clicksAntiShake(gift_svga, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { + MobclickAgent.onEvent(mContext, "my_avatar", "个人头像按钮"); RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 2); } }); @@ -465,6 +466,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi //跳转网页版粉丝徽章 WebViewActivityMedal.forward(mContext, url); } else if (bean.getId() == 5) { + MobclickAgent.onEvent(mContext, "my_decorate", "个人中心点装扮"); Constants.isTitle = true; ZhuangBanActivity.forward(mContext, CommonAppConfig.HOST + "/h5/Personality.html"); } else if (bean.getId() == 23) { //獎勵中心 @@ -486,6 +488,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi } if (bean.getId() == 25){ MobclickAgent.onEvent(mContext, "my_friend_invitation", "个人中心点好友邀请"); + } + if (bean.getId() == 24){ + MobclickAgent.onEvent(mContext, "my_pack", "个人中心点包裹"); } WebViewActivity.forward(mContext, url, false); }