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
cf3f3c0c
Commit
cf3f3c0c
authored
Jan 02, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、推荐小壹名片的问题
2、flutter埋点
parent
9db6f784
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
8 deletions
+29
-8
CustomAttachParser.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
+2
-1
YDLCommonPlugin.kt
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/plugin/YDLCommonPlugin.kt
+27
-7
No files found.
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
View file @
cf3f3c0c
...
...
@@ -75,7 +75,7 @@ public class CustomAttachParser implements MsgAttachmentParser {
//订单状态
attachment
=
new
CustomAttachmentOrderStatus
();
break
;
//修改
//修改
case
CustomAttachmentType
.
MODIFY_TIME
:
attachment
=
new
CustomAttachModifyTime
();
break
;
...
...
@@ -106,6 +106,7 @@ public class CustomAttachParser implements MsgAttachmentParser {
case
CustomAttachmentType
.
TYPE_CUSTOMER_SERVICE
:
//客服小壹名片
attachment
=
new
CustomCustomerServiceCardAttachment
();
break
;
case
CustomAttachmentType
.
TYPE_PUSH_SHARE
:
//分享消息,倾诉推荐,课程,测评,文章
attachment
=
new
CustomAttachmentShareMsg
();
...
...
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/plugin/YDLCommonPlugin.kt
View file @
cf3f3c0c
package
com.channel.ydl_flutter_base.plugin
import
android.content.SharedPreferences
import
android.text.TextUtils
import
com.channel.ydl_flutter_base.BuildConfig
import
com.channel.ydl_flutter_base.base.BaseFlutterFragment
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.data.PlatformDataManager
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.utils.YdlBuryPointUtil
import
com.yidianling.common.tools.RxDeviceTool
import
io.flutter.app.FlutterActivity
import
io.flutter.embedding.engine.FlutterEngine
import
io.flutter.plugin.common.MethodCall
import
io.flutter.plugin.common.MethodChannel
import
io.flutter.view.FlutterView
...
...
@@ -37,10 +35,16 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
companion
object
{
const
val
CHANNEL
:
String
=
"lib/common/channel"
const
val
GETPUBLICPARAMAS
:
String
=
"getPublicParamas"
const
val
ACTION_PUSH_EVENT_TRACKING_TAP
:
String
=
"action_push_event_tracking_tap"
// 点击事件埋点
const
val
ACTION_PUSH_EVENT_TRACKING_PV
:
String
=
"action_push_event_tracking_pv"
//pv埋点
//activity注册
fun
activityRegister
(
activity
:
FlutterActivity
)
{
MethodChannel
(
activity
.
flutterView
,
CHANNEL
).
setMethodCallHandler
(
YDLCommonPlugin
(
activity
))
MethodChannel
(
activity
.
flutterView
,
CHANNEL
).
setMethodCallHandler
(
YDLCommonPlugin
(
activity
)
)
}
//fragment注册
...
...
@@ -63,13 +67,28 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
mMap
[
"ffrom"
]
=
PlatformDataManager
.
getRam
().
getChannelName
()
mMap
[
"version"
]
=
RxDeviceTool
.
getAppVersionName
(
BaseApp
.
getApp
())
mMap
[
"osBuild"
]
=
RxDeviceTool
.
getBuildMANUFACTURER
()
+
","
+
RxDeviceTool
.
getBuildBrandModel
()
+
","
+
RxDeviceTool
.
getOsBuileVersion
()
+
","
+
RxDeviceTool
.
getAppVersionName
(
BaseApp
.
getApp
()
)
RxDeviceTool
.
getBuildMANUFACTURER
()
+
","
+
RxDeviceTool
.
getBuildBrandModel
()
+
","
+
RxDeviceTool
.
getOsBuileVersion
()
+
","
+
RxDeviceTool
.
getAppVersionName
(
BaseApp
.
getApp
()
)
var
res
=
SharedPreferencesEditor
.
getString
(
"flutter_proxy_sp_ip"
)
mMap
[
"proxyIp"
]
=
if
(
TextUtils
.
isEmpty
(
res
))
""
else
res
result
.
success
(
mMap
)
}
ACTION_PUSH_EVENT_TRACKING_TAP
->
{
val
map
=
methodCall
.
arguments
as
HashMap
<*,
*>
val
clickPath
=
map
[
"path"
]
as
String
if
(!
TextUtils
.
isEmpty
(
clickPath
))
{
YdlBuryPointUtil
.
sendClick
(
clickPath
)
}
}
ACTION_PUSH_EVENT_TRACKING_PV
->
{
val
map
=
methodCall
.
arguments
as
HashMap
<*,
*>
val
pvPath
=
map
[
"path"
]
as
String
if
(!
TextUtils
.
isEmpty
(
pvPath
))
{
YdlBuryPointUtil
.
sendPv
(
pvPath
)
}
}
}
}
}
\ No newline at end of file
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