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
79dbb056
Commit
79dbb056
authored
Sep 01, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:首页咨询.理解模块,8-10点跳转自主,其他时间跳转导医
parent
ab00ce0f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
8 deletions
+114
-8
config.gradle
config.gradle
+6
-6
SearchApi.kt
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
+10
-0
ConsultantServiceImp.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/ConsultantServiceImp.kt
+5
-0
ConsultAssistantEntryUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/utils/ConsultAssistantEntryUtils.kt
+66
-0
IConsultantService.kt
m-consultant/src/main/modular_api/com/yidianling/consultant/api/IConsultantService.kt
+4
-0
HomeConsultItemView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeConsultItemView.kt
+23
-2
No files found.
config.gradle
View file @
79dbb056
...
@@ -6,10 +6,10 @@ ext {
...
@@ -6,10 +6,10 @@ ext {
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.48.74"
,
"m-confide"
:
"0.0.48.74"
,
"m-consultant"
:
"0.0.59.3
4
"
,
"m-consultant"
:
"0.0.59.3
5
"
,
"m-fm"
:
"0.0.30.00"
,
"m-fm"
:
"0.0.30.00"
,
"m-user"
:
"0.0.60.26"
,
"m-user"
:
"0.0.60.26"
,
"m-home"
:
"0.0.22.3
1
"
,
"m-home"
:
"0.0.22.3
2
"
,
"m-im"
:
"0.0.18.16"
,
"m-im"
:
"0.0.18.16"
,
"m-dynamic"
:
"0.0.7.13"
,
"m-dynamic"
:
"0.0.7.13"
,
"m-article"
:
"0.0.0.6"
,
"m-article"
:
"0.0.0.6"
,
...
@@ -21,7 +21,7 @@ ext {
...
@@ -21,7 +21,7 @@ ext {
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.6"
,
"m-audioim-api"
:
"0.0.6"
,
"m-confide-api"
:
"0.0.2.1"
,
"m-confide-api"
:
"0.0.2.1"
,
"m-consultant-api"
:
"0.0.5.
4
"
,
"m-consultant-api"
:
"0.0.5.
6
"
,
"m-course-api"
:
"0.0.3.6"
,
"m-course-api"
:
"0.0.3.6"
,
"m-fm-api"
:
"0.0.3"
,
"m-fm-api"
:
"0.0.3"
,
"m-muse-api"
:
"0.0.1"
,
"m-muse-api"
:
"0.0.1"
,
...
@@ -90,10 +90,10 @@ ext {
...
@@ -90,10 +90,10 @@ ext {
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.41.3"
,
"m-confide"
:
"0.0.41.3"
,
"m-consultant"
:
"0.0.51.1
3
"
,
"m-consultant"
:
"0.0.51.1
6
"
,
"m-fm"
:
"0.0.23.5"
,
"m-fm"
:
"0.0.23.5"
,
"m-user"
:
"0.0.41.5"
,
"m-user"
:
"0.0.41.5"
,
"m-home"
:
"0.0.6.2
6
"
,
"m-home"
:
"0.0.6.2
7
"
,
"m-im"
:
"0.0.3.10"
,
"m-im"
:
"0.0.3.10"
,
"m-dynamic"
:
"0.0.1.7"
,
"m-dynamic"
:
"0.0.1.7"
,
...
@@ -103,7 +103,7 @@ ext {
...
@@ -103,7 +103,7 @@ ext {
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.6"
,
"m-audioim-api"
:
"0.0.6"
,
"m-confide-api"
:
"0.0.2.1"
,
"m-confide-api"
:
"0.0.2.1"
,
"m-consultant-api"
:
"0.0.5.
4
"
,
"m-consultant-api"
:
"0.0.5.
6
"
,
"m-course-api"
:
"0.0.3.6"
,
"m-course-api"
:
"0.0.3.6"
,
"m-fm-api"
:
"0.0.3"
,
"m-fm-api"
:
"0.0.3"
,
"m-muse-api"
:
"0.0.1"
,
"m-muse-api"
:
"0.0.1"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
View file @
79dbb056
...
@@ -13,6 +13,7 @@ import com.yidianling.consultant.model.bean.ExpertSearchBean
...
@@ -13,6 +13,7 @@ import com.yidianling.consultant.model.bean.ExpertSearchBean
import
com.yidianling.consultant.model.bean.HeadData
import
com.yidianling.consultant.model.bean.HeadData
import
io.reactivex.Observable
import
io.reactivex.Observable
import
retrofit2.http.*
import
retrofit2.http.*
import
kotlin.reflect.jvm.internal.impl.load.kotlin.JvmType
/**
/**
...
@@ -76,4 +77,12 @@ interface SearchApi {
...
@@ -76,4 +77,12 @@ interface SearchApi {
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
@GET
(
"testGeneral/daoyi/setting"
)
@GET
(
"testGeneral/daoyi/setting"
)
fun
getGuideData
():
Observable
<
BaseAPIResponse
<
Map
<
String
,
List
<
GuideBean
>>>>
fun
getGuideData
():
Observable
<
BaseAPIResponse
<
Map
<
String
,
List
<
GuideBean
>>>>
//8-22点跳自主,其他时间跳导医,
// 0 自主默认
//1 自主
//2 导医
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"consult/assistant/chat-time-setting"
)
fun
getJumpTypeRequest
():
Observable
<
BaseAPIResponse
<
Int
>>
}
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/modular/ConsultantServiceImp.kt
View file @
79dbb056
...
@@ -10,6 +10,7 @@ import com.alibaba.android.arouter.facade.annotation.Route
...
@@ -10,6 +10,7 @@ import com.alibaba.android.arouter.facade.annotation.Route
import
com.google.gson.Gson
import
com.google.gson.Gson
import
com.google.gson.reflect.TypeToken
import
com.google.gson.reflect.TypeToken
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.consultant.ExpertSearchActivity
import
com.yidianling.consultant.ExpertSearchActivity
import
com.yidianling.consultant.ExpertSearchFragment
import
com.yidianling.consultant.ExpertSearchFragment
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.api.IConsultantService
...
@@ -117,6 +118,10 @@ class ConsultantServiceImp : IConsultantService {
...
@@ -117,6 +118,10 @@ class ConsultantServiceImp : IConsultantService {
ConsultAssistantEntryUtils
.
jumpConsultAssistant
(
activity
,
location
)
ConsultAssistantEntryUtils
.
jumpConsultAssistant
(
activity
,
location
)
}
}
override
fun
dueToTypeJumpAutoOrGuide
(
activity
:
Activity
,
location
:
Int
,
doctorId
:
Int
,
url
:
String
)
{
ConsultAssistantEntryUtils
.
getTypeJump
(
activity
,
location
,
doctorId
,
url
)
}
override
fun
resetConsultAssistantDialogStatus
()
{
override
fun
resetConsultAssistantDialogStatus
()
{
ConsultAssistantDialogUtils
.
INSTANCE
.
resetStatus
()
ConsultAssistantDialogUtils
.
INSTANCE
.
resetStatus
()
}
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/utils/ConsultAssistantEntryUtils.kt
View file @
79dbb056
...
@@ -3,8 +3,13 @@ package com.yidianling.consultant.modular.utils
...
@@ -3,8 +3,13 @@ package com.yidianling.consultant.modular.utils
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.app.Activity
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.app.AppCompatActivity
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.ConsultAssistantCenterActivity
import
com.yidianling.consultant.ConsultAssistantCenterActivity
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.constants.ConsultBIConstants
...
@@ -48,5 +53,65 @@ class ConsultAssistantEntryUtils {
...
@@ -48,5 +53,65 @@ class ConsultAssistantEntryUtils {
}
}
}
}
/*
* 根据Type0,1跳自主,2跳导医
* 在跳自主的(type=1)情况下,点击item是跳专家详情页
*
* */
@SuppressLint
(
"CheckResult"
)
fun
getTypeJump
(
activity
:
Activity
,
location
:
Int
,
doctorUid
:
Int
,
url
:
String
?){
SearchApi
.
getSearchApi
().
getJumpTypeRequest
()
.
subscribeOn
((
Schedulers
.
io
()))
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
when
(
it
.
code
){
"200"
->{
when
(
it
.
data
){
0
->{
jumpToAutoTalk
(
activity
,
doctorUid
)
}
1
->{
if
(
url
.
isNullOrEmpty
()){
jumpToAutoTalk
(
activity
,
doctorUid
)
}
else
{
if
(
url
.
startsWith
(
"http"
))
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
url
),
""
)
}
else
{
YDLRouterManager
.
router
(
url
)
}
}
}
2
->{
jumpConsultAssistant
(
activity
,
location
)
}
else
->{
jumpToAutoTalk
(
activity
,
doctorUid
)
LogUtil
.
e
(
it
.
data
.
toString
())
}
}
}
else
->{
ToastUtil
.
toastShort
(
it
.
code
)
}
}
},
object
:
ThrowableConsumer
(){
override
fun
accept
(
msg
:
String
)
{
ToastUtil
.
toastShort
(
msg
)
}
})
}
private
fun
jumpToAutoTalk
(
activity
:
Activity
,
doctorUid
:
Int
)
{
ConsultantIn
.
startP2PSession
(
activity
as
AppCompatActivity
,
doctorUid
.
toString
()
)
}
}
}
}
}
\ No newline at end of file
m-consultant/src/main/modular_api/com/yidianling/consultant/api/IConsultantService.kt
View file @
79dbb056
...
@@ -40,4 +40,7 @@ interface IConsultantService: IProvider {
...
@@ -40,4 +40,7 @@ interface IConsultantService: IProvider {
fun
requestGuideData
()
fun
requestGuideData
()
fun
jumpConsultAssistant
(
activity
:
Activity
,
location
:
Int
)
fun
jumpConsultAssistant
(
activity
:
Activity
,
location
:
Int
)
//根据返回Type跳转自主或者导医
fun
dueToTypeJumpAutoOrGuide
(
activity
:
Activity
,
location
:
Int
,
doctorId
:
Int
,
url
:
String
)
}
}
\ No newline at end of file
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeConsultItemView.kt
View file @
79dbb056
...
@@ -11,9 +11,12 @@ import com.ydl.ydl_image.manager.YDLImageCacheManager
...
@@ -11,9 +11,12 @@ import com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.StringUtils
import
com.ydl.ydlcommon.utils.StringUtils
import
com.ydl.ydlcommon.utils.URLUtils
import
com.ydl.ydlcommon.utils.URLUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.home.R
import
com.yidianling.home.R
import
com.yidianling.home.constants.HomeBIConstants
import
com.yidianling.home.event.IHomeBaseEvent
import
com.yidianling.home.event.IHomeBaseEvent
import
com.yidianling.home.model.bean.HomeConsultBean
import
com.yidianling.home.model.bean.HomeConsultBean
import
kotlinx.android.synthetic.ydl.home_consult_item_view.view.*
import
kotlinx.android.synthetic.ydl.home_consult_item_view.view.*
...
@@ -64,10 +67,21 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
...
@@ -64,10 +67,21 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
// val url = URLUtils.appendParmas(bean.linkUrl,"cateId",cateId)
// val url = URLUtils.appendParmas(bean.linkUrl,"cateId",cateId)
// homeEvent!!.consultItemClick(url,bean.doctorId)
// homeEvent!!.consultItemClick(url,bean.doctorId)
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
jumpConsultAssistant
(
/*
ModularServiceManager.provide(IConsultantService::class.java).jumpConsultAssistant(
mContext as Activity,
mContext as Activity,
11
11
)*/
//补充点击事件埋点
ActionCountUtils
.
count
(
HomeBIConstants
.
YDL_USER_EXPERT_INTRODUCTION_CLICK
,
bean
.
uid
.
toString
())
val
url
=
URLUtils
.
appendParmas
(
bean
.
linkUrl
,
"cateId"
,
cateId
)
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
dueToTypeJumpAutoOrGuide
(
mContext
as
Activity
,
11
,
bean
.
uid
,
url
)
)
/*val url = URLUtils.appendParmas(bean.linkUrl,"cateId",cateId)
homeEvent!!.consultItemClick(url,bean.uid.toString())*/
}
}
}
}
...
@@ -122,9 +136,16 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
...
@@ -122,9 +136,16 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
private
fun
setConfideButton
(
bodyBean
:
HomeConsultBean
.
ListBean
)
{
private
fun
setConfideButton
(
bodyBean
:
HomeConsultBean
.
ListBean
)
{
tv_consult_chat
.
setOnClickListener
{
tv_consult_chat
.
setOnClickListener
{
// homeEvent!!.consultChatClick(bodyBean.uid.toString())
// homeEvent!!.consultChatClick(bodyBean.uid.toString())
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
jumpConsultAssistant
(
/*
ModularServiceManager.provide(IConsultantService::class.java).jumpConsultAssistant(
mContext as Activity,
mContext as Activity,
11
11
)*/
ModularServiceManager
.
provide
(
IConsultantService
::
class
.
java
).
dueToTypeJumpAutoOrGuide
(
mContext
as
Activity
,
11
,
bodyBean
.
uid
,
""
)
)
}
}
}
}
...
...
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