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
63d5c1cd
Commit
63d5c1cd
authored
Sep 08, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/zl/add_maidian' into 'release'
feat:添加埋点 See merge request app_android_lib/YDL-Component!365
parents
856dea64
3a2a6cee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletions
+24
-1
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+15
-0
ConsultantTopAdapter.kt
m-consultant/src/main/java/com/yidianling/consultant/adapter/ConsultantTopAdapter.kt
+6
-0
ConsultBIConstants.kt
m-consultant/src/main/java/com/yidianling/consultant/constants/ConsultBIConstants.kt
+3
-1
No files found.
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
63d5c1cd
...
...
@@ -148,6 +148,21 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
consultant_list
.
layoutManager
=
layoutManager
mConsultantTopAdapter
=
ConsultantTopAdapter
(
requireContext
(),
consultantTopData
)
consultant_list
.
adapter
=
mConsultantTopAdapter
consultant_list
.
addOnScrollListener
(
object
:
RecyclerView
.
OnScrollListener
()
{
override
fun
onScrollStateChanged
(
recyclerView
:
RecyclerView
,
newState
:
Int
)
{
super
.
onScrollStateChanged
(
recyclerView
,
newState
)
if
(
newState
==
RecyclerView
.
SCROLL_STATE_IDLE
)
{
var
firstPostition
=
layoutManager
.
findFirstVisibleItemPosition
()
var
lastPosition
=
layoutManager
.
findLastVisibleItemPosition
()
if
(
firstPostition
!=
-
1
&&
lastPosition
!=
-
1
)
{
val
subList
=
consultantTopData
.
subList
(
firstPostition
,
lastPosition
)
//将一个List转为String字符串并用逗号隔开
val
ids
=
subList
.
joinToString
(
","
)
{
it
.
specialTopicTitle
.
toString
()
}
ActionCountUtils
.
count
(
ConsultBIConstants
.
TOP_TITLE_CLICK
,
ids
)
}
}
}
})
}
override
fun
showImage
(
...
...
m-consultant/src/main/java/com/yidianling/consultant/adapter/ConsultantTopAdapter.kt
View file @
63d5c1cd
...
...
@@ -10,7 +10,9 @@ import androidx.recyclerview.widget.RecyclerView
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.constants.ConsultBIConstants.Companion.TOP_TITLE_CLICK
import
com.yidianling.consultant.model.bean.ConsultantTopBannerBean
import
kotlinx.android.synthetic.main.consultant_top_banner_item.view.*
...
...
@@ -56,6 +58,10 @@ class ConsultantTopAdapter(
.
into
(
holder
.
consult_img
)
holder
.
consult_title
.
text
=
consultList
[
position
].
specialTopicTitle
holder
.
itemView
.
setOnClickListener
{
ActionCountUtils
.
count
(
TOP_TITLE_CLICK
,
consultList
[
position
].
specialTopicTitle
.
toString
()
)
NewH5Activity
.
start
(
context
,
H5Params
(
consultList
[
position
].
specialTopicUrl
.
toString
(),
""
)
...
...
m-consultant/src/main/java/com/yidianling/consultant/constants/ConsultBIConstants.kt
View file @
63d5c1cd
...
...
@@ -26,7 +26,9 @@ class ConsultBIConstants {
const
val
POSITION_YDL_USER_ASSOCIATE_WORD_VISIT
=
"ydl_user_associate_word_visit"
// 联想词曝光position
const
val
POSITION_YDL_USER_ASSOCIATE_WORD_CLICK
=
"ydl_user_associate_word_click"
// 联想词点击position
// 咨询师列表页 banner 点击事件
const
val
POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK
=
"consult_counselor_list_banner_click"
const
val
POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK
=
"consult_counselor_list_banner_click"
const
val
TOP_TITLE_CLICK
=
PART_ID_CONSULT_COUNSELOR_LIST_PAGE
+
"|top_title_click"
}
...
...
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