Commit b534c7aa by 霍志良

feat:埋点

parent c3c305ea
......@@ -6,12 +6,12 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.13",
"m-consultant" : "0.0.59.98",
"m-consultant" : "0.0.59.99",
"m-fm" : "0.0.30.04",
"m-user" : "0.0.61.78",
"m-home" : "0.0.22.80",
"m-im" : "0.0.19.93",
"m-dynamic" : "0.0.7.31",
"m-im" : "0.0.19.99",
"m-dynamic" : "0.0.7.32",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.24",
......@@ -89,12 +89,12 @@ ext {
//第三步 若干
"m-confide" : "0.0.49.13",
"m-consultant" : "0.0.59.98",
"m-consultant" : "0.0.59.99",
"m-fm" : "0.0.30.04",
"m-user" : "0.0.61.78",
"m-home" : "0.0.22.80",
"m-im" : "0.0.19.93",
"m-dynamic" : "0.0.7.31",
"m-im" : "0.0.19.99",
"m-dynamic" : "0.0.7.32",
"m-article" : "0.0.0.8",
"m-muse" : "0.0.28.24",
......
......@@ -52,8 +52,6 @@ class BigShotOneView : LinearLayout {
fun setUrl(bean: ExpertSearchBigShotBean) {
mContext?.let { GlideApp.with(it).load(bean.topicImages[0].imageUrl).into(consultant_one_img_1) }
consultant_one_img_1.setOnClickListener {
ActionCountUtils.count(YDL_USER_CONSULT_TYPE_CLICK,bean.specialTopicTitle)
bean.specialTopicTitle
val h5Params = H5Params(bean.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
}
......
......@@ -8,8 +8,10 @@ import android.widget.LinearLayout
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.R
import com.yidianling.consultant.bean.ExpertSearchBigShotBean
import com.yidianling.consultant.constants.ConsultBIConstants
import kotlinx.android.synthetic.main.consultant_expert_search_big_shot_two.view.*
class BigShotTwoView : LinearLayout {
......@@ -50,11 +52,13 @@ class BigShotTwoView : LinearLayout {
fun setUrl(bean1: ExpertSearchBigShotBean, bean2: ExpertSearchBigShotBean) {
mContext?.let { GlideApp.with(it).load(bean1.topicImages[1].imageUrl).into(consultant_two_img_1) }
consultant_two_img_1.setOnClickListener {
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.YDL_USER_CONSULT_TYPE_CLICK,bean1.specialTopicTitle)
val h5Params = H5Params(bean1.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
}
mContext?.let { GlideApp.with(it).load(bean2.topicImages[1].imageUrl).into(consultant_two_img_2) }
consultant_two_img_2.setOnClickListener {
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.YDL_USER_CONSULT_TYPE_CLICK,bean2.specialTopicTitle)
val h5Params = H5Params(bean2.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
}
......
......@@ -225,6 +225,16 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser && isResumed()) {
startTime=System.currentTimeMillis();
ActionCountUtils.Companion.count(YDL_USER_ASK_PAGE_VISIT);
} else {
endTime=System.currentTimeMillis();
ActionCountUtils.Companion.count(YDL_USER_ASK_PAGE_STAY_VISIT,String.valueOf(endTime-startTime));
}
if (isVisibleToUser && isResumed()) {
onResume();
}
}
private void initViewPager() {
......@@ -381,19 +391,6 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
}
@Override
public void onStop() {
super.onStop();
endTime=System.currentTimeMillis();
ActionCountUtils.Companion.count(YDL_USER_ASK_PAGE_STAY_VISIT,String.valueOf(endTime-startTime));
}
@Override
public void onResume() {
super.onResume();
startTime=System.currentTimeMillis();
ActionCountUtils.Companion.count(YDL_USER_ASK_PAGE_VISIT);
}
@Override
public void onRefresh() {
......
......@@ -17,6 +17,8 @@ import com.ydl.ydlcommon.base.BaseFragment
import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils.Companion.count
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
import com.yidianling.im.api.event.ImLogoutEvent
......@@ -44,7 +46,7 @@ import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.im_new_multi_message_fragment.*
import kotlinx.android.synthetic.main.im_nim_contact_text_item.view.*
import java.lang.String
import java.util.concurrent.TimeUnit
/**
......@@ -62,7 +64,8 @@ class NewMultiMessageFragment : BaseFragment() {
private var chatListUnreadNum: Int = 0 // 私聊列表未读数
private var interactListUnreadNum: Int = 0 //互动列表未读数
private var noticeListUnreadNum: Int = 0 //通知列表未读数
private var startTime: Long = 0L
private var endTime: Long = 0L
override fun initDataAndEventLazy() {
}
......@@ -82,7 +85,8 @@ class NewMultiMessageFragment : BaseFragment() {
override fun onResume() {
super.onResume()
count("ydl_user_message_page|ydl_user_message_page_visit")
startTime = System.currentTimeMillis()
getMsgData()
NIMClient.getService(MsgService::class.java).setChattingAccount(
......@@ -108,6 +112,13 @@ class NewMultiMessageFragment : BaseFragment() {
super.setUserVisibleHint(isVisibleToUser)
if (isVisibleToUser && getIsViewCreated()) {
getMsgData()
}else{
endTime = System.currentTimeMillis()
count(
"ydl_user_message_page|ydl_user_message_page_stay_visit",
String.valueOf(endTime - startTime)
)
}
}
......@@ -370,13 +381,13 @@ class NewMultiMessageFragment : BaseFragment() {
override fun onPageSelected(index: Int) {
when (index) {
0 -> {
ActionCountUtils.count("ydl_user_message_page|ydl_user_message_type_click",chat_btn.text.toString())
ActionCountUtils.count("ydl_user_message_page|ydl_user_message_type_click","私聊")
}
1 -> {
ActionCountUtils.count("ydl_user_message_page|ydl_user_message_type_click",communite_btn.text.toString())
ActionCountUtils.count("ydl_user_message_page|ydl_user_message_type_click","互动")
}
else -> {
ActionCountUtils.count("ydl_user_message_page|ydl_user_message_type_click",notification_btn.text.toString())
ActionCountUtils.count("ydl_user_message_page|ydl_user_message_type_click","通知")
}
}
setSelectTab(index)
......
......@@ -226,8 +226,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private boolean isOthers;
private MultipleAnswerBean multipleAnswerBean;
private ArrayList<String> answersItemsMap = new ArrayList<>();
private long startTime=0 ;
private long endTime=0;
@SuppressLint("HandlerLeak")
private Handler mHandler = new Handler() {
@Override
......@@ -1014,7 +1013,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
NIMClient.getService(MsgService.class).setChattingAccount(MsgService.MSG_CHATTING_ACCOUNT_NONE, SessionTypeEnum.None);
inputPanel.onPause();
messageListPanel.onPause();
}
}
@SuppressLint("SetTextI18n")
@Override
......@@ -1028,20 +1027,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser && isResumed()) {
ActionCountUtils.Companion.count("ydl_user_message_page|ydl_user_message_page_visit");
startTime=System.currentTimeMillis();
} else {
endTime=System.currentTimeMillis();
ActionCountUtils.Companion.count("ydl_user_message_page|ydl_user_message_page_stay_visit",String.valueOf(endTime-startTime));
}
if (isVisibleToUser && isResumed()) {
onResume();
}
}
@Override
public void onDestroy() {
......
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