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
eb159ccf
Commit
eb159ccf
authored
Oct 26, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:升级m-im埋点
parent
4337e855
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
config.gradle
config.gradle
+2
-2
NewMultiMessageFragment.kt
m-im/src/main/java/com/yidianling/im/ui/page/NewMultiMessageFragment.kt
+15
-0
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+6
-1
No files found.
config.gradle
View file @
eb159ccf
...
...
@@ -10,7 +10,7 @@ ext {
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.61.74"
,
"m-home"
:
"0.0.22.75"
,
"m-im"
:
"0.0.19.
80
"
,
"m-im"
:
"0.0.19.
91
"
,
"m-dynamic"
:
"0.0.7.30"
,
"m-article"
:
"0.0.0.10"
,
...
...
@@ -93,7 +93,7 @@ ext {
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.61.73"
,
"m-home"
:
"0.0.22.75"
,
"m-im"
:
"0.0.19.
80
"
,
"m-im"
:
"0.0.19.
91
"
,
"m-dynamic"
:
"0.0.7.30"
,
"m-article"
:
"0.0.0.8"
,
...
...
m-im/src/main/java/com/yidianling/im/ui/page/NewMultiMessageFragment.kt
View file @
eb159ccf
...
...
@@ -16,6 +16,7 @@ import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import
com.ydl.ydlcommon.base.BaseFragment
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.R
import
com.yidianling.im.api.event.ImLogoutEvent
...
...
@@ -43,6 +44,7 @@ import io.reactivex.Observable
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.im_new_multi_message_fragment.*
import
kotlinx.android.synthetic.main.im_nim_contact_text_item.view.*
import
java.util.concurrent.TimeUnit
/**
...
...
@@ -244,6 +246,7 @@ class NewMultiMessageFragment : BaseFragment() {
*/
private
fun
initMore
()
{
ll_more
.
setOnClickListener
{
ActionCountUtils
.
count
(
"ydl_user_message_page|ydl_user_message_more_click"
)
if
(!
ImIn
.
isLogin
())
{
ToastUtil
.
toastShort
(
"请登录后再试"
)
}
else
{
...
...
@@ -323,6 +326,7 @@ class NewMultiMessageFragment : BaseFragment() {
*/
private
fun
initKefu
()
{
ll_kefu
.
setOnClickListener
{
ActionCountUtils
.
count
(
"ydl_user_message_page|ydl_user_message_xiaoyi_click"
)
if
(
ImIn
.
isLogin
())
{
SessionHelper
.
startP2PSession
(
context
,
-
1
,
ImConstants
.
KEFUXIAOYI
,
null
,
P2PCustomActionHandlerImpl
(
ImConstants
.
KEFUXIAOYI
,
"客服小壹"
,
ImConstants
.
KEFUXIAOYI
)
...
...
@@ -364,6 +368,17 @@ class NewMultiMessageFragment : BaseFragment() {
@SuppressLint
(
"CheckResult"
)
override
fun
onPageSelected
(
index
:
Int
)
{
when
(
index
)
{
0
->
{
ActionCountUtils
.
count
(
"ydl_user_message_page|ydl_user_message_type_click"
,
chat_btn
.
text
.
toString
())
}
1
->
{
ActionCountUtils
.
count
(
"ydl_user_message_page|ydl_user_message_type_click"
,
communite_btn
.
text
.
toString
())
}
else
->
{
ActionCountUtils
.
count
(
"ydl_user_message_page|ydl_user_message_type_click"
,
notification_btn
.
text
.
toString
())
}
}
setSelectTab
(
index
)
// 这边延迟300毫秒加载,是为了不让动画进行时有卡顿
Observable
.
timer
(
300
,
TimeUnit
.
MILLISECONDS
).
subscribeOn
(
Schedulers
.
io
())
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
eb159ccf
...
...
@@ -226,7 +226,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private
boolean
isOthers
;
private
MultipleAnswerBean
multipleAnswerBean
;
private
ArrayList
<
String
>
answersItemsMap
=
new
ArrayList
<>();
private
long
startTime
;
private
long
endTime
;
@SuppressLint
(
"HandlerLeak"
)
private
Handler
mHandler
=
new
Handler
()
{
@Override
...
...
@@ -1019,6 +1020,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@Override
public
void
onResume
()
{
super
.
onResume
();
ActionCountUtils
.
Companion
.
count
(
"ydl_user_message_page|ydl_user_message_page_visit"
);
startTime
=
System
.
currentTimeMillis
();
messageListPanel
.
onResume
();
NIMClient
.
getService
(
MsgService
.
class
).
setChattingAccount
(
sessionId
,
sessionType
);
getActivity
().
setVolumeControlStream
(
AudioManager
.
STREAM_VOICE_CALL
);
// 默认使用听筒播放
...
...
@@ -1045,6 +1048,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@Override
public
void
onStop
()
{
super
.
onStop
();
endTime
=
System
.
currentTimeMillis
();
ActionCountUtils
.
Companion
.
count
(
"ydl_user_message_page|ydl_user_message_page_stay_visit"
,
String
.
valueOf
(
endTime
-
startTime
));
}
ArrayList
<
AnswersItem
>
answersItems
=
new
ArrayList
<>();
...
...
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