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
65a80944
Commit
65a80944
authored
Jun 17, 2022
by
范玉宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
im module feat done
parent
cdd04085
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
8 deletions
+72
-8
CanViewConsult.kt
m-im/src/main/java/com/yidianling/im/bean/CanViewConsult.kt
+5
-0
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+17
-6
ServiceApi.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
+8
-0
ServiceImpl.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
+9
-0
ConfideOrderInfoView.java
m-im/src/main/java/com/yidianling/uikit/custom/widget/ConfideOrderInfoView.java
+29
-0
im_ydl_nim_message_fragment.xml
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
+4
-2
No files found.
m-im/src/main/java/com/yidianling/im/bean/CanViewConsult.kt
0 → 100644
View file @
65a80944
package
com.yidianling.im.bean
data class
CanViewConsult
(
val
canViewConsult
:
Boolean
=
false
)
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
65a80944
...
...
@@ -280,11 +280,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
//做灵犀2.0 去掉常用语逻辑
//rl_common_question_enter.setVisibility(ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 3 ? View.VISIBLE : View.GONE);
if
(
null
!=
ActionHandlerStorage
.
getL
(
sessionId
)&&
ActionHandlerStorage
.
getL
(
sessionId
).
getUserType
()
!=
2
)
{
if
(
null
!=
getActivity
()
&&
null
!=
rela_zixun
)
{
rela_zixun
.
setVisibility
(
View
.
GONE
);
}
}
if
(
null
!=
ActionHandlerStorage
.
getL
(
sessionId
)&&
ActionHandlerStorage
.
getL
(
sessionId
).
isNotPrepare
())
{
IMChatUtil
.
INSTANCE
.
prepareChatData
((
AppCompatActivity
)
getActivity
(),
sessionId
,
(
expertInfo
)
->
{
String
toUid
=
expertInfo
.
shareData
.
toUid
;
...
...
@@ -305,7 +301,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
//如果是群聊
if
(
SessionTypeEnum
.
Team
==
sessionType
){
titleBar
.
setRightIcon
(
getContext
().
getDrawable
(
R
.
drawable
.
platform_common_more
));
rela_zixun
.
setVisibility
(
View
.
GONE
);
titleBar
.
setTitleRightDraw
(
null
);
}
}
...
...
@@ -328,6 +323,22 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
});
}
boolean
isExpert
=
null
!=
ActionHandlerStorage
.
getL
(
sessionId
)&&
ActionHandlerStorage
.
getL
(
sessionId
).
getUserType
()
==
2
;
ServiceImpl
.
Companion
.
getInstance
().
canViewConsult
(
""
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
response
->
{
if
(
response
.
code
.
equals
(
"200"
)){
if
(
response
.
data
!=
null
&&
response
.
data
.
getCanViewConsult
()){
if
(
isExpert
&&
sessionType
!=
SessionTypeEnum
.
Team
)
{
rela_zixun
.
setVisibility
(
View
.
VISIBLE
);
}
}
}
}
);
//有未完成订单或者有未评价订单时,显示订单布局
if
(
ActionHandlerStorage
.
getL
(
sessionId
)
!=
null
&&
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
()
!=
null
)
{
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
hasAvailableListenOrder
==
2
||
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
listenOrderCommentStatus
==
1
)
{
...
...
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
View file @
65a80944
...
...
@@ -4,6 +4,7 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import
com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.yidianling.im.bean.BusyBean
import
com.yidianling.im.bean.CanViewConsult
import
com.yidianling.im.bean.FirstQuestionBean
import
com.yidianling.uikit.custom.http.response.*
import
com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
...
...
@@ -125,4 +126,10 @@ interface ServiceApi {
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"X-App-Id: crm_cloud"
)
fun
getFirstQuestion
(
@Body
map
:
Map
<
String
,
@JvmSuppressWildcards
Any
>):
Observable
<
BaseAPIResponse
<
FirstQuestionBean
>>
//倾诉2.0迭代 是否显示立即咨询按钮
@GET
(
"consult/expert-page/canViewConsult"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
canViewConsult
(
@Query
(
"doctorId"
)
doctorId
:
String
):
Observable
<
BaseAPIResponse
<
CanViewConsult
>>
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
View file @
65a80944
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.im.bean.BusyBean
import
com.yidianling.im.bean.CanViewConsult
import
com.yidianling.im.bean.FirstQuestionBean
import
com.yidianling.im.http.ImRetrofitApi
import
com.yidianling.uikit.custom.http.response.*
...
...
@@ -200,4 +201,11 @@ class ServiceImpl private constructor() {
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
getFirstQuestion
(
map
)
}
/**
* 是否显示立即咨询
*/
fun
canViewConsult
(
doctorId
:
String
):
Observable
<
BaseAPIResponse
<
CanViewConsult
>>{
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
canViewConsult
(
doctorId
)
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/widget/ConfideOrderInfoView.java
View file @
65a80944
...
...
@@ -9,12 +9,18 @@ import android.widget.ImageView;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
androidx.fragment.app.FragmentActivity
;
import
com.netease.nimlib.sdk.NIMClient
;
import
com.netease.nimlib.sdk.RequestCallback
;
import
com.netease.nimlib.sdk.msg.MessageBuilder
;
import
com.netease.nimlib.sdk.msg.MsgService
;
import
com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
;
import
com.netease.nimlib.sdk.msg.model.IMMessage
;
import
com.ydl.confide.api.ConfideRoute
;
import
com.ydl.confide.api.IConfideService
;
import
com.ydl.ydlcommon.base.config.HttpConfig
;
import
com.ydl.ydlcommon.utils.Utils
;
import
com.yidianling.common.tools.RxImageTool
;
import
com.yidianling.common.tools.ToastUtil
;
import
com.yidianling.im.R
;
...
...
@@ -27,6 +33,10 @@ import com.ydl.ydlcommon.router.YdlCommonRouterManager;
import
com.ydl.ydlcommon.utils.StringUtils
;
import
com.ydl.ydlcommon.utils.YDLCacheUtils
;
import
static
com
.
ydl
.
ydlcommon
.
modular
.
ModularServiceManagerKt
.
findRouteService
;
/**
* Created by haorui on 2019/5/22.
* Des:
...
...
@@ -129,10 +139,29 @@ public class ConfideOrderInfoView extends RelativeLayout {
//点击整个view,跳转订单详情页面
setOnClickListener
(
view
->
{
if
(
Utils
.
isFastClick
()){
return
;
}
String
remainTime
=
ActionHandlerStorage
.
getL
(
mSessionId
).
getInfo
().
listenOrderRemainTime
;
if
(
TextUtils
.
isEmpty
(
remainTime
)){
if
(!
TextUtils
.
isEmpty
(
info
.
listenOrderUrl
))
{
//订单详情
H5Params
h5Params
=
new
H5Params
(
info
.
listenOrderUrl
,
"订单详情"
);
NewH5Activity
.
start
(
mContext
,
h5Params
);
}
}
else
{
if
(
info
!=
null
){
String
confideId
=
info
.
listenerId
;
findRouteService
(
IConfideService
.
class
)
.
showExpertDetailDialog
(
(
FragmentActivity
)
mContext
,
HttpConfig
.
Companion
.
getMH5_URL
()
+
ConfideRoute
.
INSTANCE
.
h5ConfideIntro
(
confideId
),
info
.
doctorId
,
info
.
toUid
);
}
}
});
}
...
...
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
View file @
65a80944
...
...
@@ -487,12 +487,14 @@
android:background=
"@drawable/im_bg_im_consult_action"
android:gravity=
"center"
android:paddingLeft=
"17dp"
android:paddingRight=
"11dp"
>
android:paddingRight=
"11dp"
android:visibility=
"gone"
tools:visibility=
"visible"
>
<TextView
android:id=
"@+id/action_yuyue"
android:layout_width=
"wrap_content"
android:layout_height=
"
match_parent
"
android:layout_height=
"
36dp
"
android:gravity=
"center"
android:paddingLeft=
"5dp"
android:text=
"立即咨询"
...
...
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