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
5a098f99
Commit
5a098f99
authored
May 18, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测评页面埋点事件
parent
0993f164
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
TestPlugin.kt
m-tests/src/main/java/com/yidianling/tests/home/plugin/TestPlugin.kt
+9
-8
YDLCommonPlugin.kt
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/plugin/YDLCommonPlugin.kt
+11
-0
No files found.
m-tests/src/main/java/com/yidianling/tests/home/plugin/TestPlugin.kt
View file @
5a098f99
...
...
@@ -39,6 +39,7 @@ class TestPlugin : MethodChannel.MethodCallHandler {
const
val
TEST_LIST_ITEM_CLICK
=
"testListItemClick"
// 测评列表点击
const
val
LOOK_ALL_TEST
=
"lookAllTest"
// 查看全部测评
const
val
IS_HIDE_LEFT_BACK
=
"hideLeftBackLL"
// 是否隐藏标题左侧布局
var
isHideLeftBack
=
false
// 是否隐藏标题左侧布局
...
...
@@ -56,17 +57,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
)
//
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_RETURN_CLICK)
mActivity
?.
finish
()
}
GO_SEARCH
->
{
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_SEARCH_CLICK
)
//
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
)
//
ActionCountUtils.count(TestBIConstants.YDL_TEST__MAIN_MY_TEST_CLICK)
if
(!
TestsIn
.
isLogin
())
{
//如果未登录 走登录逻辑
mActivity
?.
startActivity
(
TestsIn
.
loginWayIntent
(
mActivity
!!
))
...
...
@@ -83,7 +84,7 @@ class TestPlugin : MethodChannel.MethodCallHandler {
linkUrl
?.
let
{
link
(
linkUrl
)
}
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_BANNER_CLICK
,
linkUrl
?:
""
)
//
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_BANNER_CLICK,linkUrl?:"")
}
CATEGORY_CLICK
->
{
...
...
@@ -91,12 +92,12 @@ class TestPlugin : MethodChannel.MethodCallHandler {
var
tabName
:
String
=
methodCall
.
argument
<
String
>(
"tabName"
)
?:
""
TestCategoryListActivity
.
start
(
mActivity
!!
,
tabName
)
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_ICON_CLICK
,
tabName
)
//
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_ICON_CLICK,tabName)
}
}
ADVERT_CLICK
->
{
ActionCountUtils
.
count
(
TestBIConstants
.
YDL_TEST_MAIN_SCROLL_BAR_CLICK
)
//
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_SCROLL_BAR_CLICK)
var
linkUrl
:
String
?
=
methodCall
.
argument
<
String
>(
"linkUrl"
)
linkUrl
?.
let
{
...
...
@@ -105,14 +106,14 @@ 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
?:
""
)
//
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
)
//
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_VIEW_ALL_CLICK)
mActivity
?.
let
{
TestCategoryListActivity
.
start
(
mActivity
!!
)
...
...
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/plugin/YDLCommonPlugin.kt
View file @
5a098f99
...
...
@@ -16,6 +16,7 @@ import com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.YdlBuryPointUtil
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.RxDeviceTool
import
de.greenrobot.event.EventBus
import
io.flutter.app.FlutterActivity
...
...
@@ -53,6 +54,7 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
const
val
ACTION_GET_SUB_CHANNEL_THEME
:
String
=
"action_page_layout_params"
//获取子频道主页样式
const
val
REQUESTMAINSCROLLFOCUS
:
String
=
"requestMainScrollFocus"
const
val
RELEASEMAINSCROLLFOCUS
:
String
=
"releaseMainScrollFocus"
const
val
ACTION_HTTP_BURIED_POINT
:
String
=
"action_http_buried_point"
//activity注册
fun
activityRegister
(
activity
:
FlutterActivity
)
{
...
...
@@ -182,6 +184,15 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
val
ffrom
=
PlatformDataManager
.
getRam
().
getChannelName
()
result
.
success
(
"$packageName,$ffrom"
)
}
ACTION_HTTP_BURIED_POINT
->{
val
map
=
methodCall
.
arguments
as
HashMap
<*,
*>
val
position
=
map
[
"position"
]
as
String
val
partId
=
map
[
"partId"
]
as
String
val
sign
=
map
[
"sign"
]
as
String
ActionCountUtils
.
count
(
"$partId|$position"
,
sign
)
}
}
}
...
...
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