Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
ce151fae
Commit
ce151fae
authored
Oct 21, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:升级m-dynamic埋点
parent
80d9b9ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
13 deletions
+44
-13
config.gradle
config.gradle
+2
-2
DynamicConstants.kt
m-dynamic/src/main/java/com/yidianling/dynamic/bean/DynamicConstants.kt
+13
-5
TrendsHomeFragment.java
m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.java
+29
-6
No files found.
config.gradle
View file @
ce151fae
...
...
@@ -11,7 +11,7 @@ ext {
"m-user"
:
"0.0.61.74"
,
"m-home"
:
"0.0.22.75"
,
"m-im"
:
"0.0.19.80"
,
"m-dynamic"
:
"0.0.7.
29
"
,
"m-dynamic"
:
"0.0.7.
30
"
,
"m-article"
:
"0.0.0.10"
,
"m-muse"
:
"0.0.28.24"
,
...
...
@@ -94,7 +94,7 @@ ext {
"m-user"
:
"0.0.61.73"
,
"m-home"
:
"0.0.22.75"
,
"m-im"
:
"0.0.19.80"
,
"m-dynamic"
:
"0.0.7.
29
"
,
"m-dynamic"
:
"0.0.7.
30
"
,
"m-article"
:
"0.0.0.8"
,
"m-muse"
:
"0.0.28.24"
,
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/bean/DynamicConstants.kt
View file @
ce151fae
...
...
@@ -4,12 +4,20 @@ import com.ydl.ydlcommon.base.config.HttpConfig
class
DynamicConstants
{
companion
object
{
var
ZHUANJIA
=
HttpConfig
.
YDL_H5
+
"confideDetail?id="
var
WWWXIADAN
=
HttpConfig
.
H5_URL
+
"consult/commit/"
const
val
YDL_USER_ASK_PAGE
=
"ydl_user_ask_page|"
const
val
YDL_USER_ASK_PAGE_STAY_VISIT
=
YDL_USER_ASK_PAGE
+
"ydl_user_ask_page_stay_visit"
const
val
YDL_USER_ASK_PAGE_VISIT
=
YDL_USER_ASK_PAGE
+
"ydl_user_ask_page_visit"
const
val
YDL_USER_THOUGHTS_GROUP_MORE_CLICK
=
YDL_USER_ASK_PAGE
+
"ydl_user_thoughts_group_more_click"
const
val
YDL_USER_THOUGHTS_GROUP_TYPE_CLICK
=
YDL_USER_ASK_PAGE
+
"ydl_user_thoughts_group_type_click"
const
val
YDL_USER_ASK_TYPE_CLICK
=
YDL_USER_ASK_PAGE
+
"ydl_user_ask_type_click"
const
val
YDL_USER_ASK_QUESTIONS_BUTTON_CLICK
=
YDL_USER_ASK_PAGE
+
"ydl_user_ask_questions_button_click"
var
ZHUANJIA
=
HttpConfig
.
YDL_H5
+
"confideDetail?id="
var
WWWXIADAN
=
HttpConfig
.
H5_URL
+
"consult/commit/"
//赞过的动态列表
var
TRENDS_ZAN_LIST_H5
=
HttpConfig
.
H5_URL
+
"active/active-members"
var
TRENDS_ZAN_LIST_H5
=
HttpConfig
.
H5_URL
+
"active/active-members"
//感谢一页请求的数据
const
val
THX_REPLY_PAGE_SIZE
=
20
...
...
@@ -66,7 +74,7 @@ class DynamicConstants {
*/
const
val
MEMBER_REFRESH
=
32103
open
var
TOPIC_DETAIL_H5
=
HttpConfig
.
H5_URL
+
"active/topic-members/"
open
var
TOPIC_DETAIL_H5
=
HttpConfig
.
H5_URL
+
"active/topic-members/"
open
var
TRENF_INFO_SHARE_H5
=
HttpConfig
.
MH5_URL
+
"ask/"
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/trendsHome/TrendsHomeFragment.java
View file @
ce151fae
...
...
@@ -22,6 +22,7 @@ import com.ydl.ydl_image.module.GlideApp;
import
com.ydl.ydlcommon.base.BaseFragment
;
import
com.ydl.ydlcommon.utils.BuryPointUtils
;
import
com.ydl.ydlcommon.utils.ScreenUtil
;
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
;
import
com.yidianling.common.tools.RxDeviceTool
;
import
com.yidianling.common.tools.RxImageTool
;
import
com.yidianling.dynamic.R
;
...
...
@@ -45,6 +46,13 @@ import butterknife.OnClick;
import
butterknife.Unbinder
;
import
jp.wasabeef.glide.transformations.RoundedCornersTransformation
;
import
static
com
.
yidianling
.
dynamic
.
bean
.
DynamicConstants
.
YDL_USER_ASK_PAGE_STAY_VISIT
;
import
static
com
.
yidianling
.
dynamic
.
bean
.
DynamicConstants
.
YDL_USER_ASK_PAGE_VISIT
;
import
static
com
.
yidianling
.
dynamic
.
bean
.
DynamicConstants
.
YDL_USER_ASK_QUESTIONS_BUTTON_CLICK
;
import
static
com
.
yidianling
.
dynamic
.
bean
.
DynamicConstants
.
YDL_USER_ASK_TYPE_CLICK
;
import
static
com
.
yidianling
.
dynamic
.
bean
.
DynamicConstants
.
YDL_USER_THOUGHTS_GROUP_MORE_CLICK
;
import
static
com
.
yidianling
.
dynamic
.
bean
.
DynamicConstants
.
YDL_USER_THOUGHTS_GROUP_TYPE_CLICK
;
/**
* Created by Jim on 2017/9/22 0022.
* 首页问答fragment
...
...
@@ -107,8 +115,6 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
Toolbar
mToolBarTv
;
@BindView
(
R2
.
id
.
v_banner
)
TrendsHomeBannerView
v_banner
;
private
Unbinder
mUnbinder
;
private
TrendsHomePresenter
mPresenter
;
private
Fragment
[]
mFragments
;
...
...
@@ -116,6 +122,8 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
private
long
lastTabClick
=
0
;
private
int
currentPostion
=
-
1
;
String
tab
;
private
long
startTime
;
private
long
endTime
;
public
TrendsHomeFragment
setTab
(
String
tab
)
{
this
.
tab
=
tab
;
...
...
@@ -317,12 +325,16 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
@OnClick
({
R2
.
id
.
trends_tv_mind_more
,
R2
.
id
.
publish_trend_btn
,
R2
.
id
.
item_recommend_tv
,
R2
.
id
.
item_hot_tv
,
R2
.
id
.
item_focus_tv
})
public
void
doClick
(
View
view
)
{
if
(
view
.
getId
()
==
R
.
id
.
item_recommend_tv
)
{
ActionCountUtils
.
Companion
.
count
(
YDL_USER_ASK_TYPE_CLICK
,
"推荐"
);
vpContent
.
setCurrentItem
(
1
);
}
else
if
(
view
.
getId
()
==
R
.
id
.
item_hot_tv
)
{
ActionCountUtils
.
Companion
.
count
(
YDL_USER_ASK_TYPE_CLICK
,
"最新"
);
vpContent
.
setCurrentItem
(
0
);
}
else
if
(
view
.
getId
()
==
R
.
id
.
item_focus_tv
)
{
ActionCountUtils
.
Companion
.
count
(
YDL_USER_ASK_TYPE_CLICK
,
"关注"
);
vpContent
.
setCurrentItem
(
2
);
}
else
if
(
view
.
getId
()
==
R
.
id
.
publish_trend_btn
)
{
ActionCountUtils
.
Companion
.
count
(
YDL_USER_ASK_QUESTIONS_BUTTON_CLICK
);
if
(
DynamicIn
.
INSTANCE
.
loginByOneKeyLogin
(
getActivity
(),
true
))
{
Intent
intent
=
new
Intent
(
getActivity
().
getApplicationContext
(),
PublishTrendActivity
.
class
);
//默认改为今日打卡
...
...
@@ -334,6 +346,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
startActivity
(
intent
);
}
}
else
if
(
view
.
getId
()
==
R
.
id
.
trends_tv_mind_more
)
{
ActionCountUtils
.
Companion
.
count
(
YDL_USER_THOUGHTS_GROUP_MORE_CLICK
);
Intent
intent
=
new
Intent
(
getActivity
(),
AllTopicActivity
.
class
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
startActivity
(
intent
);
...
...
@@ -371,6 +384,15 @@ 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
...
...
@@ -399,7 +421,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
.
into
(
topicRoundIv1
);
trendsTopicTv1
.
setText
(
topicListDatas
.
list
.
get
(
i
).
getTopic_title
());
frlTopicIv1
.
setOnClickListener
(
view
->
{
mindTopicClick
(
topicListDatas
.
list
.
get
(
0
).
getTopic_title
(),
topicListDatas
.
list
.
get
(
0
).
getTopic_id
());
mindTopicClick
(
topicListDatas
.
list
.
get
(
0
).
getTopic_title
(),
topicListDatas
.
list
.
get
(
0
).
getTopic_id
()
,
trendsTopicTv1
.
getText
().
toString
()
);
});
break
;
case
1
:
...
...
@@ -410,7 +432,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
.
into
(
topicRoundIv2
);
trendsTopicTv2
.
setText
(
topicListDatas
.
list
.
get
(
i
).
getTopic_title
());
frlTopicIv2
.
setOnClickListener
(
view
->
{
mindTopicClick
(
topicListDatas
.
list
.
get
(
1
).
getTopic_title
(),
topicListDatas
.
list
.
get
(
1
).
getTopic_id
());
mindTopicClick
(
topicListDatas
.
list
.
get
(
1
).
getTopic_title
(),
topicListDatas
.
list
.
get
(
1
).
getTopic_id
()
,
trendsTopicTv2
.
getText
().
toString
()
);
});
break
;
case
2
:
...
...
@@ -421,7 +443,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
.
into
(
topicRoundIv3
);
trendsTopicTv3
.
setText
(
topicListDatas
.
list
.
get
(
i
).
getTopic_title
());
frlTopicIv3
.
setOnClickListener
(
view
->
{
mindTopicClick
(
topicListDatas
.
list
.
get
(
2
).
getTopic_title
(),
topicListDatas
.
list
.
get
(
2
).
getTopic_id
());
mindTopicClick
(
topicListDatas
.
list
.
get
(
2
).
getTopic_title
(),
topicListDatas
.
list
.
get
(
2
).
getTopic_id
()
,
trendsTopicTv3
.
getText
().
toString
()
);
});
break
;
}
...
...
@@ -430,11 +452,12 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
}
private
void
mindTopicClick
(
String
title
,
String
id
)
{
private
void
mindTopicClick
(
String
title
,
String
id
,
String
imgName
)
{
BuryPointUtils
.
getInstance
().
createMap
()
.
put
(
"theme_name"
,
title
)
.
put
(
"theme_ID"
,
id
)
.
burryPoint
(
"Theme_click"
);
ActionCountUtils
.
Companion
.
count
(
YDL_USER_THOUGHTS_GROUP_TYPE_CLICK
,
imgName
);
Intent
intent
=
new
Intent
();
intent
.
setClass
(
getActivity
(),
TopicDetailActivity
.
class
);
intent
.
putExtra
(
"topic_id"
,
id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment