H5跳转充值页返回后刷新,萌新埋点

This commit is contained in:
oujunhui
2020-09-11 18:57:56 +08:00
parent 328b42f3cc
commit 74302960ec
6 changed files with 33 additions and 6 deletions

View File

@@ -256,6 +256,7 @@ public class RecentListFragment extends BaseFragment {
SharedPreferenceUtils.put(share_pref_is_newbie_clicked, true);// 是否第一次点击发现萌新
ivRedPoint.setVisibility(View.GONE);
RoomNewbieActivity.start(getActivity(),false);
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_MESSAGE_FINDNEW_CLICK, "消息页_发现萌新");
});
}

View File

@@ -39,6 +39,7 @@ import com.yizhuan.xchat_android_core.pay.model.unionpay.UnionPayModel;
import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
import com.yizhuan.xchat_android_core.web.event.WebViewRefreshEvent;
import com.yizhuan.xchat_android_library.utils.JavaUtil;
import com.yizhuan.xchat_android_library.utils.ListUtils;
@@ -90,6 +91,7 @@ public class ChargeActivity extends BaseActivity {
private static final int ALI_PAY_OPEN = 3;
private static final int WX_PAY_OPEN = 4;
private boolean mIsFromH5;
private final int BINDCODE_GOLD = 200;
private CompositeDisposable compositeDisposable = new CompositeDisposable();
@@ -101,6 +103,14 @@ public class ChargeActivity extends BaseActivity {
context.startActivity(intent);
}
public static void start(Context context,boolean isFromH5) {
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
if (context == null || userInfo == null) return;
Intent intent = new Intent(context, ChargeActivity.class);
intent.putExtra("isFromH5",isFromH5);
context.startActivity(intent);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -198,7 +208,7 @@ public class ChargeActivity extends BaseActivity {
titleBar.setTitleColor(getResources().getColor(R.color.white));
titleBar.setLeftImageResource(R.drawable.arrow_left_white);
titleBar.setCommonBackgroundColor(getResources().getColor(R.color.transparent));
titleBar.setLeftClickListener(v -> finish());
titleBar.setLeftClickListener(v -> finishPage());
titleBar.addAction(new TitleBar.TextAction("我的收益",getResources().getColor(R.color.white)) {
@Override
public void performAction(View view) {
@@ -210,6 +220,7 @@ public class ChargeActivity extends BaseActivity {
}
private void initiate() {
mIsFromH5 = getIntent().getBooleanExtra("isFromH5",false);
mRecyclerView = findViewById(R.id.recyclerView);
mRecyclerView.setNestedScrollingEnabled(false);
mRecyclerView.setLayoutManager(new GridLayoutManager(this,3));
@@ -567,4 +578,16 @@ public class ChargeActivity extends BaseActivity {
StatusBarUtil.transparencyBar(this);
StatusBarUtil.StatusBarLightMode(this);
}
@Override
public void onBackPressed() {
super.onBackPressed();
finishPage();
}
private void finishPage(){
finish();
if (!mIsFromH5)return;
EventBus.getDefault().post(new WebViewRefreshEvent());
}
}

View File

@@ -113,7 +113,7 @@ public class JSInterface {
@JavascriptInterface
public void openChargePage() {
if (context != null) {
ChargeActivity.start(context);
ChargeActivity.start(context,true);
}
}

View File

@@ -36,6 +36,8 @@ import com.yizhuan.xchat_android_core.im.custom.bean.SysMsgVoiceAttachment;
import com.yizhuan.xchat_android_core.luckymoney.LuckyMoneyInfo;
import com.yizhuan.xchat_android_core.public_chat_hall.attachment.AitMeAttachment;
import com.yizhuan.xchat_android_core.public_chat_hall.bean.AitMeInfo;
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
import com.yizhuan.xchat_android_core.user.event.LoadLoginUserInfoEvent;
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
@@ -109,6 +111,7 @@ public class RoomMsgRecentListFragment extends BaseFragment {
SharedPreferenceUtils.put(share_pref_is_newbie_clicked, true);// 是否第一次点击发现萌新
ivRedPoint.setVisibility(View.GONE);
RoomNewbieActivity.start(getActivity(),false);
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_MESSAGE_FINDNEW_CLICK, "语音房_消息_发现萌新");
});
}

View File

@@ -547,13 +547,13 @@ public class StatisticsProtocol {
EVENT_ROOM_FOLLOW_CHAT_CLICK("room_follow_chat"),//语音房_收藏公屏提示
EVENT_ROOM_SHARE_CLICK("room_share"),//语音房_分享
EVENT_ROOM_MESSAGE_CLICK("room_message"),//语音房_消息
EVENT_ROOM_MESSAGE_FINDNEW_CLICK("room_message_findnew"),//语音房_消息_发现萌新 未添加
EVENT_ROOM_MESSAGE_FINDNEW_CLICK("room_message_findnew"),//语音房_消息_发现萌新
EVENT_ROOM_SENDHONGBAO_CLICK("room_sendhongbao"),//进入发红包页面
EVENT_ROOM_SENDHONGBAO_SUCCESS("room_sendhongbao_success"),//发红包成功
EVENT_MESSAGE("message"),//消息页
EVENT_MESSAGE_FINDNEW("message_findnew "),//消息页_发现萌新 未添加
EVENT_MESSAGE_FINDNEW("message_findnew"),//消息页_发现萌新
EVENT_PRIVATECHAT_CAHT("privatechat_chat"),//私聊_聊文字或图片
EVENT_PRIVATECHAT_SENDGIFT("privatechat_sendgift"),//私聊_送礼物

View File

@@ -21,5 +21,5 @@ with_jenkins=false
#\u6253\u652F\u6301x86\u7684\u6A21\u62DF\u5668\u5305\u4F7F\u7528
ndk_abi_filters=arm
version_name=1.3.7
version_code=137
version_name=1.4.0
version_code=140