Commit 9691b71b by 霍志良

feat:我的埋点修改

parent 5195088e
...@@ -6,11 +6,11 @@ ext { ...@@ -6,11 +6,11 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.13", "m-confide" : "0.0.49.13",
"m-consultant" : "0.0.59.96", "m-consultant" : "0.0.59.98",
"m-fm" : "0.0.30.04", "m-fm" : "0.0.30.04",
"m-user" : "0.0.61.77", "m-user" : "0.0.61.78",
"m-home" : "0.0.22.77", "m-home" : "0.0.22.79",
"m-im" : "0.0.19.92", "m-im" : "0.0.19.93",
"m-dynamic" : "0.0.7.31", "m-dynamic" : "0.0.7.31",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
...@@ -89,11 +89,11 @@ ext { ...@@ -89,11 +89,11 @@ ext {
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.13", "m-confide" : "0.0.49.13",
"m-consultant" : "0.0.59.96", "m-consultant" : "0.0.59.98",
"m-fm" : "0.0.30.04", "m-fm" : "0.0.30.04",
"m-user" : "0.0.61.77", "m-user" : "0.0.61.78",
"m-home" : "0.0.22.77", "m-home" : "0.0.22.79",
"m-im" : "0.0.19.92", "m-im" : "0.0.19.93",
"m-dynamic" : "0.0.7.31", "m-dynamic" : "0.0.7.31",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
......
...@@ -72,8 +72,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -72,8 +72,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
SwipeRefreshLayout.OnRefreshListener { SwipeRefreshLayout.OnRefreshListener {
private lateinit var mContext: Context private lateinit var mContext: Context
private lateinit var mActivity: FragmentActivity private lateinit var mActivity: FragmentActivity
var startTime by Delegates.notNull<Long>() var startTime =0L
var endTime by Delegates.notNull<Long>() var endTime =0L
override fun layoutResId(): Int { override fun layoutResId(): Int {
return R.layout.consultant_activity_expert_search_list return R.layout.consultant_activity_expert_search_list
...@@ -328,9 +328,13 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -328,9 +328,13 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
override fun setUserVisibleHint(isVisibleToUser: Boolean) { override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser) super.setUserVisibleHint(isVisibleToUser)
if (isVisibleToUser && isResumed) { if (isVisibleToUser && isResumed) {
startTime=System.currentTimeMillis()
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_PAGE_VISIT)
showConsultAssistantDialog() showConsultAssistantDialog()
} else { } else {
hideConsultAssistantDialog() hideConsultAssistantDialog()
endTime=System.currentTimeMillis()
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.YDL_USER_CONSULT_PAGE_STAY_VISIT,(endTime-startTime).toString())
} }
if (isVisibleToUser && isResumed) { if (isVisibleToUser && isResumed) {
onResume() onResume()
...@@ -1527,16 +1531,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1527,16 +1531,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
startTime=System.currentTimeMillis()
refresh(false) refresh(false)
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_PAGE_VISIT)
}
override fun onStop() {
super.onStop()
endTime=System.currentTimeMillis()
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.YDL_USER_CONSULT_PAGE_STAY_VISIT,(endTime-startTime).toString())
} }
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
ConsultAssistantDialogUtils.INSTANCE.resetStatus() ConsultAssistantDialogUtils.INSTANCE.resetStatus()
......
...@@ -93,8 +93,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -93,8 +93,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
open var searchText: String = "" open var searchText: String = ""
open var doctorName: String = "" open var doctorName: String = ""
var startTime by Delegates.notNull<Long>() var startTime =0L
var endTime by Delegates.notNull<Long>() var endTime =0L
/** /**
* 如果是第一次加载,则调用所有接口进行刷新,否则,只调用咨询和倾诉接口 * 如果是第一次加载,则调用所有接口进行刷新,否则,只调用咨询和倾诉接口
...@@ -494,9 +494,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -494,9 +494,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
override fun setUserVisibleHint(isVisibleToUser: Boolean) { override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser) super.setUserVisibleHint(isVisibleToUser)
if (isVisibleToUser && isResumed) { if (isVisibleToUser && isResumed) {
startTime=System.currentTimeMillis()
ActionCountUtils.count(HomeBIConstants.YDL_USER_MAIN_PAGE_VISIT)
showConsultAssistantDialog() showConsultAssistantDialog()
} else { } else {
hideConsultAssistantDialog() hideConsultAssistantDialog()
endTime=System.currentTimeMillis()
ActionCountUtils.count(HomeBIConstants.YDL_HOME_DWELL_TIME,(endTime-startTime).toString())
} }
if (isVisibleToUser && isResumed) { if (isVisibleToUser && isResumed) {
onResume() onResume()
...@@ -512,17 +516,10 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -512,17 +516,10 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog() ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog()
} }
override fun onStop() {
super.onStop()
endTime=System.currentTimeMillis()
ActionCountUtils.count(HomeBIConstants.YDL_HOME_DWELL_TIME,(endTime-startTime).toString())
}
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
startTime=System.currentTimeMillis()
if (userVisibleHint) { if (userVisibleHint) {
ActionCountUtils.count(HomeBIConstants.YDL_USER_MAIN_PAGE_VISIT)
if (isFromCreate) { if (isFromCreate) {
isFromCreate = false isFromCreate = false
mPresenter?.loadHomeData() mPresenter?.loadHomeData()
......
...@@ -226,8 +226,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -226,8 +226,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private boolean isOthers; private boolean isOthers;
private MultipleAnswerBean multipleAnswerBean; private MultipleAnswerBean multipleAnswerBean;
private ArrayList<String> answersItemsMap = new ArrayList<>(); private ArrayList<String> answersItemsMap = new ArrayList<>();
private long startTime ; private long startTime=0 ;
private long endTime; private long endTime=0;
@SuppressLint("HandlerLeak") @SuppressLint("HandlerLeak")
private Handler mHandler = new Handler() { private Handler mHandler = new Handler() {
@Override @Override
...@@ -1020,8 +1020,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -1020,8 +1020,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
ActionCountUtils.Companion.count("ydl_user_message_page|ydl_user_message_page_visit");
startTime=System.currentTimeMillis();
messageListPanel.onResume(); messageListPanel.onResume();
NIMClient.getService(MsgService.class).setChattingAccount(sessionId, sessionType); NIMClient.getService(MsgService.class).setChattingAccount(sessionId, sessionType);
getActivity().setVolumeControlStream(AudioManager.STREAM_VOICE_CALL); // 默认使用听筒播放 getActivity().setVolumeControlStream(AudioManager.STREAM_VOICE_CALL); // 默认使用听筒播放
...@@ -1031,6 +1029,21 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -1031,6 +1029,21 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} }
@Override @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() { public void onDestroy() {
comment_banner_view.onDestory(); comment_banner_view.onDestory();
EventBus.getDefault().unregister(this); EventBus.getDefault().unregister(this);
...@@ -1045,12 +1058,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -1045,12 +1058,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} }
} }
@Override
public void onStop() {
super.onStop();
endTime=System.currentTimeMillis();
ActionCountUtils.Companion.count("ydl_user_message_page|ydl_user_message_page_stay_visit",String.valueOf(endTime-startTime));
}
ArrayList<AnswersItem> answersItems = new ArrayList<>(); ArrayList<AnswersItem> answersItems = new ArrayList<>();
public void onEvent(MultipleSelectedEvent event){ public void onEvent(MultipleSelectedEvent event){
......
...@@ -103,8 +103,8 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR ...@@ -103,8 +103,8 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
*/ */
private JumpTextView jtv_test; private JumpTextView jtv_test;
private SwipeRefreshLayout swipeRefreshLayout; private SwipeRefreshLayout swipeRefreshLayout;
private long startTime ; private long startTime=0 ;
private long endTime; private long endTime=0;
@Override @Override
public int layoutResId() { public int layoutResId() {
...@@ -201,14 +201,6 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR ...@@ -201,14 +201,6 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
} }
@Override @Override
public void onStop() {
super.onStop();
endTime=System.currentTimeMillis();
ActionCountUtils.Companion.count(YDL_USER_MY_PAGE_STAY_VISIT,String.valueOf(endTime-startTime));
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) { public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser); super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser && isResumed()) { if (isVisibleToUser && isResumed()) {
...@@ -216,6 +208,8 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR ...@@ -216,6 +208,8 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
ActionCountUtils.Companion.count(YDL_USER_MY_PAGE_VISIT); ActionCountUtils.Companion.count(YDL_USER_MY_PAGE_VISIT);
showConsultAssistantDialog(); showConsultAssistantDialog();
} else { } else {
endTime=System.currentTimeMillis();
ActionCountUtils.Companion.count(YDL_USER_MY_PAGE_STAY_VISIT,String.valueOf(endTime-startTime));
hideConsultAssistantDialog(); hideConsultAssistantDialog();
} }
if (isVisibleToUser && isResumed()) { if (isVisibleToUser && isResumed()) {
......
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