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
6ca663e8
Commit
6ca663e8
authored
Jan 25, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:导医开关配置接口对接
parent
211e8dd3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
13 deletions
+50
-13
HomeModuleTabEvent.java
m-consultant/src/main/java/com/yidianling/consultant/bean/HomeModuleTabEvent.java
+18
-0
SearchApi.kt
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
+7
-2
ConsultAssistantDialogUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
+11
-4
ConsultAssistantEntryUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/utils/ConsultAssistantEntryUtils.kt
+14
-7
No files found.
m-consultant/src/main/java/com/yidianling/consultant/bean/HomeModuleTabEvent.java
0 → 100644
View file @
6ca663e8
package
com
.
yidianling
.
consultant
.
bean
;
public
class
HomeModuleTabEvent
{
private
int
tabIndex
;
public
HomeModuleTabEvent
(
int
index
)
{
tabIndex
=
index
;
}
public
int
getTabIndex
()
{
return
tabIndex
;
}
public
void
setTabIndex
(
int
tabIndex
)
{
this
.
tabIndex
=
tabIndex
;
}
}
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
View file @
6ca663e8
...
...
@@ -67,10 +67,15 @@ interface SearchApi {
/*
* location字段说明(sign1存储页面位置,1:首页导医入口进入2:M站入口进入3:问答列表页进入4:我的入口进入
* 5:情绪疏导在线咨询入口进入6:咨询列表页导医入口进入7:实用心理课入口进入8:实用心理课课程列表页进入9:测评解读页进入
* 10:搜索页面进入11:首页咨询列表进入12:厌学的真相在线咨询入口,0是小壹意向客户传0)*/
* 10:搜索页面进入11:首页咨询列表进入12:厌学的真相在线咨询入口,0是小壹意向客户传0)
*
* ffrom_2 亲子教育添加字段
*naviType = "1";导医配置开关,返100跳转咨询tab,如果返其他则维持原有逻辑。
* */
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"consult/assistant/chat-distribute"
)
fun
getConsultAssistantUidRequest
(
@Query
(
"location"
)
location
:
Int
,
@Query
(
"ffrom_2"
)
ffrom
:
String
?):
Observable
<
BaseAPIResponse
<
Long
>>
fun
getConsultAssistantUidRequest
(
@Query
(
"location"
)
location
:
Int
,
@Query
(
"ffrom_2"
)
ffrom
:
String
?
,
@Query
(
"naviType"
)
naviType
:
String
=
"1"
):
Observable
<
BaseAPIResponse
<
Long
>>
//获取咨询助理uid
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/singlton/ConsultAssistantDialogUtils.kt
View file @
6ca663e8
...
...
@@ -11,10 +11,12 @@ import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.ConsultAssistantCenterActivity
import
com.yidianling.consultant.bean.HomeModuleTabEvent
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.dialog.ConsultAssistantDialog
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.router.ConsultantIn
import
de.greenrobot.event.EventBus
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Consumer
import
io.reactivex.schedulers.Schedulers
...
...
@@ -314,10 +316,15 @@ class ConsultAssistantDialogUtils private constructor() {
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
if
(
it
.
code
==
"200"
&&
it
.
data
!=
0
.
toLong
()
&&
null
!=
activity
)
{
ConsultantIn
.
startP2PSession
(
activity
as
AppCompatActivity
,
it
.
data
.
toString
())
}
else
{
ToastUtil
.
toastShort
(
"咨询助理忙碌中,请稍后再试"
)
if
(
it
.
data
==
100L
){
//跳转咨询tab栏目
EventBus
.
getDefault
().
post
(
HomeModuleTabEvent
(
2
))
}
else
{
if
(
it
.
code
==
"200"
&&
it
.
data
!=
0
.
toLong
()
&&
null
!=
activity
)
{
ConsultantIn
.
startP2PSession
(
activity
as
AppCompatActivity
,
it
.
data
.
toString
())
}
else
{
ToastUtil
.
toastShort
(
"咨询助理忙碌中,请稍后再试"
)
}
}
if
(
null
!=
activity
&&
activity
is
ConsultAssistantCenterActivity
&&
!
activity
.
isFinishing
)
activity
.
finish
()
},
object
:
ThrowableConsumer
()
{
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/utils/ConsultAssistantEntryUtils.kt
View file @
6ca663e8
...
...
@@ -12,9 +12,11 @@ import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.ConsultAssistantCenterActivity
import
com.yidianling.consultant.bean.HomeModuleTabEvent
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.router.ConsultantIn
import
de.greenrobot.event.EventBus
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Consumer
import
io.reactivex.schedulers.Schedulers
...
...
@@ -36,13 +38,18 @@ class ConsultAssistantEntryUtils {
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
if
(
it
.
code
==
"200"
&&
it
.
data
!=
0
.
toLong
()
&&
null
!=
activity
)
{
ConsultantIn
.
startP2PSession
(
activity
as
AppCompatActivity
,
it
.
data
.
toString
()
)
}
else
{
ToastUtil
.
toastShort
(
"咨询助理忙碌中,请稍后再试"
)
if
(
it
.
data
==
100L
){
//跳转咨询tab栏目
EventBus
.
getDefault
().
post
(
HomeModuleTabEvent
(
2
))
}
else
{
if
(
it
.
code
==
"200"
&&
it
.
data
!=
0
.
toLong
()
&&
null
!=
activity
)
{
ConsultantIn
.
startP2PSession
(
activity
as
AppCompatActivity
,
it
.
data
.
toString
()
)
}
else
{
ToastUtil
.
toastShort
(
"咨询助理忙碌中,请稍后再试"
)
}
}
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
...
...
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