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
0faf5ec0
Commit
0faf5ec0
authored
May 28, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: bug fix
parent
7f36c40d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
6 deletions
+54
-6
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+1
-1
ConfideWebServiceImpl.kt
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfideWebServiceImpl.kt
+42
-2
IntroAdapter.kt
m-confide/src/main/java/com/ydl/confide/intro/IntroAdapter.kt
+4
-2
ItemIntroHolder.kt
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
+7
-1
No files found.
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
0faf5ec0
...
...
@@ -250,7 +250,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
override
fun
onScrolled
(
recyclerView
:
RecyclerView
,
dx
:
Int
,
dy
:
Int
)
{
super
.
onScrolled
(
recyclerView
,
dx
,
dy
)
if
(
dy
>
=
0
){
if
(
dy
<
=
0
){
//向上滚动恢复显示
quick_consult_card
.
visibility
=
View
.
VISIBLE
}
else
{
...
...
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfideWebServiceImpl.kt
View file @
0faf5ec0
...
...
@@ -2,6 +2,7 @@ package com.ydl.confide.home.modular.service
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Context
import
android.content.Intent
import
android.net.Uri
import
android.text.TextUtils
...
...
@@ -26,6 +27,7 @@ import com.yidianling.ydl_pay.pay.payDialog.CallBack
import
com.yidianling.ydl_pay.pay.payDialog.ConfidePayParams
import
com.yidianling.ydl_pay.pay.payDialog.PayDialog
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.disposables.Disposable
import
io.reactivex.schedulers.Schedulers
/**
...
...
@@ -157,9 +159,47 @@ class ConfideWebServiceImpl {
})
}
fun
connectionJava
(
id
:
Int
,
type
:
Int
,
activity
:
Context
,
callType
:
String
?,
otherwise
:
(()
->
Unit
)?
=
null
):
Disposable
{
Loading
.
show
(
activity
)
return
ConfideHomeDataManager
.
getHttp
()
.
connectionJava
(
ConnectParamJava
(
""
+
id
,
""
+
type
,
callType
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
Loading
.
close
()
if
(
"200"
==
it
.
code
&&
0
==
it
.
data
?.
dialDetail
?.
dialStatus
&&
it
.
data
?.
dialDetail
?.
callConnectType
==
3
)
{
it
.
data
?.
dialDetail
?.
agoraExpertInfo
?:
return
@subscribe
if
(!
YDLavManager
.
isOnlineRtm
)
{
// 判断如果账号在其它设备登录rtm是否在线
ToastUtil
.
toastShort
(
"网络通话错误代码001"
)
return
@subscribe
}
callAgora
(
activity
,
id
,
it
.
data
!!
.
dialDetail
!!
.
agoraExpertInfo
!!
,
it
.
data
.
callId
?:
"0"
,
it
.
data
.
listenOrderId
?:
0L
,
null
,
it
.
data
.
isShowAxb
,
it
.
data
?.
dialDetail
?.
dialStatus
.
toString
()
)
}
else
{
otherwise
?.
invoke
()
}
},
{
ToastHelper
.
show
(
it
.
message
?:
"连接失败"
)
})
}
//启动声网电话
private
fun
callAgora
(
activity
:
Activity
,
activity
:
Context
,
confideId
:
Int
,
expertInfo
:
ExpertInfoBean
,
call_id
:
String
,
...
...
@@ -182,7 +222,7 @@ class ConfideWebServiceImpl {
expertInfo
.
remainingTime
=
ExpertInfoBean
.
ListenRemainingTime
(
expertInfo
.
totalDuration
);
}
YDLavManager
.
instances
.
callEventSave
(
"10"
,
"用户点击拨打"
,
expertInfo
.
channelId
,
"7"
)
YDLavManager
.
instances
.
callEventSave
(
"10"
,
"用户点击拨打"
,
expertInfo
.
channelId
,
"7"
)
Loading
.
close
()
ARouter
.
getInstance
().
build
(
"/av/AudioHomeActivity"
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_HEAD_URL
,
expertInfo
.
expertHeadUrl
)
...
...
m-confide/src/main/java/com/ydl/confide/intro/IntroAdapter.kt
View file @
0faf5ec0
...
...
@@ -160,8 +160,10 @@ internal class IntroAdapter(
@OnLifecycleEvent
(
Lifecycle
.
Event
.
ON_PAUSE
)
private
fun
onPause
()
{
val
ijkVideoView
=
videoViews
[
curPos
]
ijkVideoView
?.
pause
()
if
(
data
[
curPos
].
isVideo
)
{
val
ijkVideoView
=
videoViews
[
curPos
]
ijkVideoView
?.
pause
()
}
}
fun
onSelect
(
position
:
Int
)
{
...
...
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
View file @
0faf5ec0
...
...
@@ -15,6 +15,7 @@ import com.ydl.confide.api.ConfideRoute
import
com.ydl.confide.databinding.ItemExpertIntroBinding
import
com.ydl.confide.home.ConfideBottomSheetDialogFragment
import
com.ydl.confide.home.bean.ConfideHomeBodyBean
import
com.ydl.confide.home.modular.service.ConfideWebServiceImpl
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.utils.LogUtil
...
...
@@ -57,7 +58,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
if
(
item
.
isVideo
)
"1"
else
"2"
,
"6"
)
showDoctorDetail
(
item
)
if
(!
item
.
confideId
.
isNullOrBlank
())
{
ConfideWebServiceImpl
().
connectionJava
(
item
.
confideId
!!
.
toInt
(),
3
,
it
.
context
as
Activity
,
null
)
{
showDoctorDetail
(
item
)
}
}
// showDoctorDetail(item)
}
binding
.
btnChat
.
setOnClickListener
{
val
aty
=
it
.
context
as
?
Activity
...
...
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