[Modify]完成1.4.0埋点事件
This commit is contained in:
@@ -5,7 +5,9 @@ package com.yizhuan.erban.application;
|
||||
*/
|
||||
public interface IReportConstants {
|
||||
|
||||
String CHANNEL_NAME = "ChannelName";
|
||||
String CHANNEL = "channel";
|
||||
String UID = "uid";
|
||||
String APPV = "appv";
|
||||
String ADJUST_REGISTER = "yly8k0";
|
||||
|
||||
String MODULE = "module";
|
||||
|
@@ -11,7 +11,9 @@ import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.google.gson.Gson;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_library.utils.AppMetaDataUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -19,11 +21,12 @@ import java.util.Map;
|
||||
* 统一埋点事件
|
||||
* create by lvzebiao @2019/8/14
|
||||
*/
|
||||
public class ReportManager implements IReportService{
|
||||
public class ReportManager implements IReportService {
|
||||
|
||||
private static final String TAG = "ReportManager";
|
||||
|
||||
private ReportManager() {}
|
||||
private ReportManager() {
|
||||
}
|
||||
|
||||
private static final class Helper {
|
||||
private static final ReportManager INSTANCE = new ReportManager();
|
||||
@@ -41,7 +44,11 @@ public class ReportManager implements IReportService{
|
||||
// FirebaseAnalytics注册公共属性
|
||||
private void initFirebase() {
|
||||
Bundle params = new Bundle();
|
||||
params.putString(IReportConstants.CHANNEL_NAME, AppMetaDataUtil.getChannelID());
|
||||
if (AuthModel.get().getCurrentUid() != 0) {
|
||||
params.putLong(IReportConstants.UID, AuthModel.get().getCurrentUid());
|
||||
}
|
||||
params.putString(IReportConstants.APPV, BasicConfig.getLocalVersionName(XChatApplication.getApplication()));
|
||||
params.putString(IReportConstants.CHANNEL, AppMetaDataUtil.getChannelID());
|
||||
setFirebaseAnalyticsDefaultEventParameters(params);
|
||||
}
|
||||
|
||||
|
@@ -1137,7 +1137,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
|
||||
private fun onSendGiftBtnClick(giftId: Int = 0) {
|
||||
if (giftDialog == null) {
|
||||
GiftDialog.GIFT_DIALOG_FROM = "房間"
|
||||
GiftDialog.GIFT_DIALOG_FROM = getString(R.string.room)
|
||||
giftDialog = GiftDialog(context, giftId)
|
||||
giftDialog?.setGiftDialogBtnClickListener(this@BaseRoomFragment)
|
||||
giftDialog?.setOnDismissListener { giftDialog = null }
|
||||
|
@@ -41,6 +41,8 @@ import com.trello.rxlifecycle3.components.support.RxAppCompatActivity;
|
||||
import com.umeng.commonsdk.statistics.common.DeviceConfig;
|
||||
import com.yizhuan.erban.NimMiddleActivity;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.application.IReportConstants;
|
||||
import com.yizhuan.erban.application.ReportManager;
|
||||
import com.yizhuan.erban.application.XChatApplication;
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
import com.yizhuan.erban.avroom.firstcharge.FirstChargeDialog;
|
||||
@@ -78,6 +80,8 @@ import com.yizhuan.xchat_android_core.newbie.NewbieHelloInfo;
|
||||
import com.yizhuan.xchat_android_core.newbie.event.NewbieHelloDialogEvent;
|
||||
import com.yizhuan.xchat_android_core.noble.NobleInfo;
|
||||
import com.yizhuan.xchat_android_core.noble.NobleProtocol;
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel;
|
||||
import com.yizhuan.xchat_android_core.pay.bean.WalletInfo;
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedPackageNotifyInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.model.AvRoomModel;
|
||||
@@ -103,6 +107,7 @@ import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
@@ -1007,8 +1012,15 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
@Override
|
||||
public void onOk() {
|
||||
isShowingChargeDialog = false;
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_NOT_ENOUGH_TO_RECHARGE,
|
||||
ResUtil.getString(R.string.erban_base_baseactivity_02));
|
||||
//充值
|
||||
WalletInfo goldWalletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
HashMap<String, Object> map = new HashMap<>(5);
|
||||
map.put(IReportConstants.PAYPAGE_TYPE, IReportConstants.TWO);
|
||||
if (goldWalletInfo != null) {
|
||||
map.put(IReportConstants.ACCOUNT_BALANCE, goldWalletInfo.getDiamondNum());
|
||||
}
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_PAY);
|
||||
ReportManager.get().reportEvent(IReportConstants.PAYPAGE_SHOW, map);
|
||||
if(AppMetaDataUtil.getChannelID().equals(Constants.GOOGLE)) {
|
||||
ChargeActivity.start(context);
|
||||
}else {
|
||||
|
@@ -4,17 +4,23 @@ import android.content.Context;
|
||||
|
||||
import com.umeng.commonsdk.statistics.common.DeviceConfig;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.application.IReportConstants;
|
||||
import com.yizhuan.erban.application.ReportManager;
|
||||
import com.yizhuan.erban.radish.task.activity.TaskCenterActivity;
|
||||
import com.yizhuan.erban.ui.pay.ChargeActivity;
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
|
||||
import com.yizhuan.xchat_android_core.Constants;
|
||||
import com.yizhuan.xchat_android_core.UriProvider;
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel;
|
||||
import com.yizhuan.xchat_android_core.pay.bean.WalletInfo;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_core.utils.ActivityUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.AppMetaDataUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 弹框帮助类,减少一些的代码的冗余
|
||||
* create by lvzebiao @2019/3/22
|
||||
@@ -51,8 +57,15 @@ public class DialogUiHelper {
|
||||
}
|
||||
dialogManager.showOkCancelDialog(ResUtil.getString(R.string.widget_dialog_dialoguihelper_04),
|
||||
true, () -> {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_NOT_ENOUGH_TO_RECHARGE,
|
||||
ResUtil.getString(R.string.widget_dialog_dialoguihelper_05) + CHARGE_FROM);
|
||||
//充值
|
||||
WalletInfo goldWalletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
HashMap<String, Object> map = new HashMap<>(5);
|
||||
map.put(IReportConstants.PAYPAGE_TYPE, IReportConstants.TWO);
|
||||
if (goldWalletInfo != null) {
|
||||
map.put(IReportConstants.ACCOUNT_BALANCE, goldWalletInfo.getDiamondNum());
|
||||
}
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_PAY);
|
||||
ReportManager.get().reportEvent(IReportConstants.PAYPAGE_SHOW, map);
|
||||
if (AppMetaDataUtil.getChannelID().equals(Constants.GOOGLE)) {
|
||||
ChargeActivity.start(context);
|
||||
} else {
|
||||
|
@@ -49,16 +49,6 @@ class HomeViewModel : BaseViewModel() {
|
||||
private val _emptyLiveData = MutableLiveData<Boolean>()
|
||||
val emptyLiveData: LiveData<Boolean> = _emptyLiveData
|
||||
|
||||
private val _resourceLiveData = MutableLiveData<List<ResourceInfo>>()
|
||||
val resourceLiveData: LiveData<List<ResourceInfo>> = _resourceLiveData
|
||||
|
||||
private val _resourceJumpLiveData = MutableLiveData<HomeRoomInfo?>()
|
||||
val resourceJumpLiveData: MutableLiveData<HomeRoomInfo?> = _resourceJumpLiveData
|
||||
|
||||
private val _singleAnchorHomeLiveData = MutableLiveData<ListResult<HomeRoomInfo>>()
|
||||
val singleAnchorHomeLiveData: LiveData<ListResult<HomeRoomInfo>> = _singleAnchorHomeLiveData
|
||||
|
||||
|
||||
private val _singleRoomSortInfoLiveData = MutableLiveData<ListResult<SingleRoomSortInfo>>()
|
||||
val singleRoomSortInfoLiveData: LiveData<ListResult<SingleRoomSortInfo>> =
|
||||
_singleRoomSortInfoLiveData
|
||||
@@ -87,25 +77,6 @@ class HomeViewModel : BaseViewModel() {
|
||||
}
|
||||
}
|
||||
|
||||
fun getHomeResource() {
|
||||
safeLaunch {
|
||||
_resourceLiveData.value = HomeModel.getHomeResource()
|
||||
}
|
||||
}
|
||||
|
||||
fun getResourceJumpInfo(id: Int) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_resourceJumpLiveData.value = null
|
||||
it.message.toast()
|
||||
},
|
||||
block = {
|
||||
_resourceJumpLiveData.value = HomeModel.getResourceJumpInfo(id)
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
fun getHotRoom(pageNum: Int, pageSize: Int) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
@@ -211,18 +182,6 @@ class HomeViewModel : BaseViewModel() {
|
||||
)
|
||||
}
|
||||
|
||||
fun getHomeSingleAnchorList() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_singleAnchorHomeLiveData.value = ListResult.failed(1)
|
||||
},
|
||||
block = {
|
||||
val result = HomeModel.getHomeSingleAnchorList()
|
||||
_singleAnchorHomeLiveData.value = ListResult.success(result, 1)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun requestHomeLiveTopInfo() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
|
@@ -7,7 +7,6 @@ import android.widget.TextView
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.coorchice.library.utils.LogUtils
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.application.IReportConstants
|
||||
@@ -28,6 +27,7 @@ import com.yizhuan.xchat_android_core.home.bean.HomeTagInfo
|
||||
import com.yizhuan.xchat_android_core.home.event.RefreshHomeDataEvent
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol
|
||||
import com.yizhuan.xchat_android_library.common.util.Logger
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
@@ -40,17 +40,23 @@ class HomeFragment : BaseFragment(), View.OnClickListener,
|
||||
|
||||
private lateinit var mBinding: FragmentHomeBinding
|
||||
private val mFragments: ArrayList<Fragment> = ArrayList()
|
||||
private val mTabInfoList: ArrayList<CharSequence> = ArrayList()
|
||||
private val mTabInfoList: ArrayList<HomeTagInfo> = ArrayList()
|
||||
private val homeViewModel: HomeViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
private const val TAG = "HomeFragment"
|
||||
}
|
||||
|
||||
override fun onClick(v: View) {
|
||||
when (v.id) {
|
||||
R.id.iv_search -> {
|
||||
//首页_搜索
|
||||
ReportManager.get().reportEvent(IReportConstants.MODULE_HOMEPAGE_CLICK, mapOf(
|
||||
Pair(IReportConstants.HOMEPAGE_TYPE, IReportConstants.ONE),
|
||||
Pair(IReportConstants.MODULE, IReportConstants.PEKO_HOMEPAGE)
|
||||
))
|
||||
ReportManager.get().reportEvent(
|
||||
IReportConstants.MODULE_HOMEPAGE_CLICK, mapOf(
|
||||
Pair(IReportConstants.HOMEPAGE_TYPE, IReportConstants.ONE),
|
||||
Pair(IReportConstants.MODULE, IReportConstants.PEKO_HOMEPAGE)
|
||||
)
|
||||
)
|
||||
SearchActivity.start(activity)
|
||||
//为啥触发条件这么恶心
|
||||
if (DemoCache.readAnchorCardView() == 0) {
|
||||
@@ -59,20 +65,27 @@ class HomeFragment : BaseFragment(), View.OnClickListener,
|
||||
}
|
||||
R.id.iv_ranking -> {
|
||||
//首页_排行榜
|
||||
ReportManager.get().reportEvent(IReportConstants.MODULE_HOMEPAGE_CLICK, mapOf(
|
||||
Pair(IReportConstants.HOMEPAGE_TYPE, IReportConstants.THREE),
|
||||
Pair(IReportConstants.MODULE, IReportConstants.PEKO_HOMEPAGE)
|
||||
))
|
||||
ReportManager.get().reportEvent(
|
||||
IReportConstants.MODULE_HOMEPAGE_CLICK, mapOf(
|
||||
Pair(IReportConstants.HOMEPAGE_TYPE, IReportConstants.THREE),
|
||||
Pair(IReportConstants.MODULE, IReportConstants.PEKO_HOMEPAGE)
|
||||
)
|
||||
)
|
||||
CommonWebViewActivity.start(mContext, UriProvider.getRanking())
|
||||
}
|
||||
R.id.iv_my_room -> {
|
||||
//首页_创建房间
|
||||
ReportManager.get().reportEvent(IReportConstants.MODULE_HOMEPAGE_CLICK, mapOf(
|
||||
Pair(IReportConstants.HOMEPAGE_TYPE, IReportConstants.TWO),
|
||||
Pair(IReportConstants.MODULE, IReportConstants.PEKO_HOMEPAGE)
|
||||
))
|
||||
ReportManager.get().reportEvent(
|
||||
IReportConstants.MODULE_HOMEPAGE_CLICK, mapOf(
|
||||
Pair(IReportConstants.HOMEPAGE_TYPE, IReportConstants.TWO),
|
||||
Pair(IReportConstants.MODULE, IReportConstants.PEKO_HOMEPAGE)
|
||||
)
|
||||
)
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_HOME_MY_ROOM_CLICK, ResUtil.getString(R.string.home_fragment_homefragment_03))
|
||||
.onEvent(
|
||||
StatisticsProtocol.EVENT_HOME_MY_ROOM_CLICK,
|
||||
ResUtil.getString(R.string.home_fragment_homefragment_03)
|
||||
)
|
||||
OpenRoomHelper.openRoom(baseActivity)
|
||||
}
|
||||
}
|
||||
@@ -103,8 +116,8 @@ class HomeFragment : BaseFragment(), View.OnClickListener,
|
||||
|
||||
private fun onGetHomeTagSuccess(info: List<HomeTagInfo>) {
|
||||
var changed = false
|
||||
mTabInfoList.remove(ResUtil.getString(R.string.home_fragment_homefragment_04))
|
||||
val oldTabInfoList: List<CharSequence> = ArrayList<CharSequence>(mTabInfoList)
|
||||
mTabInfoList.filter { it.id != 6 }
|
||||
val oldTabInfoList = mTabInfoList.map { it.name }
|
||||
for (tagInfo in info) {
|
||||
if (!oldTabInfoList.contains(tagInfo.name)) {
|
||||
changed = true
|
||||
@@ -113,10 +126,16 @@ class HomeFragment : BaseFragment(), View.OnClickListener,
|
||||
}
|
||||
//只有HomeTagInfo发生改变才刷新数据
|
||||
if (changed) {
|
||||
LogUtils.e("$changed:oldTabInfoList")
|
||||
Logger.info(TAG,"oldTabInfoList:change");
|
||||
mTabInfoList.clear()
|
||||
mFragments.clear()
|
||||
mTabInfoList.add(ResUtil.getString(R.string.home_fragment_homefragment_04))
|
||||
mTabInfoList.add(
|
||||
HomeTagInfo(
|
||||
6,
|
||||
ResUtil.getString(R.string.home_fragment_homefragment_04),
|
||||
0
|
||||
)
|
||||
)
|
||||
mFragments.add(RecommendFragment.newInstance())
|
||||
for (i in info.indices) {
|
||||
//过滤对象是空和没有标签名同时也没有子标签的情况
|
||||
@@ -127,7 +146,7 @@ class HomeFragment : BaseFragment(), View.OnClickListener,
|
||||
name = name.trim { it <= ' ' }
|
||||
}
|
||||
title = name
|
||||
mTabInfoList.add(title)
|
||||
mTabInfoList.add(info[i])
|
||||
val tabId: Int = info[i].id
|
||||
fragment = when (title) {
|
||||
ResUtil.getString(R.string.home_fragment_partyfragment_01) -> {
|
||||
@@ -146,7 +165,7 @@ class HomeFragment : BaseFragment(), View.OnClickListener,
|
||||
commonNavigator.setTitleWrapContent(false)
|
||||
commonNavigator.titleMargin = ScreenUtil.dip2px(2.0F)
|
||||
commonNavigator.setTitleGravity(Gravity.CENTER_VERTICAL)
|
||||
val magicIndicatorAdapter = PartyMagicIndicatorAdapter(mTabInfoList)
|
||||
val magicIndicatorAdapter = PartyMagicIndicatorAdapter(mTabInfoList.map { it.name })
|
||||
magicIndicatorAdapter.textSize = 14
|
||||
magicIndicatorAdapter.setOnItemSelectListener(this)
|
||||
commonNavigator.adapter = magicIndicatorAdapter
|
||||
@@ -169,13 +188,19 @@ class HomeFragment : BaseFragment(), View.OnClickListener,
|
||||
* 初始化推荐和派对tab
|
||||
*/
|
||||
private fun initTitleTab() {
|
||||
mTabInfoList.add(ResUtil.getString(R.string.home_fragment_homefragment_04))
|
||||
mTabInfoList.add(
|
||||
HomeTagInfo(
|
||||
6,
|
||||
ResUtil.getString(R.string.home_fragment_homefragment_04),
|
||||
0
|
||||
)
|
||||
)
|
||||
mFragments.add(RecommendFragment.newInstance())
|
||||
val commonNavigator = CommonNavigator(context)
|
||||
commonNavigator.setTitleWrapContent(false)
|
||||
commonNavigator.titleMargin = ScreenUtil.dip2px(2.0F)
|
||||
commonNavigator.setTitleGravity(Gravity.CENTER_VERTICAL)
|
||||
val magicIndicatorAdapter = PartyMagicIndicatorAdapter(mTabInfoList)
|
||||
val magicIndicatorAdapter = PartyMagicIndicatorAdapter(mTabInfoList.map { it.name })
|
||||
magicIndicatorAdapter.textSize = 14
|
||||
magicIndicatorAdapter.setOnItemSelectListener(this)
|
||||
commonNavigator.adapter = magicIndicatorAdapter
|
||||
@@ -187,6 +212,11 @@ class HomeFragment : BaseFragment(), View.OnClickListener,
|
||||
|
||||
override fun onItemSelect(position: Int, view: TextView?) {
|
||||
mBinding.viewPager.currentItem = position
|
||||
//点击顶部tab上报
|
||||
val map = HashMap<String, Any>(3)
|
||||
map[IReportConstants.HOMEPAGE_TAB] = mTabInfoList[position].id
|
||||
map[IReportConstants.MODULE] = IReportConstants.PEKO_HOMEPAGE
|
||||
ReportManager.get().reportEvent(IReportConstants.TAB_HOMEPAGE_CLICK, map)
|
||||
}
|
||||
|
||||
}
|
@@ -16,6 +16,8 @@ import androidx.fragment.app.viewModels
|
||||
import com.umeng.commonsdk.statistics.common.DeviceConfig
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.UIHelper
|
||||
import com.yizhuan.erban.application.IReportConstants
|
||||
import com.yizhuan.erban.application.ReportManager
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity
|
||||
import com.yizhuan.erban.avroom.fragment.RoomRankDialogUtils
|
||||
import com.yizhuan.erban.base.BaseActivity
|
||||
@@ -389,11 +391,15 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
)
|
||||
)
|
||||
R.id.me_item_wallet -> {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(
|
||||
StatisticsProtocol.EVENT_USERCENTER_RECHARGE_CARD_CLICK,
|
||||
getString(R.string.me_personal_center_recharge_card_click)
|
||||
)
|
||||
//进入充值页面埋点
|
||||
val goldWalletInfo = PayModel.get().currentWalletInfo
|
||||
val map = HashMap<String, Any>(5)
|
||||
map[IReportConstants.PAYPAGE_TYPE] = IReportConstants.FOUR
|
||||
if (goldWalletInfo != null) {
|
||||
map[IReportConstants.ACCOUNT_BALANCE] = goldWalletInfo.diamondNum
|
||||
}
|
||||
map[IReportConstants.MODULE] = IReportConstants.PEKO_PAY
|
||||
ReportManager.get().reportEvent(IReportConstants.PAYPAGE_SHOW, map)
|
||||
if (AppMetaDataUtil.getChannelID().equals(Constants.GOOGLE)) {
|
||||
ChargeActivity.start(mContext)
|
||||
} else {
|
||||
@@ -407,17 +413,15 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
}
|
||||
R.id.me_item_vip -> {
|
||||
VipMainActivity.start(mContext)
|
||||
StatisticManager.Instance()
|
||||
.onEvent(
|
||||
StatisticsProtocol.EVENT_VIP_ENTRANCE_ME_CLICK,
|
||||
getString(R.string.me_noble_my_entry_click_event)
|
||||
)
|
||||
//后面产品新加的
|
||||
StatisticManager.Instance()
|
||||
.onEvent(
|
||||
StatisticsProtocol.EVENT_USERCENTER_NOBLE_CARD_CLICK,
|
||||
getString(R.string.me_Individual_center_noble_card_card_click)
|
||||
)
|
||||
//进入贵族中心埋点
|
||||
val goldWalletInfo = PayModel.get().currentWalletInfo
|
||||
val map = HashMap<String, Any>(5)
|
||||
map[IReportConstants.PAYPAGE_TYPE] = IReportConstants.FIVE
|
||||
if (goldWalletInfo != null) {
|
||||
map[IReportConstants.ACCOUNT_BALANCE] = goldWalletInfo.diamondNum
|
||||
}
|
||||
map[IReportConstants.MODULE] = IReportConstants.PEKO_PAY
|
||||
ReportManager.get().reportEvent(IReportConstants.PAYPAGE_SHOW, map)
|
||||
}
|
||||
R.id.ll_room -> {
|
||||
//我的房间,开房
|
||||
@@ -430,10 +434,6 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
}
|
||||
R.id.ll_gain -> {
|
||||
context?.let { EarnRecordActivity.start(it) }
|
||||
// CommonWebViewActivity.start(
|
||||
// context,
|
||||
// UriProvider.JAVA_WEB_URL + "peko/modules/myincome/index.html#/DiamondLog"
|
||||
// )
|
||||
}
|
||||
R.id.ll_clean_diamonds -> {
|
||||
GiveGoldActivity.start(mContext)
|
||||
|
@@ -32,6 +32,7 @@ import com.yizhuan.xchat_android_core.DemoCache;
|
||||
import com.yizhuan.xchat_android_core.UriProvider;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginReportEvent;
|
||||
import com.yizhuan.xchat_android_library.utils.AppMetaDataUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -266,6 +267,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
|
||||
/**
|
||||
* 上报登录结果
|
||||
*
|
||||
* @param loginType
|
||||
* @param result
|
||||
* @param failDetail
|
||||
@@ -275,7 +277,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
map.put(IReportConstants.LOGIN_TYPE, loginType);
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_LOGIN);
|
||||
map.put(IReportConstants.RESULT, result);
|
||||
if(result == IReportConstants.ZERO){
|
||||
if (result == IReportConstants.ZERO) {
|
||||
map.put(IReportConstants.FAIL_DETAIL, failDetail);
|
||||
}
|
||||
ReportManager.get().reportEvent(IReportConstants.LOGIN_RESULT, map);
|
||||
@@ -334,4 +336,15 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
finish();
|
||||
}
|
||||
|
||||
/**
|
||||
* 三方登录上报事件
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLoginReportEvent(LoginReportEvent event) {
|
||||
HashMap<String, Object> map = new HashMap<>(3);
|
||||
map.put(IReportConstants.LOGIN_TYPE, event.getLoginType());
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_LOGIN);
|
||||
ReportManager.get().reportEvent(IReportConstants.LOGIN_REQUEST, map);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -99,7 +99,7 @@ public class LoginPasswordActivity extends BaseActivity {
|
||||
private void login() {
|
||||
//发起登录
|
||||
HashMap<String, Object> map = new HashMap<>(3);
|
||||
map.put(IReportConstants.CLICK_TYPE, IReportConstants.FIVE);
|
||||
map.put(IReportConstants.LOGIN_TYPE, IReportConstants.FIVE);
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_LOGIN);
|
||||
ReportManager.get().reportEvent(IReportConstants.LOGIN_REQUEST, map);
|
||||
|
||||
|
@@ -28,6 +28,8 @@ import com.appsflyer.AFInAppEventType;
|
||||
import com.appsflyer.AppsFlyerLib;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.application.IReportConstants;
|
||||
import com.yizhuan.erban.application.ReportManager;
|
||||
import com.yizhuan.erban.base.BaseMvpActivity;
|
||||
import com.yizhuan.erban.common.widget.OriginalDrawStatusClickSpan;
|
||||
import com.yizhuan.erban.pay.presenter.ChargePresenter;
|
||||
@@ -41,6 +43,7 @@ import com.yizhuan.xchat_android_core.pay.PayModel;
|
||||
import com.yizhuan.xchat_android_core.pay.bean.ChargeBean;
|
||||
import com.yizhuan.xchat_android_core.pay.bean.WalletInfo;
|
||||
import com.yizhuan.xchat_android_core.pay.event.UpdateWalletInfoEvent;
|
||||
import com.yizhuan.xchat_android_core.utils.Logger;
|
||||
import com.yizhuan.xchat_android_core.utils.net.IgnoreException;
|
||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
@@ -302,6 +305,11 @@ public class ChargeActivity extends BaseMvpActivity<IChargeView, ChargePresenter
|
||||
ChargeBean bean = mChargeAdapter.getItem(mChargePosition);
|
||||
if (bean != null && bean.getSkuDetails() != null) {
|
||||
buyProduct(bean.getSkuDetails());
|
||||
//点击充值
|
||||
HashMap<String, Object> map = new HashMap<>(3);
|
||||
map.put(IReportConstants.MONEY, bean.money);
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_PAY);
|
||||
ReportManager.get().reportEvent(IReportConstants.PAY_CLICK, map);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -21,6 +21,8 @@ import com.orhanobut.logger.Logger;
|
||||
import com.umeng.commonsdk.statistics.common.DeviceConfig;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
import com.yizhuan.erban.application.IReportConstants;
|
||||
import com.yizhuan.erban.application.ReportManager;
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
import com.yizhuan.erban.decoration.view.DecorationStoreActivity;
|
||||
import com.yizhuan.erban.family.view.activity.FamilyHomeActivity;
|
||||
@@ -40,6 +42,8 @@ import com.yizhuan.xchat_android_core.decoration.bean.DecorationStoreRouterType;
|
||||
import com.yizhuan.xchat_android_core.file.FileModel;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.market_verify.MarketVerifyModel;
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel;
|
||||
import com.yizhuan.xchat_android_core.pay.bean.WalletInfo;
|
||||
import com.yizhuan.xchat_android_core.public_chat_hall.manager.PublicChatHallDataManager;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
@@ -60,6 +64,7 @@ import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* <p> html js 与webview 交互接口</p>
|
||||
@@ -108,8 +113,18 @@ public class JSInterface {
|
||||
* 跳转充值页面
|
||||
*/
|
||||
@JavascriptInterface
|
||||
public void openChargePage() {
|
||||
public void openChargePage(int type) {
|
||||
if (context != null) {
|
||||
LogUtil.i(TAG, "openChargePage:" + type);
|
||||
//充值
|
||||
WalletInfo goldWalletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
HashMap<String, Object> map = new HashMap<>(5);
|
||||
map.put(IReportConstants.PAYPAGE_TYPE, type);
|
||||
if (goldWalletInfo != null) {
|
||||
map.put(IReportConstants.ACCOUNT_BALANCE, goldWalletInfo.getDiamondNum());
|
||||
}
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_PAY);
|
||||
ReportManager.get().reportEvent(IReportConstants.PAYPAGE_SHOW, map);
|
||||
if(AppMetaDataUtil.getChannelID().equals(Constants.GOOGLE)) {
|
||||
ChargeActivity.start(context);
|
||||
}else {
|
||||
@@ -123,6 +138,22 @@ public class JSInterface {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 三方按钮充值点击
|
||||
* @param money
|
||||
*/
|
||||
@JavascriptInterface
|
||||
public void chargePayPage(int money) {
|
||||
if (mActivity != null) {
|
||||
LogUtil.i(TAG, "chargePayPage:" + money);
|
||||
//点击充值
|
||||
HashMap<String, Object> map = new HashMap<>(3);
|
||||
map.put(IReportConstants.MONEY, money);
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_PAY);
|
||||
ReportManager.get().reportEvent(IReportConstants.PAY_CLICK, map);
|
||||
}
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void openSharePage() {
|
||||
if (mActivity != null) {
|
||||
|
@@ -20,7 +20,6 @@ import android.view.animation.LinearInterpolator;
|
||||
import android.view.animation.RotateAnimation;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.HorizontalScrollView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -33,13 +32,14 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
import com.trello.rxlifecycle3.components.support.RxAppCompatActivity;
|
||||
import com.umeng.commonsdk.statistics.common.DeviceConfig;
|
||||
import com.yizhuan.erban.BR;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.application.IReportConstants;
|
||||
import com.yizhuan.erban.application.ReportManager;
|
||||
import com.yizhuan.erban.avroom.firstcharge.FirstChargeDialog;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.erban.common.widget.CircleImageView;
|
||||
@@ -103,6 +103,7 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -321,10 +322,10 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
}
|
||||
|
||||
//如果沒上麥就添加自己
|
||||
if(micMemberInfos.size() > 0){
|
||||
if (micMemberInfos.size() > 0) {
|
||||
MicMemberInfo micMemberInfo = new MicMemberInfo();
|
||||
UserInfo userInfo = UserModel.get().getCacheLoginUserInfo();
|
||||
if(userInfo != null && !AvRoomDataManager.get().checkIsOnMicByAccount(String.valueOf(userInfo.getUid()))) {
|
||||
if (userInfo != null && !AvRoomDataManager.get().checkIsOnMicByAccount(String.valueOf(userInfo.getUid()))) {
|
||||
micMemberInfo.setInPkMode(AvRoomDataManager.get().isOpenPKMode());
|
||||
micMemberInfo.setTeamId(PkModel.get().getTeamIdInPKMemberList(String.valueOf(AvRoomDataManager.get().getRoomUid())));
|
||||
micMemberInfo.setNick(userInfo.getNick());
|
||||
@@ -1065,7 +1066,24 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
case R.id.tv_recharge:
|
||||
|
||||
if (itemType == ITEM_TYPE_GOLD) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_GIFT_PANEL_TO_RECHARGE, ResUtil.getString(R.string.ui_widget_giftdialog_023) + GIFT_DIALOG_FROM);
|
||||
//充值
|
||||
if(GIFT_DIALOG_FROM.equals(ResUtil.getString(R.string.room))) {
|
||||
HashMap<String, Object> map = new HashMap<>(5);
|
||||
map.put(IReportConstants.PAYPAGE_TYPE, IReportConstants.ONE);
|
||||
if (goldWalletInfo != null) {
|
||||
map.put(IReportConstants.ACCOUNT_BALANCE, goldWalletInfo.getDiamondNum());
|
||||
}
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_PAY);
|
||||
ReportManager.get().reportEvent(IReportConstants.PAYPAGE_SHOW, map);
|
||||
}else if(GIFT_DIALOG_FROM.equals(ResUtil.getString(R.string.im_actions_giftaction_01))){
|
||||
HashMap<String, Object> map = new HashMap<>(5);
|
||||
map.put(IReportConstants.PAYPAGE_TYPE, IReportConstants.NINE);
|
||||
if (goldWalletInfo != null) {
|
||||
map.put(IReportConstants.ACCOUNT_BALANCE, goldWalletInfo.getDiamondNum());
|
||||
}
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_PAY);
|
||||
ReportManager.get().reportEvent(IReportConstants.PAYPAGE_SHOW, map);
|
||||
}
|
||||
if (AppMetaDataUtil.getChannelID().equals(Constants.GOOGLE)) {
|
||||
ChargeActivity.start(context);
|
||||
} else {
|
||||
@@ -1250,8 +1268,14 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
break;
|
||||
case R.id.iv_open_noble:
|
||||
VipMainActivity.start(context);
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_VIP_ENTRANCE_GIFT_CLICK, ResUtil.getString(R.string.ui_widget_giftdialog_039));
|
||||
//进入贵族中心埋点
|
||||
HashMap<String, Object> map = new HashMap<>(5);
|
||||
map.put(IReportConstants.PAYPAGE_TYPE, IReportConstants.THREE);
|
||||
if (goldWalletInfo != null) {
|
||||
map.put(IReportConstants.ACCOUNT_BALANCE, goldWalletInfo.getDiamondNum());
|
||||
}
|
||||
map.put(IReportConstants.MODULE, IReportConstants.PEKO_PAY);
|
||||
ReportManager.get().reportEvent(IReportConstants.PAYPAGE_SHOW, map);
|
||||
break;
|
||||
|
||||
case R.id.iv_first_recharge:
|
||||
|
@@ -27,6 +27,8 @@ import com.opensource.svgaplayer.SVGAParser
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity
|
||||
import com.umeng.commonsdk.statistics.common.DeviceConfig
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.application.IReportConstants
|
||||
import com.yizhuan.erban.application.ReportManager
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.base.TitleBar
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
@@ -43,8 +45,6 @@ import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel
|
||||
import com.yizhuan.xchat_android_core.pay.bean.ChargeBean
|
||||
import com.yizhuan.xchat_android_core.pay.bean.PayRecordId
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol
|
||||
import com.yizhuan.xchat_android_core.utils.net.IgnoreException
|
||||
import com.yizhuan.xchat_android_core.utils.toast
|
||||
import com.yizhuan.xchat_android_core.vip.VipAuthInfo
|
||||
@@ -225,22 +225,22 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
||||
}
|
||||
|
||||
binding.tvOpenVip.setOnClickListener {
|
||||
if(AppMetaDataUtil.getChannelID().equals(Constants.GOOGLE)){
|
||||
if (AppMetaDataUtil.getChannelID().equals(Constants.GOOGLE)) {
|
||||
bean?.let { charge ->
|
||||
StatisticManager.Instance()
|
||||
.onEvent(
|
||||
StatisticsProtocol.EVENT_VIP_OPEN_CLICK,
|
||||
getString(R.string.me_open_nobleman_click_event)
|
||||
)
|
||||
//点击充值
|
||||
val map = java.util.HashMap<String, Any>(3)
|
||||
map[IReportConstants.MONEY] = charge.money
|
||||
map[IReportConstants.MODULE] = IReportConstants.PEKO_PAY
|
||||
ReportManager.get().reportEvent(IReportConstants.PAY_CLICK, map)
|
||||
buyProduct(charge.skuDetails)
|
||||
}
|
||||
}else{
|
||||
chargeInfo?.let {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(
|
||||
StatisticsProtocol.EVENT_VIP_OPEN_CLICK,
|
||||
getString(R.string.me_open_nobleman_click_event)
|
||||
)
|
||||
} else {
|
||||
chargeInfo?.let { charge ->
|
||||
//点击充值
|
||||
val map = java.util.HashMap<String, Any>(3)
|
||||
map[IReportConstants.MONEY] = charge.money
|
||||
map[IReportConstants.MODULE] = IReportConstants.PEKO_PAY
|
||||
ReportManager.get().reportEvent(IReportConstants.PAY_CLICK, map)
|
||||
CommonWebViewActivity.start(
|
||||
context,
|
||||
UriProvider.getOfficialPay(5, DeviceConfig.getDeviceId(context))
|
||||
|
@@ -434,14 +434,14 @@
|
||||
android:layout_height="25dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/tv_text_gold"
|
||||
android:drawableEnd="@drawable/ic_arrow_recharge"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_13"
|
||||
android:paddingEnd="@dimen/dp_13"
|
||||
android:text="@string/charge"
|
||||
android:textColor="@color/color_FACB4D"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:drawableEndCompat="@drawable/ic_arrow_recharge" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_first_recharge"
|
||||
@@ -460,13 +460,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:drawableEnd="@drawable/ic_gift_diamond"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:drawableEndCompat="@drawable/ic_gift_diamond" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/send_container"
|
||||
|
@@ -5005,5 +5005,6 @@
|
||||
<string name="bound_auth_code_is_empty">授权號不能為空</string>
|
||||
<string name="only_can_see_three_month_data">只能查看前3個月的結算統計</string>
|
||||
<string name="text_modify_bind_phone">更換綁定</string>
|
||||
<string name="room">房間</string>
|
||||
|
||||
</resources>
|
@@ -2,6 +2,9 @@ package com.yizhuan.xchat_android_core.home.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CollectionRoomInfo {
|
||||
/**
|
||||
* totalPage : 1
|
||||
|
@@ -4,6 +4,9 @@ import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HomeTabMapInfo implements MultiItemEntity, Serializable {
|
||||
|
||||
public static final int TYPE_EMPTY = 0;
|
||||
|
@@ -1,39 +1,48 @@
|
||||
package com.yizhuan.xchat_android_core.home.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HomeTagInfo {
|
||||
|
||||
/**
|
||||
* id : 1
|
||||
* name : 推荐
|
||||
* seq : 1
|
||||
*/
|
||||
/**
|
||||
* id : 1
|
||||
* name : 推荐
|
||||
* seq : 1
|
||||
*/
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
private int seq;
|
||||
private int id;
|
||||
private String name;
|
||||
private int seq;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
public HomeTagInfo(int id, String name, int seq) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.seq = seq;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getSeq() {
|
||||
return seq;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setSeq(int seq) {
|
||||
this.seq = seq;
|
||||
}
|
||||
public int getSeq() {
|
||||
return seq;
|
||||
}
|
||||
|
||||
public void setSeq(int seq) {
|
||||
this.seq = seq;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,8 @@
|
||||
package com.yizhuan.xchat_android_core.home.bean
|
||||
|
||||
import lombok.Data
|
||||
|
||||
@Data
|
||||
data class MainTabInfo(
|
||||
val tabIcon: String = "",
|
||||
val tabSelectedIcon: String = "",
|
||||
|
@@ -1,5 +1,8 @@
|
||||
package com.yizhuan.xchat_android_core.home.bean
|
||||
|
||||
import lombok.Data
|
||||
|
||||
@Data
|
||||
data class ResourceInfo(
|
||||
val icon: String? = null,
|
||||
val id: Int = 0,
|
||||
|
@@ -1,5 +1,8 @@
|
||||
package com.yizhuan.xchat_android_core.home.bean
|
||||
|
||||
import lombok.Data
|
||||
|
||||
@Data
|
||||
data class VisitorInfo(
|
||||
val avatar: String? = null,
|
||||
val erbanNo: Int = 0,
|
||||
|
@@ -27,6 +27,7 @@ import com.yizhuan.xchat_android_core.auth.entity.TicketInfo;
|
||||
import com.yizhuan.xchat_android_core.auth.event.GetCurrentUidEvent;
|
||||
import com.yizhuan.xchat_android_core.auth.event.KickOutEvent;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginReportEvent;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LogoutEvent;
|
||||
import com.yizhuan.xchat_android_core.auth.exception.AccountCancelException;
|
||||
import com.yizhuan.xchat_android_core.auth.exception.BanAccountException;
|
||||
@@ -122,8 +123,6 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* 超管登录校验验证码
|
||||
*/
|
||||
private static final int SUPER_CODE_SHOW_CODE = 136;
|
||||
private static final int TYPE_WECHAT_LOGIN = 1;//微信登录类型
|
||||
private static final int TYPE_QQ_LOGIN = 2;//QQ登录类型
|
||||
private volatile static AuthModel instance = null;
|
||||
|
||||
boolean isInit = false;
|
||||
@@ -397,6 +396,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
gender = gender.replace("m", "1").replace("f", "2");
|
||||
}
|
||||
thirdUserInfo.setUserGender(gender);
|
||||
EventBus.getDefault().post(new LoginReportEvent(1));
|
||||
return thirdLogin(openid, unionid, TYPE_FACEBOOK_LOGIN, "", "");
|
||||
})
|
||||
.flatMap(s -> imLogin(currentAccountInfo))
|
||||
@@ -471,6 +471,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
gender = gender.replace("m", "1").replace("f", "2");
|
||||
}
|
||||
thirdUserInfo.setUserGender(gender);
|
||||
EventBus.getDefault().post(new LoginReportEvent(2));
|
||||
return thirdLogin(openid, unionid, TYPE_LINE_LOGIN, "", "");
|
||||
})
|
||||
.flatMap(s -> imLogin(currentAccountInfo))
|
||||
@@ -543,6 +544,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
gender = gender.replace("m", "1").replace("f", "2");
|
||||
}
|
||||
thirdUserInfo.setUserGender(gender);
|
||||
EventBus.getDefault().post(new LoginReportEvent(3));
|
||||
return thirdLogin(openid, unionid, TYPE_GOOGLE_LOGIN, "", "");
|
||||
})
|
||||
.flatMap(s -> imLogin(currentAccountInfo))
|
||||
|
@@ -0,0 +1,15 @@
|
||||
package com.yizhuan.xchat_android_core.auth.event;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 三方登录上报事件
|
||||
*/
|
||||
@Data
|
||||
public class LoginReportEvent {
|
||||
private int loginType;
|
||||
|
||||
public LoginReportEvent(int loginType) {
|
||||
this.loginType = loginType;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user