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
31b740d3
Commit
31b740d3
authored
Jan 02, 2020
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
顶部布局与接口基本完成(剩余立即咨询按钮里面的两个接口)
parent
4f7e47e8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
357 additions
and
28 deletions
+357
-28
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
P2PCustomActionHandlerImpl.java
m-im/src/main/java/com/yidianling/im/bridge/P2PCustomActionHandlerImpl.java
+3
-0
YDLMessageFragment.java
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
+75
-8
ImCommentBannerView.kt
m-im/src/main/java/com/yidianling/uikit/business/session/view/ImCommentBannerView.kt
+2
-2
ImRedStarGradeView.kt
m-im/src/main/java/com/yidianling/uikit/business/session/view/ImRedStarGradeView.kt
+125
-0
IP2PCustomActionHandler.java
m-im/src/main/java/com/yidianling/uikit/custom/bridge/IP2PCustomActionHandler.java
+3
-1
ServiceApi.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
+8
-4
ServiceImpl.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
+13
-4
FocusParams.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/request/FocusParams.kt
+7
-0
FocusBean.kt
m-im/src/main/java/com/yidianling/uikit/custom/http/response/FocusBean.kt
+6
-0
ConfideOrderInfoView.java
m-im/src/main/java/com/yidianling/uikit/custom/widget/ConfideOrderInfoView.java
+1
-0
ExpertInfoDialog.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/ExpertInfoDialog.kt
+5
-1
IMShareDataBuild.java
m-im/src/main/modular_api/com/yidianling/im/api/bean/IMShareDataBuild.java
+1
-0
im_expert_info_dialog_top_bg.png
m-im/src/main/res_uikit/drawable-xhdpi/im_expert_info_dialog_top_bg.png
+0
-0
im_star_grey.png
m-im/src/main/res_uikit/drawable-xhdpi/im_star_grey.png
+0
-0
im_star_red.png
m-im/src/main/res_uikit/drawable-xhdpi/im_star_red.png
+0
-0
im_bg_im_confide_action.xml
m-im/src/main/res_uikit/drawable/im_bg_im_confide_action.xml
+3
-6
im_bg_im_consult_action.xml
m-im/src/main/res_uikit/drawable/im_bg_im_consult_action.xml
+13
-0
im_expert_detail_bottom_bg.xml
m-im/src/main/res_uikit/drawable/im_expert_detail_bottom_bg.xml
+10
-0
im_expert_detail_dialog_top_bg.xml
m-im/src/main/res_uikit/drawable/im_expert_detail_dialog_top_bg.xml
+14
-0
im_unfocus_btn_bg.xml
m-im/src/main/res_uikit/drawable/im_unfocus_btn_bg.xml
+13
-0
im_expert_info_dialog_layout.xml
m-im/src/main/res_uikit/layout/im_expert_info_dialog_layout.xml
+0
-0
im_good_grey_icon_layout.xml
m-im/src/main/res_uikit/layout/im_good_grey_icon_layout.xml
+20
-0
im_good_icon_layout.xml
m-im/src/main/res_uikit/layout/im_good_icon_layout.xml
+33
-0
im_ydl_nim_message_fragment.xml
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
+0
-0
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
31b740d3
...
...
@@ -20,8 +20,8 @@ import java.util.List;
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
//
public static String appEnv = YDLConstants.ENV_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_PROD
;
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
//
public static String appEnv = YDLConstants.ENV_PROD;
@Override
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
...
...
m-im/src/main/java/com/yidianling/im/bridge/P2PCustomActionHandlerImpl.java
View file @
31b740d3
...
...
@@ -131,13 +131,16 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
docInfo
.
doctorBriefInfoOrderNum
=
expert
.
doctorBriefInfo
.
orderNum
;
docInfo
.
doctorBriefInfoSmallImage
=
expert
.
doctorBriefInfo
.
smallImage
;
docInfo
.
isFollowed
=
expert
.
shareData
.
isFollowed
;
docInfo
.
commentCounter
=
expert
.
commentCounter
;
docInfo
.
commentCounterUrl
=
expert
.
commentCounterUrl
;
if
(
docInfo
.
commentList
==
null
)
{
docInfo
.
commentList
=
new
ArrayList
();
}
docInfo
.
commentList
.
clear
();
if
(
expert
.
commentList
!=
null
)
{
docInfo
.
commentList
.
addAll
(
expert
.
commentList
);
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/fragment/YDLMessageFragment.java
View file @
31b740d3
...
...
@@ -4,6 +4,7 @@ import android.animation.Animator;
import
android.animation.ValueAnimator
;
import
android.annotation.SuppressLint
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.media.AudioManager
;
import
android.os.Bundle
;
import
android.os.Handler
;
...
...
@@ -40,10 +41,12 @@ import com.ydl.webview.H5Params;
import
com.ydl.webview.NewH5Activity
;
import
com.ydl.ydl_image.module.GlideApp
;
import
com.ydl.ydlcommon.modular.ModularServiceManager
;
import
com.ydl.ydlcommon.utils.LogUtil
;
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
;
import
com.ydl.ydlcommon.utils.YdlBuryPointUtil
;
import
com.ydl.ydlcommon.utils.log.LogHelper
;
import
com.ydl.ydlcommon.view.CircleImageView
;
import
com.yidianling.common.tools.RxImageTool
;
import
com.yidianling.common.tools.ToastUtil
;
import
com.yidianling.im.R
;
import
com.yidianling.im.router.ImIn
;
...
...
@@ -66,9 +69,11 @@ import com.yidianling.uikit.business.session.view.ChatPrivateTips;
import
com.yidianling.uikit.business.session.view.CollectInfoPopupWindow
;
import
com.yidianling.uikit.business.session.view.CommonQuestionView
;
import
com.yidianling.uikit.business.session.view.ImCommentBannerView
;
import
com.yidianling.uikit.business.session.view.ImRedStarGradeView
;
import
com.yidianling.uikit.custom.bridge.ActionHandlerStorage
;
import
com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler
;
import
com.yidianling.uikit.custom.http.ServiceImpl
;
import
com.yidianling.uikit.custom.http.request.FocusParams
;
import
com.yidianling.uikit.custom.http.response.CommonQuestionBean
;
import
com.yidianling.uikit.custom.http.response.SubmitUserInfoBean
;
import
com.yidianling.uikit.custom.http.response.UserQuestInfoBean
;
...
...
@@ -151,6 +156,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private
ImageView
tv_all_comment_go
;
private
ImCommentBannerView
comment_banner_view
;
private
ImRedStarGradeView
good_num_icons
;
private
TextView
im_focus_btn
;
private
LinearLayout
top_view_container
;
private
LinearLayout
constraint_ll
;
...
...
@@ -166,6 +175,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private
Boolean
hasUpScroll
=
false
;
private
String
help_num
;
// 帮助人数
private
String
server_num
;
// 服务时长
private
String
good_num
;
// 好评率
@SuppressLint
(
"HandlerLeak"
)
private
Handler
mHandler
=
new
Handler
()
{
@Override
...
...
@@ -201,6 +214,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
messageListView
=
rootView
.
findViewById
(
R
.
id
.
messageListView
);
// 消息列表
top_view_container
=
rootView
.
findViewById
(
R
.
id
.
top_view_container
);
// 消息列表
constraint_ll
=
rootView
.
findViewById
(
R
.
id
.
constraint_ll
);
im_focus_btn
=
rootView
.
findViewById
(
R
.
id
.
im_focus_btn
);
good_num_icons
=
rootView
.
findViewById
(
R
.
id
.
good_num_icons
);
//和助理私聊时的常用语逻辑
rl_common_question_enter
=
rootView
.
findViewById
(
R
.
id
.
rl_common_question
);
...
...
@@ -439,17 +454,23 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
GlideApp
.
with
(
getActivity
()).
load
(
headUrl
).
into
(
small_head_img
);
}
// 帮助人数
String
help_num
=
String
.
valueOf
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
doctorBriefInfoOrderNum
);
help_num
=
String
.
valueOf
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
doctorBriefInfoOrderNum
);
if
(
TextUtils
.
isEmpty
(
help_num
))
help_num
=
"0"
;
help_num_tv
.
setText
(
help_num
);
// 服务时长
String
server_num
=
String
.
valueOf
((
int
)
Math
.
ceil
((
double
)
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
doctorBriefInfoHelpLong
/
60.0
));
server_num
=
String
.
valueOf
((
int
)
Math
.
ceil
((
double
)
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
doctorBriefInfoHelpLong
/
60.0
));
if
(
TextUtils
.
isEmpty
(
server_num
))
server_num
=
"0"
;
server_num_tv
.
setText
(
server_num
);
// 好评率
String
good_num
=
String
.
format
(
"%.2f"
,
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
doctorBriefInfoFeedbackRate
*
20
);
if
(
TextUtils
.
isEmpty
(
good_num
))
good_num
=
"0.00"
;
good_num_tv
.
setText
(
good_num
+
"%"
);
good_num
=
String
.
format
(
"%.1f"
,
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
doctorBriefInfoFeedbackRate
);
if
(
TextUtils
.
isEmpty
(
good_num
))
good_num
=
"0.0"
;
good_num_tv
.
setText
(
good_num
);
try
{
good_num_icons
.
setGrade
(
Float
.
parseFloat
(
good_num
));
}
catch
(
Exception
e
)
{
LogUtil
.
i
(
e
.
toString
());
}
if
(!
TextUtils
.
isEmpty
(
headUrl
))
{
IP2PCustomActionHandler
.
DocInfo
info
=
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
();
...
...
@@ -462,10 +483,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
top_expert_info_cl
.
setOnClickListener
(
v
->
{
//todo show dialog
if
(
null
!=
getActivity
())
{
if
(
expertInfoDialog
==
null
)
{
expertInfoDialog
=
new
ExpertInfoDialog
(
getActivity
());
expertInfoDialog
=
new
ExpertInfoDialog
(
getActivity
()
,
help_num
,
server_num
,
good_num
);
}
expertInfoDialog
.
show
();
}
...
...
@@ -476,6 +496,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
* 初始化顶部专家信息栏下面的评论view
*/
private
void
initCommentBanner
()
{
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
commentList
.
size
()
==
0
)
{
comment_banner_view_ll
.
setVisibility
(
View
.
GONE
);
return
;
}
int
commentCounter
=
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
commentCounter
;
tv_all_comment_desc
.
setText
(
"评论("
+
String
.
valueOf
(
commentCounter
)
+
")"
);
...
...
@@ -486,6 +511,48 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
tv_all_comment_go
.
setOnClickListener
(
onClickListener
);
comment_banner_view
.
initData
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
commentList
);
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
isFollowed
)
{
im_focus_btn
.
setText
(
"已关注"
);
im_focus_btn
.
setTextColor
(
Color
.
parseColor
(
"#999999"
));
im_focus_btn
.
setBackgroundResource
(
R
.
drawable
.
im_unfocus_btn_bg
);
}
else
{
im_focus_btn
.
setText
(
"关注"
);
im_focus_btn
.
setTextColor
(
Color
.
parseColor
(
"#1DA1F2"
));
im_focus_btn
.
setBackgroundResource
(
R
.
drawable
.
im_focus_btn_bg
);
im_focus_btn
.
setOnClickListener
(
v
->
{
focus
();
});
}
}
//关注
@SuppressLint
(
"CheckResult"
)
private
void
focus
()
{
if
(
ActionHandlerStorage
.
getL
(
sessionId
)
!=
null
&&
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
()
!=
null
)
// 未关注才能进行关注
if
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
isFollowed
==
false
)
{
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
isFollowed
=
true
;
ServiceImpl
.
Companion
.
getInstance
().
focus
(
new
FocusParams
(
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
toUid
,
"1"
))
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
res
->
{
if
(
res
.
code
==
0
)
{
String
status
=
String
.
valueOf
(
res
.
status
);
if
(
"1"
.
equals
(
status
))
{
ToastUtil
.
toastShort
(
"关注成功"
);
im_focus_btn
.
setText
(
"已关注"
);
im_focus_btn
.
setTextColor
(
Color
.
parseColor
(
"#999999"
));
im_focus_btn
.
setBackgroundResource
(
R
.
drawable
.
im_unfocus_btn_bg
);
if
(
ActionHandlerStorage
.
getL
(
sessionId
)
!=
null
&&
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
()
!=
null
)
{
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
isFollowed
=
true
;
}
}
}
},
throwable
->
{
ActionHandlerStorage
.
getL
(
sessionId
).
getInfo
().
isFollowed
=
false
;
ToastUtil
.
toastShort
(
throwable
.
toString
());});
}
}
private
void
showTips
()
{
...
...
@@ -499,7 +566,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
rela_zixun
.
setOnClickListener
(
view
->
{
if
(
ActionHandlerStorage
.
getL
(
sessionId
)
!=
null
)
{
if
(
expertConsultServiceListDialog
==
null
)
{
if
(
getActivity
()!=
null
)
{
if
(
getActivity
()
!=
null
)
{
expertConsultServiceListDialog
=
new
ExpertConsultServiceListDialog
(
getActivity
());
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/view/ImCommentBannerView.kt
View file @
31b740d3
...
...
@@ -121,8 +121,8 @@ class ImCommentBannerView : LinearLayout {
*/
fun
initData
(
list
:
ArrayList
<
ImCommendDetailBean
>?)
{
mHandler
.
removeCallbacksAndMessages
(
null
)
if
(
null
==
list
||
list
.
isEmpty
())
{
visibility
=
View
.
GON
E
if
(
null
==
list
||
list
.
isEmpty
()
||
list
.
size
==
0
)
{
visibility
=
View
.
INVISIBL
E
return
}
visibility
=
View
.
VISIBLE
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/view/ImRedStarGradeView.kt
0 → 100644
View file @
31b740d3
package
com.yidianling.uikit.business.session.view
import
android.content.Context
import
android.util.AttributeSet
import
android.view.Gravity
import
android.view.View
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.LinearLayout
import
com.ydl.ydlcommon.utils.LogUtil
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.im.R
import
kotlin.math.ceil
import
kotlin.math.floor
class
ImRedStarGradeView
:
LinearLayout
{
constructor
(
context
:
Context
)
:
super
(
context
)
{
mContext
=
context
initViews
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
)
:
super
(
context
,
attrs
)
{
mContext
=
context
initViews
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
,
defStyle
:
Int
)
:
super
(
context
,
attrs
,
defStyle
)
{
mContext
=
context
initViews
()
}
private
var
mContext
:
Context
?
=
null
private
fun
initViews
()
{
initView
()
}
/**
* 界面初始化
*/
private
fun
initView
()
{
orientation
=
HORIZONTAL
var
params
=
ViewGroup
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
RxImageTool
.
dp2px
(
11f
)
)
layoutParams
=
params
}
/**
* 设置分数
*/
fun
setGrade
(
grade
:
Float
)
{
try
{
val
generateGrade
=
floor
(
grade
.
toDouble
())
val
generateNumberInt
=
if
(
generateGrade
.
toInt
()
>
5
)
5
else
generateGrade
.
toInt
()
val
dp_11
=
RxImageTool
.
dp2px
(
11f
)
for
(
i
in
0
until
generateNumberInt
)
{
val
itemView
=
View
.
inflate
(
mContext
,
R
.
layout
.
im_good_icon_layout
,
null
)
val
params
=
LayoutParams
(
dp_11
,
dp_11
)
itemView
.
layoutParams
=
params
addView
(
itemView
)
}
if
(
grade
>
generateGrade
)
{
val
lastRate
=
grade
-
generateGrade
//外部布局
val
itemView
=
View
.
inflate
(
mContext
,
R
.
layout
.
im_good_icon_layout
,
null
)
val
params
=
LayoutParams
(
dp_11
,
dp_11
)
itemView
.
layoutParams
=
params
//左侧红色icon布局
val
redStarIconView
=
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
im_red_star
)
val
redStarParams
=
LayoutParams
(
RxImageTool
.
dp2px
((
lastRate
*
11f
).
toFloat
()),
dp_11
)
redStarIconView
.
layoutParams
=
redStarParams
val
redStarIconImg
=
itemView
.
findViewById
<
ImageView
>(
R
.
id
.
im_red_star_icon
)
val
redStarIconImgParams
=
LayoutParams
(
dp_11
,
dp_11
)
redStarIconImg
.
layoutParams
=
redStarIconImgParams
// 右侧灰色icon布局
val
greyStarIconView
=
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
im_grey_star
)
val
greyStarParams
=
LayoutParams
(
RxImageTool
.
dp2px
(((
1.0f
-
lastRate
)
*
11f
).
toFloat
()),
dp_11
)
greyStarIconView
.
layoutParams
=
greyStarParams
val
greyStarIconImg
=
itemView
.
findViewById
<
ImageView
>(
R
.
id
.
im_grey_star_icon
)
val
greyStarIconImgParams
=
LayoutParams
(
dp_11
,
dp_11
)
greyStarIconImgParams
.
gravity
=
Gravity
.
RIGHT
greyStarIconImg
.
layoutParams
=
greyStarIconImgParams
addView
(
itemView
)
}
//补全剩余的灰色icon
val
ceilGradeInt
=
(
ceil
(
grade
.
toDouble
())).
toInt
()
for
(
i
in
ceilGradeInt
until
5
)
{
val
itemView
=
View
.
inflate
(
mContext
,
R
.
layout
.
im_good_grey_icon_layout
,
null
)
val
params
=
LayoutParams
(
dp_11
,
dp_11
)
itemView
.
layoutParams
=
params
addView
(
itemView
)
}
}
catch
(
e
:
Exception
)
{
LogUtil
.
i
(
e
.
toString
())
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/bridge/IP2PCustomActionHandler.java
View file @
31b740d3
...
...
@@ -145,11 +145,13 @@ public interface IP2PCustomActionHandler {
public
int
busyTotal
=
0
;
//专家当前在与多少人聊天
public
String
tag1
=
""
;
//用与获取推荐专家列表接口的参数catName
public
double
doctorBriefInfoFeedbackRate
=
0.000
;
//好评
率 需要*100
public
double
doctorBriefInfoFeedbackRate
=
0.000
;
//好评
分
public
int
doctorBriefInfoOrderNum
=
0
;
//帮助人数
public
int
doctorBriefInfoHelpLong
=
0
;
//服务时长
public
String
doctorBriefInfoSmallImage
=
""
;
//小头像
public
Boolean
isFollowed
=
false
;
// 是否关注
public
int
commentCounter
=
0
;
public
String
commentCounterUrl
=
""
;
public
ArrayList
<
ImCommendDetailBean
>
commentList
;
...
...
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceApi.kt
View file @
31b740d3
...
...
@@ -3,10 +3,8 @@ package com.yidianling.uikit.custom.http
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.uikit.custom.http.response.ChatStatusBean
import
com.yidianling.uikit.custom.http.response.CommonQuestionBean
import
com.yidianling.uikit.custom.http.response.RecommendExpertBean
import
com.yidianling.uikit.custom.http.response.UserQuestInfoBean
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.yidianling.uikit.custom.http.response.*
import
io.reactivex.Observable
import
okhttp3.RequestBody
import
retrofit2.http.*
...
...
@@ -51,4 +49,9 @@ interface ServiceApi{
@POST
(
"user/collect/submit"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
submitUserCollect
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
//关注
@FormUrlEncoded
@POST
(
"sq-active/focus"
)
fun
focus
(
@FieldMap
params
:
Map
<
String
,
String
>):
Observable
<
BaseResponse
<
FocusBean
>>
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/ServiceImpl.kt
View file @
31b740d3
package
com.yidianling.uikit.custom.http
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.uikit.custom.http.response.ChatStatusBean
import
com.yidianling.uikit.custom.http.response.CommonQuestionBean
import
com.yidianling.uikit.custom.http.response.RecommendExpertBean
import
com.yidianling.uikit.custom.http.response.UserQuestInfoBean
import
com.yidianling.uikit.custom.http.request.FocusParams
import
com.yidianling.uikit.custom.http.response.*
import
io.reactivex.Observable
import
okhttp3.MediaType
import
okhttp3.RequestBody
...
...
@@ -68,4 +68,12 @@ class ServiceImpl private constructor(){
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
params
)
as
RequestBody
return
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
submitUserCollect
(
body
)
}
/**
* 关注用户
*/
fun
focus
(
param
:
FocusParams
):
Observable
<
BaseResponse
<
FocusBean
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
YDLHttpUtils
.
obtainApi
(
ServiceApi
::
class
.
java
).
focus
(
it
)
}
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/request/FocusParams.kt
0 → 100644
View file @
31b740d3
package
com.yidianling.uikit.custom.http.request
class
FocusParams
(
val
id
:
String
,
//话题id或用户uid
val
type
:
String
//业务类型:1关注用户,2关注话题
)
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/http/response/FocusBean.kt
0 → 100644
View file @
31b740d3
package
com.yidianling.uikit.custom.http.response
class
FocusBean
(
val
status
:
Int
)
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/widget/ConfideOrderInfoView.java
View file @
31b740d3
...
...
@@ -56,6 +56,7 @@ public class ConfideOrderInfoView extends RelativeLayout {
LayoutParams
params
=
new
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
params
.
leftMargin
=
RxImageTool
.
dp2px
(
8
f
);
params
.
rightMargin
=
RxImageTool
.
dp2px
(
8
f
);
params
.
topMargin
=
RxImageTool
.
dp2px
(
10
f
);
setLayoutParams
(
params
);
View
.
inflate
(
mContext
,
R
.
layout
.
im_nim_chat_confide_order_info_view
,
this
);
setBackground
(
getResources
().
getDrawable
(
R
.
drawable
.
im_bg_im_confide_action
));
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/ExpertInfoDialog.kt
View file @
31b740d3
...
...
@@ -13,7 +13,7 @@ import kotlinx.android.synthetic.main.im_safe_help_remind_dialog_layout.*
* 专家信息弹窗
* Created by xj on 2019/8/7.
*/
class
ExpertInfoDialog
(
val
mContext
:
Context
):
Dialog
(
mContext
,
R
.
style
.
dialog_default_style
)
{
class
ExpertInfoDialog
(
val
mContext
:
Context
,
val
help_num
:
String
,
val
server_num
:
String
,
val
good_num
:
String
):
Dialog
(
mContext
,
R
.
style
.
dialog_default_style
)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
...
...
@@ -26,6 +26,10 @@ class ExpertInfoDialog(val mContext: Context): Dialog(mContext, R.style.dialog_d
window
.
setGravity
(
Gravity
.
CENTER
)
window
.
attributes
=
params
im_expert_detail_help_num
.
text
=
help_num
im_expert_detail_server_num
.
text
=
server_num
im_expert_detail_good_num
.
text
=
good_num
expert_info_close
.
setOnClickListener
{
if
(
null
!=
mContext
)
{
dismiss
()
...
...
m-im/src/main/modular_api/com/yidianling/im/api/bean/IMShareDataBuild.java
View file @
31b740d3
...
...
@@ -41,6 +41,7 @@ public class IMShareDataBuild {
public
String
order_url
;
@SerializedName
(
value
=
"name"
,
alternate
=
"doctorName"
)
public
String
doctorName
;
public
Boolean
isFollowed
=
false
;
// 是否关注
/**
* 是否开启电话倾诉
* 1.开启 2.关闭
...
...
m-im/src/main/res_uikit/drawable-xhdpi/im_expert_info_dialog_top_bg.png
View replaced file @
4f7e47e8
View file @
31b740d3
519 KB
|
W:
|
H:
67.3 KB
|
W:
|
H:
2-up
Swipe
Onion skin
m-im/src/main/res_uikit/drawable-xhdpi/im_star_grey.png
0 → 100644
View file @
31b740d3
955 Bytes
m-im/src/main/res_uikit/drawable-xhdpi/im_star_red.png
0 → 100644
View file @
31b740d3
1.4 KB
m-im/src/main/res_uikit/drawable/im_bg_im_confide_action.xml
View file @
31b740d3
...
...
@@ -2,11 +2,7 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:topLeftRadius=
"18dp"
android:bottomLeftRadius=
"18dp"
/>
<corners
android:radius=
"6dp"
/>
<gradient
android:angle=
"180"
android:startColor=
"#FF406C"
android:endColor=
"#FF7A5C"
/>
<solid
android:color=
"@color/white"
/>
</shape>
\ No newline at end of file
m-im/src/main/res_uikit/drawable/im_bg_im_consult_action.xml
0 → 100644
View file @
31b740d3
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:topLeftRadius=
"18dp"
android:bottomLeftRadius=
"18dp"
/>
<gradient
android:angle=
"180"
android:startColor=
"#FF406C"
android:endColor=
"#FF7A5C"
/>
</shape>
\ No newline at end of file
m-im/src/main/res_uikit/drawable/im_expert_detail_bottom_bg.xml
0 → 100644
View file @
31b740d3
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#F7F7F7"
/>
<corners
android:radius=
"4dp"
/>
</shape>
\ No newline at end of file
m-im/src/main/res_uikit/drawable/im_expert_detail_dialog_top_bg.xml
0 → 100644
View file @
31b740d3
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:topLeftRadius=
"6dp"
android:topRightRadius=
"6dp"
/>
<gradient
android:angle=
"270"
android:startColor=
"#2E27A5F2"
android:endColor=
"#001DA1F2"
/>
</shape>
\ No newline at end of file
m-im/src/main/res_uikit/drawable/im_unfocus_btn_bg.xml
0 → 100644
View file @
31b740d3
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#FFFFFF"
/>
<corners
android:radius=
"10dp"
/>
<stroke
android:width=
"1dp"
android:color=
"#CCCCCC"
/>
</shape>
\ No newline at end of file
m-im/src/main/res_uikit/layout/im_expert_info_dialog_layout.xml
View file @
31b740d3
This diff is collapsed.
Click to expand it.
m-im/src/main/res_uikit/layout/im_good_grey_icon_layout.xml
0 → 100644
View file @
31b740d3
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<LinearLayout
android:id=
"@+id/im_grey_star"
android:layout_width=
"11dp"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/im_grey_star_icon"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"right"
android:src=
"@drawable/im_star_grey"
/>
</LinearLayout>
</LinearLayout>
m-im/src/main/res_uikit/layout/im_good_icon_layout.xml
0 → 100644
View file @
31b740d3
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<LinearLayout
android:id=
"@+id/im_red_star"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/im_red_star_icon"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:src=
"@drawable/im_star_red"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/im_grey_star"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/im_grey_star_icon"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"right"
android:src=
"@drawable/im_star_grey"
/>
</LinearLayout>
</LinearLayout>
m-im/src/main/res_uikit/layout/im_ydl_nim_message_fragment.xml
View file @
31b740d3
This diff is collapsed.
Click to expand 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