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
0d167ce7
Commit
0d167ce7
authored
Jul 26, 2022
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: ModularServiceManager.provider改为findRouteService,代码格式化
parent
220aae18
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
23 deletions
+15
-23
AudioImServiceImp.kt
m-audioim/src/main/java/com/ydl/audioim/modular/AudioImServiceImp.kt
+1
-3
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+2
-5
ConfdieServiceImpl.kt
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfdieServiceImpl.kt
+5
-5
ConfideWebServiceImpl.kt
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfideWebServiceImpl.kt
+5
-6
ItemIntroHolder.kt
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
+2
-4
No files found.
m-audioim/src/main/java/com/ydl/audioim/modular/AudioImServiceImp.kt
View file @
0d167ce7
...
@@ -26,9 +26,7 @@ class AudioImServiceImp : IAudioImService {
...
@@ -26,9 +26,7 @@ class AudioImServiceImp : IAudioImService {
}
}
override
fun
loginRtm
(
userId
:
String
?,
event
:
(
isSuccess
:
Boolean
,
msg
:
String
?)
->
Unit
)
{
override
fun
loginRtm
(
userId
:
String
?,
event
:
(
isSuccess
:
Boolean
,
msg
:
String
?)
->
Unit
)
{
YDLavManager
.
instances
.
login
(
userId
)
{
success
:
Boolean
,
_
->
YDLavManager
.
instances
.
login
(
userId
,
event
)
event
(
success
,
""
)
}
}
}
override
fun
loginRtm
(
userId
:
String
?)
{
override
fun
loginRtm
(
userId
:
String
?)
{
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
0d167ce7
package
com.ydl.confide.home
package
com.ydl.confide.home
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Color
import
android.graphics.Color
...
@@ -52,7 +51,6 @@ import com.ydl.webview.NewH5Activity
...
@@ -52,7 +51,6 @@ import com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import
com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig.Companion.YDL_H5
import
com.ydl.ydlcommon.base.config.HttpConfig.Companion.YDL_H5
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import
com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.router.IYDLRouterConstant
...
@@ -62,7 +60,6 @@ import com.ydl.ydlcommon.view.DrawableRightTextView
...
@@ -62,7 +60,6 @@ import com.ydl.ydlcommon.view.DrawableRightTextView
import
com.ydl.ydlcommon.view.WrapContentLinearLayoutManager
import
com.ydl.ydlcommon.view.WrapContentLinearLayoutManager
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.im.api.service.IImService
import
com.yidianling.im.api.service.IImService
import
com.yidianling.user.api.service.IUserService
import
com.yidianling.user.api.service.IUserService
import
kotlinx.android.synthetic.main.confide_home_activity.*
import
kotlinx.android.synthetic.main.confide_home_activity.*
...
@@ -251,8 +248,8 @@ class ConfideHomeActivity :
...
@@ -251,8 +248,8 @@ class ConfideHomeActivity :
}
}
if
(!
confidedId
.
isNullOrBlank
()
&&
!
doctorId
.
isNullOrBlank
())
{
if
(!
confidedId
.
isNullOrBlank
()
&&
!
doctorId
.
isNullOrBlank
())
{
if
(!
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
())
{
if
(!
findRouteServic
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
())
{
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
loginRtm
(
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
_
:
Boolean
,
_
->
findRouteServic
e
(
IAudioImService
::
class
.
java
).
loginRtm
(
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
_
:
Boolean
,
_
->
showPayOrDetail
(
confidedId
,
doctorId
)
showPayOrDetail
(
confidedId
,
doctorId
)
}
}
}
else
{
}
else
{
...
...
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfdieServiceImpl.kt
View file @
0d167ce7
...
@@ -18,7 +18,7 @@ import com.ydl.confide.home.bean.ConfideConnectResponse
...
@@ -18,7 +18,7 @@ import com.ydl.confide.home.bean.ConfideConnectResponse
import
com.ydl.webview.TellData
import
com.ydl.webview.TellData
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.base.config.YDLConstants
import
com.ydl.ydlcommon.base.config.YDLConstants
import
com.ydl.ydlcommon.modular.
ModularServiceManager
import
com.ydl.ydlcommon.modular.
findRouteService
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.YDLCacheUtils
/**
/**
...
@@ -72,7 +72,7 @@ class ConfdieServiceImpl : IConfideService {
...
@@ -72,7 +72,7 @@ class ConfdieServiceImpl : IConfideService {
override
fun
ydlAvManagerLogin
(
uid
:
String
?)
{
override
fun
ydlAvManagerLogin
(
uid
:
String
?)
{
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
loginRtm
(
uid
)
findRouteServic
e
(
IAudioImService
::
class
.
java
).
loginRtm
(
uid
)
}
}
override
fun
startCondifeHomePage
(
context
:
Context
,
isSplash
:
Boolean
)
{
override
fun
startCondifeHomePage
(
context
:
Context
,
isSplash
:
Boolean
)
{
...
@@ -108,15 +108,15 @@ class ConfdieServiceImpl : IConfideService {
...
@@ -108,15 +108,15 @@ class ConfdieServiceImpl : IConfideService {
avManagerKey
=
"3387e9b251f3491e9221a9877e8f7830"
avManagerKey
=
"3387e9b251f3491e9221a9877e8f7830"
}
}
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
yDLAvManagerInit
(
app
,
avManagerKey
)
findRouteService
(
IAudioImService
::
class
.
java
).
yDLAvManagerInit
(
app
,
avManagerKey
)
}
}
override
fun
isOnlineRtm
():
Boolean
{
override
fun
isOnlineRtm
():
Boolean
{
return
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
()
return
findRouteServic
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
()
}
}
override
fun
showAxbConfirmDialog
(
activity
:
Activity
?,
type
:
Int
,
phoneNumber
:
String
?)
{
override
fun
showAxbConfirmDialog
(
activity
:
Activity
?,
type
:
Int
,
phoneNumber
:
String
?)
{
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
openAxbDialog
(
activity
,
type
,
phoneNumber
)
findRouteService
(
IAudioImService
::
class
.
java
).
openAxbDialog
(
activity
,
type
,
phoneNumber
)
}
}
override
fun
closePlayer
()
{
override
fun
closePlayer
()
{
...
...
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfideWebServiceImpl.kt
View file @
0d167ce7
...
@@ -18,7 +18,6 @@ import com.ydl.confide.router.PhoneCallIn
...
@@ -18,7 +18,6 @@ import com.ydl.confide.router.PhoneCallIn
import
com.ydl.webview.H5Params
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.webview.NewH5Activity
import
com.ydl.webview.TellData
import
com.ydl.webview.TellData
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.ui.Loading
import
com.ydl.ydlcommon.ui.Loading
import
com.ydl.ydlcommon.utils.log.AliYunLogConfig
import
com.ydl.ydlcommon.utils.log.AliYunLogConfig
...
@@ -107,7 +106,7 @@ class ConfideWebServiceImpl {
...
@@ -107,7 +106,7 @@ class ConfideWebServiceImpl {
data
:
ConfideConnectResponse
?
data
:
ConfideConnectResponse
?
)
{
)
{
val
expertInfo
=
data
?.
dialDetail
?.
agoraExpertInfo
?:
return
val
expertInfo
=
data
?.
dialDetail
?.
agoraExpertInfo
?:
return
if
(!
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
())
{
// 判断如果账号在其它设备登录rtm是否在线
if
(!
findRouteServic
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
())
{
// 判断如果账号在其它设备登录rtm是否在线
ToastUtil
.
toastShort
(
"网络通话错误代码001"
)
ToastUtil
.
toastShort
(
"网络通话错误代码001"
)
return
return
}
}
...
@@ -128,7 +127,7 @@ class ConfideWebServiceImpl {
...
@@ -128,7 +127,7 @@ class ConfideWebServiceImpl {
fun
axb
(
activity
:
Activity
,
phone
:
String
?)
{
fun
axb
(
activity
:
Activity
,
phone
:
String
?)
{
if
(
phone
.
isNullOrEmpty
())
if
(
phone
.
isNullOrEmpty
())
return
return
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
openAxbDialog
(
activity
,
1
,
phone
)
findRouteServic
e
(
IAudioImService
::
class
.
java
).
openAxbDialog
(
activity
,
1
,
phone
)
}
}
//java版axb和声网接口
//java版axb和声网接口
...
@@ -140,8 +139,8 @@ class ConfideWebServiceImpl {
...
@@ -140,8 +139,8 @@ class ConfideWebServiceImpl {
tellData
:
TellData
?,
tellData
:
TellData
?,
callType
:
String
?
callType
:
String
?
)
{
)
{
if
(!
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
())
{
if
(!
findRouteServic
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
())
{
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
loginRtm
(
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
isSuccess
:
Boolean
,
_
->
findRouteServic
e
(
IAudioImService
::
class
.
java
).
loginRtm
(
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
isSuccess
:
Boolean
,
_
->
if
(
isSuccess
)
{
if
(
isSuccess
)
{
toDial
(
id
,
type
,
callType
,
activity
,
tellData
)
toDial
(
id
,
type
,
callType
,
activity
,
tellData
)
}
else
{
}
else
{
...
@@ -326,7 +325,7 @@ class ConfideWebServiceImpl {
...
@@ -326,7 +325,7 @@ class ConfideWebServiceImpl {
expertInfo
.
remainingTime
=
expertInfo
.
remainingTime
=
ExpertInfoBean
.
ListenRemainingTime
(
expertInfo
.
totalDuration
);
ExpertInfoBean
.
ListenRemainingTime
(
expertInfo
.
totalDuration
);
}
}
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
callEventSave
(
"10"
,
"用户点击拨打"
,
expertInfo
.
channelId
,
"7"
)
findRouteService
(
IAudioImService
::
class
.
java
).
callEventSave
(
"10"
,
"用户点击拨打"
,
expertInfo
.
channelId
,
"7"
)
Loading
.
close
()
Loading
.
close
()
ARouter
.
getInstance
().
build
(
"/av/AudioHomeActivity"
)
ARouter
.
getInstance
().
build
(
"/av/AudioHomeActivity"
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_HEAD_URL
,
expertInfo
.
expertHeadUrl
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_HEAD_URL
,
expertInfo
.
expertHeadUrl
)
...
...
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
View file @
0d167ce7
...
@@ -27,7 +27,6 @@ import com.ydl.confide.router.PhoneCallIn
...
@@ -27,7 +27,6 @@ import com.ydl.confide.router.PhoneCallIn
import
com.ydl.webview.H5Params
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
...
@@ -37,7 +36,6 @@ import io.reactivex.Observable
...
@@ -37,7 +36,6 @@ import io.reactivex.Observable
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.disposables.Disposable
import
io.reactivex.disposables.Disposable
import
io.reactivex.schedulers.Schedulers
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.confide_home_activity.*
import
tv.danmaku.ijk.media.player.IjkMediaPlayer
import
tv.danmaku.ijk.media.player.IjkMediaPlayer
import
java.io.UnsupportedEncodingException
import
java.io.UnsupportedEncodingException
import
java.net.URLDecoder
import
java.net.URLDecoder
...
@@ -124,8 +122,8 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
...
@@ -124,8 +122,8 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
}
}
else
->
{
else
->
{
if
(!
item
.
confideId
.
isNullOrBlank
())
{
if
(!
item
.
confideId
.
isNullOrBlank
())
{
if
(!
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
())
{
if
(!
findRouteServic
e
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
())
{
ModularServiceManager
.
provid
e
(
IAudioImService
::
class
.
java
).
loginRtm
(
findRouteServic
e
(
IAudioImService
::
class
.
java
).
loginRtm
(
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
_
:
Boolean
,
_
->
)
{
_
:
Boolean
,
_
->
showPayOrDetail
(
item
,
it
)
showPayOrDetail
(
item
,
it
)
...
...
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