Commit 9691b71b by 霍志良

feat:我的埋点修改

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