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
0993f164
Commit
0993f164
authored
May 18, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测评页面埋点事件
parent
50e89e04
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
0 deletions
+54
-0
NewTestHomeActivity.kt
m-tests/src/main/java/com/yidianling/tests/home/NewTestHomeActivity.kt
+8
-0
TestBIConstants.kt
m-tests/src/main/java/com/yidianling/tests/home/config/TestBIConstants.kt
+29
-0
TestPlugin.kt
m-tests/src/main/java/com/yidianling/tests/home/plugin/TestPlugin.kt
+17
-0
No files found.
m-tests/src/main/java/com/yidianling/tests/home/NewTestHomeActivity.kt
View file @
0993f164
...
...
@@ -2,6 +2,8 @@ package com.yidianling.tests.home
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.channel.ydl_flutter_base.base.BaseFlutterActivity
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.tests.home.config.TestBIConstants
import
com.yidianling.tests.home.plugin.TestPlugin
import
org.json.JSONObject
...
...
@@ -18,4 +20,9 @@ class NewTestHomeActivity : BaseFlutterActivity() {
override
fun
initChannelPlugin
(
jsonObject
:
JSONObject
)
{
TestPlugin
.
Companion
.
register
(
this
)
}
override
fun
onResume
()
{
super
.
onResume
()
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_PAGE_VISIT
)
}
}
\ No newline at end of file
m-tests/src/main/java/com/yidianling/tests/home/config/TestBIConstants.kt
0 → 100644
View file @
0993f164
package
com.yidianling.tests.home.config
/**
* Created by xj on 2019/7/1.
*/
class
TestBIConstants
{
companion
object
{
private
const
val
YDL_TEST_MAI_PAGE
:
String
=
"test_mai_page|"
//壹点灵用户版首页 partId
const
val
YDL_TEST__MAIN_MY_TEST_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_my_test_click"
//cs-我的测评
const
val
YDL_TEST_MAIN_SEARCH_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_search_click"
//cs-测试搜索
const
val
YDL_TEST_MAIN_RETURN_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_return_click"
//cs-返回首页
const
val
YDL_TEST_MAIN_BANNER_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_banner_click"
//cs-banner
const
val
YDL_TEST_MAIN_ICON_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_icon_click"
//cs-icon
const
val
YDL_TEST_MAIN_SCROLL_BAR_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_scroll_bar_click"
//cs-滚动栏
const
val
YDL_TEST_MAIN_RECOMMEND_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_recommend_click"
//cs-推荐
const
val
YDL_TEST_MAIN_CHANGE_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_change_click"
//cs-换一换
const
val
YDL_TEST_MAIN_FEATURED_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_featured_click"
//cs-精选测试
const
val
YDL_TEST_MAIN_TO_LIST_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_to_list_click"
//cs-to列表
const
val
YDL_TEST_MAIN_VIEW_ALL_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_view_all_click"
//cs-查看全部
const
val
YDL_TEST_MAIN_PAGE_VISIT
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_page_visit"
//cs-页面浏览事件
const
val
YDL_TEST_MAIN_ALL_TEST_LIST_CLICK
:
String
=
YDL_TEST_MAI_PAGE
+
"test_main_all_test_list_click"
//cs-下方所有测试题列表点击
}
}
\ No newline at end of file
m-tests/src/main/java/com/yidianling/tests/home/plugin/TestPlugin.kt
View file @
0993f164
...
...
@@ -9,6 +9,8 @@ import com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.tests.home.config.TestBIConstants
import
com.yidianling.tests.list.view.TestCategoryListActivity
import
com.yidianling.tests.router.TestsIn
import
com.yidianling.tests.search.TestSearchActivity
...
...
@@ -54,14 +56,17 @@ class TestPlugin : MethodChannel.MethodCallHandler {
override
fun
onMethodCall
(
methodCall
:
MethodCall
,
result
:
MethodChannel
.
Result
)
{
when
(
methodCall
.
method
)
{
GO_BACK
->
{
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_RETURN_CLICK
)
mActivity
?.
finish
()
}
GO_SEARCH
->
{
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_SEARCH_CLICK
)
mActivity
?.
let
{
TestSearchActivity
.
start
(
mActivity
!!
)
}
}
GO_MY_TESTS
->
{
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST__MAIN_MY_TEST_CLICK
)
if
(!
TestsIn
.
isLogin
())
{
//如果未登录 走登录逻辑
mActivity
?.
startActivity
(
TestsIn
.
loginWayIntent
(
mActivity
!!
))
...
...
@@ -73,18 +78,26 @@ class TestPlugin : MethodChannel.MethodCallHandler {
}
}
BANNER_CLICK
->
{
var
linkUrl
:
String
?
=
methodCall
.
argument
<
String
>(
"linkUrl"
)
linkUrl
?.
let
{
link
(
linkUrl
)
}
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_BANNER_CLICK
,
linkUrl
?:
""
)
}
CATEGORY_CLICK
->
{
mActivity
?.
let
{
var
tabName
:
String
=
methodCall
.
argument
<
String
>(
"tabName"
)
?:
""
TestCategoryListActivity
.
start
(
mActivity
!!
,
tabName
)
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_ICON_CLICK
,
tabName
)
}
}
ADVERT_CLICK
->
{
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_SCROLL_BAR_CLICK
)
var
linkUrl
:
String
?
=
methodCall
.
argument
<
String
>(
"linkUrl"
)
linkUrl
?.
let
{
link
(
linkUrl
)
...
...
@@ -92,11 +105,15 @@ class TestPlugin : MethodChannel.MethodCallHandler {
}
TEST_LIST_ITEM_CLICK
->
{
var
linkUrl
:
String
?
=
methodCall
.
arguments
.
toString
()
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_ALL_TEST_LIST_CLICK
,
linkUrl
?:
""
)
linkUrl
?.
let
{
link
(
linkUrl
)
}
}
LOOK_ALL_TEST
->
{
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_VIEW_ALL_CLICK
)
mActivity
?.
let
{
TestCategoryListActivity
.
start
(
mActivity
!!
)
}
...
...
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