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
1b4ccdf4
Commit
1b4ccdf4
authored
May 26, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 埋点完成
parent
e8c6a1ea
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
102 additions
and
3 deletions
+102
-3
MeditationTypeAdapter.kt
m-home/src/main/java/com/yidianling/home/MeditationTypeAdapter.kt
+13
-0
MeditationViewPagerAdapter.kt
m-home/src/main/java/com/yidianling/home/MeditationViewPagerAdapter.kt
+1
-0
HomeBIConstants.kt
m-home/src/main/java/com/yidianling/home/constants/HomeBIConstants.kt
+6
-0
HomeMuseView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeMuseView.kt
+8
-3
PlayMeditationActivity.kt
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
+0
-0
MuseBIConstants.kt
m-muse/src/main/java/com/yidianling/muse/constants/MuseBIConstants.kt
+60
-0
MeditationWindowService.kt
m-muse/src/main/java/com/yidianling/muse/service/MeditationWindowService.kt
+13
-0
MineFragment.kt
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
+1
-0
No files found.
m-home/src/main/java/com/yidianling/home/MeditationTypeAdapter.kt
View file @
1b4ccdf4
...
...
@@ -16,6 +16,8 @@ import com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.home.constants.HomeBIConstants
import
com.yidianling.home.model.bean.MeditationModuleBean
import
com.yidianling.user.api.service.IUserService
import
kotlinx.android.synthetic.ydl.home_fragment.*
...
...
@@ -26,6 +28,7 @@ class MeditationTypeAdapter(
private
val
moreLink
:
String
?,
private
val
homeLink
:
String
?=
null
,
private
val
cateId
:
Long
?=
null
,
private
val
buried
:
String
?=
null
,
private
val
mark
:
Int
?=
null
,
private
val
meditationType
:
Int
?
=
null
)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
...
...
@@ -64,6 +67,13 @@ class MeditationTypeAdapter(
}
holder
.
cvLayout
?.
setOnClickListener
{
ActionCountUtils
.
baiDuCountSign3
(
HomeBIConstants
.
YDL_USER_MAIN_PAGE_MUSE
,
HomeBIConstants
.
YDL_HOME_MEDITATION_CLICK
,
buried
?:
""
,
(
position
+
1
).
toString
(),
""
)
if
(
meditationType
==
0
){
if
(
Utils
.
isFastClick
())
{
//防止连击
...
...
@@ -103,6 +113,9 @@ class MeditationTypeAdapter(
//防止连击
return
@setOnClickListener
}
//冥想助眠更多点击事件
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_HOME_MEDITATION_VOICE_MORE_CLICK
,
buried
?:
""
)
val
moreLink
=
"${moreLink}mark=$mark&cateId=$cateId"
if
(!
moreLink
.
isNullOrBlank
())
{
NewH5Activity
.
start
(
context
,
H5Params
(
moreLink
,
null
))
...
...
m-home/src/main/java/com/yidianling/home/MeditationViewPagerAdapter.kt
View file @
1b4ccdf4
...
...
@@ -27,6 +27,7 @@ class MeditationViewPagerAdapter(private val context: Context, private val data:
moreLink
=
it
.
lowerFloorMore
?:
""
,
homeLink
=
it
.
mditationDetailUrl
,
cateId
=
it
.
cateId
,
buried
=
it
.
buried
,
mark
=
it
.
mark
,
meditationType
=
it
.
meditionType
)
}
...
...
m-home/src/main/java/com/yidianling/home/constants/HomeBIConstants.kt
View file @
1b4ccdf4
...
...
@@ -41,7 +41,13 @@ class HomeBIConstants {
const
val
YDL_HOME_ZHUMIANICON
:
String
=
YDL_USER_MAIN_PAGE
+
"ydl_user_sleep_aid_type_click"
// 首页_助眠_icon
const
val
YDL_HOME_SEARCH_TAG
:
String
=
YDL_USER_MAIN_PAGE
+
"ydl_user_search_tag"
// 首页_定制咨询点击tag
const
val
YDL_HOME_POPUPWINDOWS_PAGE_POPUP
:
String
=
YDL_USER_MAIN_PAGE
+
"popupwindows_page_popup"
// 首页弹窗页面弹出事件(99元3小时弹出事件)
//首页_冥想(ydl_user_main_page)
const
val
YDL_USER_MAIN_PAGE_MUSE
:
String
=
"ydl_user_main_page"
//壹点灵用户版首页 partId
const
val
YDL_HOME_MEDITATION_MORE_CLICK
:
String
=
YDL_USER_MAIN_PAGE
+
"main_meditation_more_click"
// 冥想助眠更多点击事件
const
val
YDL_HOME_MEDITATION_SUBJECT_CLICK
:
String
=
YDL_USER_MAIN_PAGE
+
"main_meditation_subject_click"
// 冥想|声音|睡眠点击事件
const
val
YDL_HOME_MEDITATION_VOICE_MORE_CLICK
:
String
=
YDL_USER_MAIN_PAGE
+
"main_meditation_voice_more_click"
// 冥想|声音|睡眠_更多点击事件
const
val
YDL_HOME_MEDITATION_CLICK
:
String
=
"main_meditation_meditation_click"
// 冥想_声音点击事件
}
...
...
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeMuseView.kt
View file @
1b4ccdf4
...
...
@@ -12,16 +12,15 @@ import android.view.View
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
androidx.recyclerview.widget.RecyclerView
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.tabs.TabLayoutMediator
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.home.MeditationViewPagerAdapter
import
com.yidianling.home.R
import
com.yidianling.home.constants.HomeBIConstants
import
com.yidianling.home.constract.HomeViewConfig
import
com.yidianling.home.event.IHomeEvent
import
com.yidianling.home.model.bean.MeditationModuleBean
...
...
@@ -68,6 +67,8 @@ class HomeMuseView(private val mContext: Context, private var homeEvent: IHomeEv
//防止连击
return
@setOnClickListener
}
//冥想助眠更多点击事件
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_HOME_MEDITATION_MORE_CLICK
)
if
(!
moreLink
.
isNullOrBlank
())
{
NewH5Activity
.
start
(
context
,
H5Params
(
moreLink
,
null
))
}
...
...
@@ -127,6 +128,10 @@ class HomeMuseView(private val mContext: Context, private var homeEvent: IHomeEv
tab_layout
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
{
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
//冥想|声音|睡眠点击事件
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_HOME_MEDITATION_SUBJECT_CLICK
,
tab
?.
let
{
bean
?.
mditationListResponse
?.
get
(
it
.
position
)
?.
buried
}
?:
""
)
var
text
:
String
?
=
tab
?.
text
.
toString
().
trim
()
val
spStr
=
SpannableString
(
text
)
val
styleSpan
=
StyleSpan
(
Typeface
.
BOLD
)
...
...
m-muse/src/main/java/com/yidianling/muse/activity/PlayMeditationActivity.kt
View file @
1b4ccdf4
This diff is collapsed.
Click to expand it.
m-muse/src/main/java/com/yidianling/muse/constants/MuseBIConstants.kt
0 → 100644
View file @
1b4ccdf4
package
com.yidianling.muse.constants
/**
* @author liunpeng
* */
class
MuseBIConstants
{
companion
object
{
//音乐播放页(meditation_music_play_page)
const
val
YDL_MUSE_MEDITATION_MUSIC_PLAY_PAGE
:
String
=
"meditation_music_play_page"
//音乐播放页(meditation_music_play_page)
const
val
YDL_MUSE_PLAY_PACK_CLICK
:
String
=
"music_play_pack_click"
//收起点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_CLOSE_CLICK
:
String
=
"music_play_close_click"
//关闭点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_COLLECT_CLICK
:
String
=
"music_play_collect_click"
//收藏点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_SHARE_CLICK
:
String
=
"music_play_share_click"
//分享点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_IOC_CLICK
:
String
=
"music_play_ioc_click"
//定时 ioc点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_PROGRESS_CLICK
:
String
=
"music_play_progress_click"
//进度条点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_SPEED_CLICK
:
String
=
"music_play_speed_click"
//快进点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_REW_CLICK
:
String
=
"music_play_rew_click"
//快退点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_NEXT_CLICK
:
String
=
"music_play_next_click"
//下一个点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_LAST_CLICK
:
String
=
"music_play_last_click"
//上一个点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_PAUSE_CLICK
:
String
=
"music_play_pause_click"
//暂停点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_PLAY_CLICK
:
String
=
"music_play_play_click"
//播放点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_PAGE_VISIT
:
String
=
"music_play_page_visit"
//曝光事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_CHANGE_CLICK
:
String
=
"music_play_change_click"
//切换音频点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
const
val
YDL_MUSE_PLAY_LIST_CLICK
:
String
=
"music_play_list_click"
//列表点击事件 sign1: 内容标题 sign2(传入字符串): meditation(冥想播放), voice(轻音乐播放), sleep(睡眠播放)
//悬浮窗(meditation_floating_window_play)
private
const
val
YDL_MUSE_MEDITATION_FLOATING_WINDOW
:
String
=
"meditation_floating_window_play|"
//悬浮窗
const
val
YDL_MUSE_MEDITATION_WINDOW_PLAY_CLICK
:
String
=
YDL_MUSE_MEDITATION_FLOATING_WINDOW
+
"meditation_floating_window_play_click"
//悬浮窗播放点击事件
const
val
YDL_MUSE_MEDITATION_WINDOW_PAUSE_CLICK
:
String
=
YDL_MUSE_MEDITATION_FLOATING_WINDOW
+
"meditation_floating_window_pause_click"
//悬浮窗暂停点击事件
const
val
YDL_MUSE_MEDITATION_WINDOW_CLOSE_CLICK
:
String
=
YDL_MUSE_MEDITATION_FLOATING_WINDOW
+
"meditation_floating_window_close_click"
//悬浮窗关闭点击事件
const
val
YDL_MUSE_MEDITATION_WINDOW_CLICK
:
String
=
YDL_MUSE_MEDITATION_FLOATING_WINDOW
+
"meditation_floating_window_click"
//悬浮窗播放区域点击 事件
}
}
\ No newline at end of file
m-muse/src/main/java/com/yidianling/muse/service/MeditationWindowService.kt
View file @
1b4ccdf4
...
...
@@ -21,10 +21,12 @@ import androidx.core.app.NotificationCompat
import
androidx.lifecycle.LifecycleService
import
com.bumptech.glide.Glide
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.home.http.MuseHttp
import
com.yidianling.muse.R
import
com.yidianling.muse.activity.PlayMeditationActivity
import
com.yidianling.muse.bean.MeditationPlayModuleBean
import
com.yidianling.muse.constants.MuseBIConstants
import
com.yidianling.muse.event.MeditationFloatEvent
import
com.yidianling.muse.helper.MediaPlayerManager
import
de.greenrobot.event.EventBus
...
...
@@ -117,6 +119,9 @@ class MeditationWindowService : LifecycleService() {
private
fun
updateFloatView
(
meditation
:
MeditationPlayModuleBean
.
MeditationDetail
)
{
mMediaPlayer
=
MediaPlayerManager
.
getInstance
(
this
)
?.
getMediaPlayer
()
floatRootView
?.
setOnClickListener
{
//悬浮窗暂停点击事件
ActionCountUtils
.
count
(
MuseBIConstants
.
YDL_MUSE_MEDITATION_WINDOW_CLICK
,
""
)
val
intent
=
Intent
(
this
,
PlayMeditationActivity
::
class
.
java
)
intent
.
putExtra
(
"MEDIA_ID"
,
meditation
.
mediaId
)
intent
.
putExtra
(
"MEDITATION_ID"
,
meditation
.
meditationId
)
...
...
@@ -143,6 +148,9 @@ class MeditationWindowService : LifecycleService() {
ivPlayOrPause
?.
setOnClickListener
{
if
(
mMediaPlayer
?.
isPlaying
==
true
)
{
//悬浮窗暂停点击事件
ActionCountUtils
.
count
(
MuseBIConstants
.
YDL_MUSE_MEDITATION_WINDOW_PAUSE_CLICK
,
""
)
MediaPlayerManager
.
getInstance
(
this
)
?.
pause
()
if
(
meditation
.
meditationId
!=
null
&&
meditation
.
mediaId
!=
null
)
{
MuseHttp
.
getInstance
().
postMeditationPlayRecord
(
...
...
@@ -164,6 +172,8 @@ class MeditationWindowService : LifecycleService() {
})
}
}
else
{
//悬浮窗播放点击事件
ActionCountUtils
.
count
(
MuseBIConstants
.
YDL_MUSE_MEDITATION_WINDOW_PLAY_CLICK
,
""
)
MediaPlayerManager
.
getInstance
(
this
)
?.
play
()
}
if
(
mMediaPlayer
?.
isPlaying
==
true
)
{
...
...
@@ -194,6 +204,9 @@ class MeditationWindowService : LifecycleService() {
}
ivClose
?.
setOnClickListener
{
//悬浮窗关闭点击事件
ActionCountUtils
.
count
(
MuseBIConstants
.
YDL_MUSE_MEDITATION_WINDOW_CLOSE_CLICK
,
""
)
postPlayRecord
(
1
,
(
ivProgress
?.
curProcess
?.
div
(
1000.00
))
?.
roundToInt
()
?:
0
,
0
,
...
...
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
View file @
1b4ccdf4
...
...
@@ -492,6 +492,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
jtv_test
?.
postDelayed
({
YdlBuryPointUtil
.
sendPv
(
"PvEvent"
)
},
300
)
jtv_test
?.
postDelayed
({
YdlBuryPointUtil
.
sendClick
(
"ClickEvent"
)
},
500
)
}
else
if
(
id
==
R
.
id
.
ll_meditation
)
{
//冥想
count
(
UserMyPageEvent
.
YDL_USER_MY_MIDDLE_TYPE_CLICK
,
"冥想"
)
val
h5Params3
=
H5Params
(
MH5_URL
+
"meditation?hideNavBar=1"
,
null
)
NewH5Activity
.
start
(
activity
,
h5Params3
)
}
...
...
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