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
f4080b07
Commit
f4080b07
authored
Jun 28, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导医的入口和跳转
parent
92efbc41
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
225 additions
and
39 deletions
+225
-39
config.gradle
config.gradle
+7
-7
HotSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/HotSearchActivity.kt
+6
-7
SearchApi.kt
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
+1
-1
ConsultAssistantEntryUtils.kt
m-consultant/src/main/java/com/yidianling/consultant/modular/utils/ConsultAssistantEntryUtils.kt
+31
-19
consultant_activity_hot_search.xml
m-consultant/src/main/res/layout/consultant_activity_hot_search.xml
+0
-0
build.gradle
m-course/build.gradle
+2
-0
CourseItemNewView.kt
m-course/src/main/java/com/yidianling/course/widget/CourseItemNewView.kt
+5
-4
item_course_new_list_view.xml
m-course/src/main/res/layout/item_course_new_list_view.xml
+3
-1
dynamic_item_trends_content_list.xml
m-dynamic/src/main/res/layout/dynamic_item_trends_content_list.xml
+0
-0
SessionHelper.java
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
+3
-0
CustomAttachAssistantReceivedMoney.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachAssistantReceivedMoney.java
+83
-0
CustomAttachParser.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
+3
-0
CustomAttachmentType.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentType.java
+1
-0
MsgViewHolderAssistantReceivedMoney.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderAssistantReceivedMoney.java
+80
-0
No files found.
config.gradle
View file @
f4080b07
...
@@ -6,17 +6,17 @@ ext {
...
@@ -6,17 +6,17 @@ ext {
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.48.74"
,
"m-confide"
:
"0.0.48.74"
,
"m-consultant"
:
"0.0.59.2
3
"
,
"m-consultant"
:
"0.0.59.2
7
"
,
"m-fm"
:
"0.0.30.00"
,
"m-fm"
:
"0.0.30.00"
,
"m-user"
:
"0.0.60.21"
,
"m-user"
:
"0.0.60.21"
,
"m-home"
:
"0.0.22.20"
,
"m-home"
:
"0.0.22.20"
,
"m-im"
:
"0.0.18.1
4
"
,
"m-im"
:
"0.0.18.1
5
"
,
"m-dynamic"
:
"0.0.7.
70
"
,
"m-dynamic"
:
"0.0.7.
9
"
,
"m-article"
:
"0.0.0.6"
,
"m-article"
:
"0.0.0.6"
,
"m-muse"
:
"0.0.28.20"
,
"m-muse"
:
"0.0.28.20"
,
"m-tests"
:
"0.0.24.10"
,
"m-tests"
:
"0.0.24.10"
,
"m-course"
:
"0.0.42.
6
"
,
"m-course"
:
"0.0.42.
8
"
,
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.6"
,
"m-audioim-api"
:
"0.0.6"
,
...
@@ -40,7 +40,7 @@ ext {
...
@@ -40,7 +40,7 @@ ext {
"ydl-media"
:
"0.0.21.6"
,
"ydl-media"
:
"0.0.21.6"
,
"ydl-pay"
:
"0.0.18.9"
,
"ydl-pay"
:
"0.0.18.9"
,
"m-audioim"
:
"0.0.49.29.7"
,
"m-audioim"
:
"0.0.49.29.7"
,
"ydl-flutter-base"
:
"0.0.14.1
6
"
,
"ydl-flutter-base"
:
"0.0.14.1
8
"
,
//以下 几乎不会动
//以下 几乎不会动
"router"
:
"0.0.1"
,
"router"
:
"0.0.1"
,
...
@@ -102,7 +102,7 @@ ext {
...
@@ -102,7 +102,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.
2
"
,
"m-consultant-api"
:
"0.0.5.
3
"
,
"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"
,
...
@@ -121,7 +121,7 @@ ext {
...
@@ -121,7 +121,7 @@ ext {
"ydl-media"
:
"0.0.21.6"
,
"ydl-media"
:
"0.0.21.6"
,
"ydl-pay"
:
"0.0.18.9"
,
"ydl-pay"
:
"0.0.18.9"
,
"m-audioim"
:
"0.0.49.29.7"
,
"m-audioim"
:
"0.0.49.29.7"
,
"ydl-flutter-base"
:
"0.0.14.1
4
"
,
"ydl-flutter-base"
:
"0.0.14.1
8
"
,
//以下 几乎不会动
//以下 几乎不会动
"router"
:
"0.0.1"
,
"router"
:
"0.0.1"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/HotSearchActivity.kt
View file @
f4080b07
...
@@ -17,6 +17,7 @@ import com.google.gson.reflect.TypeToken
...
@@ -17,6 +17,7 @@ import com.google.gson.reflect.TypeToken
import
com.ydl.ydl_image.config.ISimpleImageOpConfig
import
com.ydl.ydl_image.config.ISimpleImageOpConfig
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.bean.StatusBarOptions
...
@@ -29,7 +30,6 @@ import com.ydl.ydlcommon.utils.StatusBarUtils
...
@@ -29,7 +30,6 @@ import com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.view.banner.GlideImageLoader
import
com.ydl.ydlcommon.view.banner.GlideImageLoader
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.bean.HotSearchBean
import
com.yidianling.consultant.bean.HotSearchBean
import
com.yidianling.consultant.bean.HotSearchFocusItemBean
import
com.yidianling.consultant.bean.HotSearchFocusItemBean
...
@@ -117,15 +117,14 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
...
@@ -117,15 +117,14 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
if
(
data
?.
size
?:
0
>
0
)
{
if
(
data
?.
size
?:
0
>
0
)
{
val
imageUrl
=
data
?.
get
(
0
)
?.
pic
val
imageUrl
=
data
?.
get
(
0
)
?.
pic
iv_daoyi_image
.
visibility
=
View
.
VISIBLE
iv_daoyi_image
.
visibility
=
View
.
VISIBLE
val
sp
=
SimpleImageOpConfiger
()
sp
.
transform
=
ISimpleImageOpConfig
.
TRANSFORM_ROUND
GlideApp
.
with
(
mContext
)
sp
.
radius
=
8
.
load
(
imageUrl
)
YDLImageCacheManager
.
showImage
(
mContext
,
imageUrl
,
iv_daoyi_image
,
sp
)
.
into
(
iv_daoyi_image
)
iv_daoyi_image
.
setOnClickListener
{
iv_daoyi_image
.
setOnClickListener
{
LogUtil
.
e
(
"跳转导医:location=${data?.get(0)!!.location},title=${data[0].title}"
)
LogUtil
.
e
(
"跳转导医:location=${data?.get(0)!!.location},title=${data[0].title}"
)
ConsultAssistantEntryUtils
.
jumpConsultAssistant
(
this
,
data
?.
get
(
0
)
!!
.
location
.
toInt
())
ConsultAssistantEntryUtils
.
jumpConsultAssistant
(
this
,
data
?.
get
(
0
)
!!
.
location
.
toInt
())
}
}
}
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
View file @
f4080b07
...
@@ -65,7 +65,7 @@ interface SearchApi {
...
@@ -65,7 +65,7 @@ interface SearchApi {
//获取咨询助理uid
//获取咨询助理uid
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"consult/assistant/chat-distribute"
)
@GET
(
"consult/assistant/chat-distribute"
)
fun
getConsultAssistantUidRequest
(
location
:
Int
):
Observable
<
BaseAPIResponse
<
Long
>>
fun
getConsultAssistantUidRequest
(
@Query
(
"location"
)
location
:
Int
):
Observable
<
BaseAPIResponse
<
Long
>>
//获取咨询助理uid
//获取咨询助理uid
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
...
...
m-consultant/src/main/java/com/yidianling/consultant/modular/utils/ConsultAssistantEntryUtils.kt
View file @
f4080b07
...
@@ -7,7 +7,6 @@ import com.ydl.ydlcommon.data.http.ThrowableConsumer
...
@@ -7,7 +7,6 @@ import com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
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.HotSearchActivity
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.constants.ConsultBIConstants
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.router.ConsultantIn
import
com.yidianling.consultant.router.ConsultantIn
...
@@ -16,26 +15,38 @@ import io.reactivex.functions.Consumer
...
@@ -16,26 +15,38 @@ import io.reactivex.functions.Consumer
import
io.reactivex.schedulers.Schedulers
import
io.reactivex.schedulers.Schedulers
class
ConsultAssistantEntryUtils
{
class
ConsultAssistantEntryUtils
{
companion
object
{
companion
object
{
@SuppressLint
(
"CheckResult"
)
@SuppressLint
(
"CheckResult"
)
fun
jumpConsultAssistant
(
activity
:
Activity
,
location
:
Int
){
fun
jumpConsultAssistant
(
activity
:
Activity
,
location
:
Int
)
{
ActionCountUtils
.
count
(
ConsultBIConstants
.
POSITION_DAOYI_ADVERTISEMENT_CLICK
,
"$location"
)
ActionCountUtils
.
count
(
// 请求接口获取咨询助理的uid
ConsultBIConstants
.
POSITION_DAOYI_ADVERTISEMENT_CLICK
,
SearchApi
.
getSearchApi
().
getConsultAssistantUidRequest
(
location
)
"$location"
.
subscribeOn
(
Schedulers
.
io
())
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
if
(!
ConsultantIn
.
isLogin
())
{
if
(
it
.
code
==
"200"
&&
it
.
data
!=
0
.
toLong
()
&&
null
!=
activity
)
{
ConsultantIn
.
toLogin
(
activity
)
ConsultantIn
.
startP2PSession
(
activity
as
AppCompatActivity
,
it
.
data
.
toString
())
}
else
{
}
else
{
// 请求接口获取咨询助理的uid
ToastUtil
.
toastShort
(
"咨询助理忙碌中,请稍后再试"
)
SearchApi
.
getSearchApi
().
getConsultAssistantUidRequest
(
location
)
}
.
subscribeOn
(
Schedulers
.
io
())
},
object
:
ThrowableConsumer
()
{
.
observeOn
(
AndroidSchedulers
.
mainThread
())
override
fun
accept
(
msg
:
String
)
{
.
subscribe
(
Consumer
{
if
(
null
!=
activity
&&
activity
is
ConsultAssistantCenterActivity
&&
!
activity
.
isFinishing
)
activity
.
finish
()
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
)
{
if
(
null
!=
activity
&&
activity
is
ConsultAssistantCenterActivity
&&
!
activity
.
isFinishing
)
activity
.
finish
()
}
}
}
}
)
)
}
}
}
}
}
}
}
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_activity_hot_search.xml
View file @
f4080b07
This diff is collapsed.
Click to expand it.
m-course/build.gradle
View file @
f4080b07
...
@@ -81,6 +81,8 @@ dependencies {
...
@@ -81,6 +81,8 @@ dependencies {
//发布时使用
//发布时使用
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-dynamic-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-dynamic-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
'ydl-m-consultant-api'
]
// compileOnlyrootProject.ext.dependencies['com.ydl:m-consultant-api']
api
rootProject
.
ext
.
dependencies
[
"ydl-webview"
]
api
rootProject
.
ext
.
dependencies
[
"ydl-webview"
]
api
(
rootProject
.
ext
.
dependencies
[
"ydl-media"
]){
api
(
rootProject
.
ext
.
dependencies
[
"ydl-media"
]){
transitive
=
true
transitive
=
true
...
...
m-course/src/main/java/com/yidianling/course/widget/CourseItemNewView.kt
View file @
f4080b07
...
@@ -253,10 +253,11 @@ class CourseItemNewView : ConstraintLayout {
...
@@ -253,10 +253,11 @@ class CourseItemNewView : ConstraintLayout {
fun
setGuideData
(
bean
:
GuideBean
)
{
fun
setGuideData
(
bean
:
GuideBean
)
{
view_bottom_line
.
visibility
=
View
.
INVISIBLE
view_bottom_line
.
visibility
=
View
.
INVISIBLE
iv_guide_image
.
visibility
=
View
.
VISIBLE
iv_guide_image
.
visibility
=
View
.
VISIBLE
val
sp
=
SimpleImageOpConfiger
()
sp
.
transform
=
ISimpleImageOpConfig
.
TRANSFORM_ROUND
GlideApp
.
with
(
mContext
)
sp
.
radius
=
8
.
load
(
bean
.
pic
)
YDLImageCacheManager
.
showImage
(
mContext
,
bean
.
pic
,
iv_guide_image
,
sp
)
.
into
(
iv_guide_image
)
iv_guide_image
.
setOnClickListener
{
iv_guide_image
.
setOnClickListener
{
provide
(
IConsultantService
::
class
.
java
).
jumpConsultAssistant
(
mContext
as
Activity
,
bean
.
location
.
toInt
())
provide
(
IConsultantService
::
class
.
java
).
jumpConsultAssistant
(
mContext
as
Activity
,
bean
.
location
.
toInt
())
}
}
...
...
m-course/src/main/res/layout/item_course_new_list_view.xml
View file @
f4080b07
...
@@ -235,13 +235,15 @@
...
@@ -235,13 +235,15 @@
android:background=
"@color/course_color_EBEBEB"
android:background=
"@color/course_color_EBEBEB"
app:layout_constraintTop_toBottomOf=
"@+id/iv_head"
/>
app:layout_constraintTop_toBottomOf=
"@+id/iv_head"
/>
<ImageView
<
com.ydl.ydlcommon.view.widgets.Round
ImageView
android:id=
"@+id/iv_guide_image"
android:id=
"@+id/iv_guide_image"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"90dp"
android:layout_height=
"90dp"
android:visibility=
"gone"
android:visibility=
"gone"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
tools:visibility=
"visible"
tools:visibility=
"visible"
app:pa_borderRadius=
"8dp"
app:pa_type=
"pa_round"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/iv_head"
app:layout_constraintTop_toBottomOf=
"@+id/iv_head"
/>
/>
...
...
m-dynamic/src/main/res/layout/dynamic_item_trends_content_list.xml
View file @
f4080b07
This diff is collapsed.
Click to expand it.
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
View file @
f4080b07
...
@@ -34,6 +34,7 @@ import com.yidianling.im.session.action.OrderAction;
...
@@ -34,6 +34,7 @@ import com.yidianling.im.session.action.OrderAction;
import
com.yidianling.im.session.action.RedPacketAction
;
import
com.yidianling.im.session.action.RedPacketAction
;
import
com.yidianling.im.session.action.SendCardAction
;
import
com.yidianling.im.session.action.SendCardAction
;
import
com.yidianling.im.session.action.TeamAVChatAction
;
import
com.yidianling.im.session.action.TeamAVChatAction
;
import
com.yidianling.im.session.extension.CustomAttachAssistantReceivedMoney
;
import
com.yidianling.im.session.extension.CustomAttachChatTipMsg
;
import
com.yidianling.im.session.extension.CustomAttachChatTipMsg
;
import
com.yidianling.im.session.extension.CustomAttachConsult
;
import
com.yidianling.im.session.extension.CustomAttachConsult
;
import
com.yidianling.im.session.extension.CustomAttachConsultCallStatus
;
import
com.yidianling.im.session.extension.CustomAttachConsultCallStatus
;
...
@@ -63,6 +64,7 @@ import com.yidianling.im.session.extension.CustomSystemTips;
...
@@ -63,6 +64,7 @@ import com.yidianling.im.session.extension.CustomSystemTips;
import
com.yidianling.im.session.extension.DefaultCustomAttachment
;
import
com.yidianling.im.session.extension.DefaultCustomAttachment
;
import
com.yidianling.im.session.extension.StickerAttachment
;
import
com.yidianling.im.session.extension.StickerAttachment
;
import
com.yidianling.im.session.viewholder.MsgViewHolderAVChat
;
import
com.yidianling.im.session.viewholder.MsgViewHolderAVChat
;
import
com.yidianling.im.session.viewholder.MsgViewHolderAssistantReceivedMoney
;
import
com.yidianling.im.session.viewholder.MsgViewHolderChatTip
;
import
com.yidianling.im.session.viewholder.MsgViewHolderChatTip
;
import
com.yidianling.im.session.viewholder.MsgViewHolderConsult
;
import
com.yidianling.im.session.viewholder.MsgViewHolderConsult
;
import
com.yidianling.im.session.viewholder.MsgViewHolderConsultCallStatus
;
import
com.yidianling.im.session.viewholder.MsgViewHolderConsultCallStatus
;
...
@@ -415,6 +417,7 @@ public class SessionHelper {
...
@@ -415,6 +417,7 @@ public class SessionHelper {
NimUIKit
.
registerMsgItemViewHolder
(
CustomCustomerServiceCardAttachment
.
class
,
MsgViewHolderCustomerServiceCard
.
class
);
//客服小壹名片
NimUIKit
.
registerMsgItemViewHolder
(
CustomCustomerServiceCardAttachment
.
class
,
MsgViewHolderCustomerServiceCard
.
class
);
//客服小壹名片
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentShareMsg
.
class
,
MsgViewHolderShareMsg
.
class
);
//分享推送
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentShareMsg
.
class
,
MsgViewHolderShareMsg
.
class
);
//分享推送
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachConsultCallStatus
.
class
,
MsgViewHolderConsultCallStatus
.
class
);
//咨询声网的拨打状态
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachConsultCallStatus
.
class
,
MsgViewHolderConsultCallStatus
.
class
);
//咨询声网的拨打状态
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachAssistantReceivedMoney
.
class
,
MsgViewHolderAssistantReceivedMoney
.
class
);
}
}
private
static
void
setSessionListener
()
{
private
static
void
setSessionListener
()
{
...
...
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachAssistantReceivedMoney.java
0 → 100644
View file @
f4080b07
package
com
.
yidianling
.
im
.
session
.
extension
;
import
com.alibaba.fastjson.JSONObject
;
/**
* 收款消息拓展
* Created by harvie on 2017/1/10.
*/
public
class
CustomAttachAssistantReceivedMoney
extends
CustomAttachment
{
private
static
final
String
KEY_TITLE
=
"title"
;
private
static
final
String
KEY_NUM
=
"num"
;
private
static
final
String
KEY_ORPAY
=
"orPay"
;
private
static
final
String
KEY_URL
=
"url"
;
private
String
num
=
""
;
//订单金额
private
String
title
=
""
;
//订单标题题
private
int
orPay
;
//支付状态 0未支付1已支付
private
String
url
=
""
;
//订单id
public
CustomAttachAssistantReceivedMoney
()
{
super
(
CustomAttachmentType
.
ASSISTANT_RECEIVEDMONEY
);
}
public
CustomAttachAssistantReceivedMoney
(
String
num
,
String
title
,
int
orPay
,
String
url
)
{
super
(
CustomAttachmentType
.
ASSISTANT_RECEIVEDMONEY
);
this
.
num
=
num
;
this
.
title
=
title
;
this
.
orPay
=
orPay
;
this
.
url
=
url
;
}
@Override
protected
void
parseData
(
JSONObject
data
)
{
this
.
url
=
data
.
getString
(
KEY_URL
);
this
.
title
=
data
.
getString
(
KEY_TITLE
);
this
.
num
=
data
.
getString
(
KEY_NUM
);
this
.
orPay
=
data
.
getInteger
(
KEY_ORPAY
);
}
@Override
protected
JSONObject
packData
()
{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
KEY_URL
,
url
);
data
.
put
(
KEY_TITLE
,
title
);
data
.
put
(
KEY_NUM
,
num
);
data
.
put
(
KEY_ORPAY
,
orPay
);
return
data
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
int
getOrPay
()
{
return
orPay
;
}
public
String
getTitle
()
{
return
title
;
}
public
String
getNum
()
{
return
num
;
}
public
void
setNum
(
String
num
)
{
this
.
num
=
num
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
void
setOrPay
(
int
orPay
)
{
this
.
orPay
=
orPay
;
}
}
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
View file @
f4080b07
...
@@ -115,6 +115,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
...
@@ -115,6 +115,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
//咨询的声网拨打状态的自定义消息
//咨询的声网拨打状态的自定义消息
attachment
=
new
CustomAttachConsultCallStatus
();
attachment
=
new
CustomAttachConsultCallStatus
();
break
;
break
;
case
CustomAttachmentType
.
ASSISTANT_RECEIVEDMONEY
:
attachment
=
new
CustomAttachAssistantReceivedMoney
();
break
;
default
:
default
:
attachment
=
new
DefaultCustomAttachment
();
attachment
=
new
DefaultCustomAttachment
();
break
;
break
;
...
...
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentType.java
View file @
f4080b07
...
@@ -34,4 +34,5 @@ public interface CustomAttachmentType {
...
@@ -34,4 +34,5 @@ public interface CustomAttachmentType {
int
TYPE_PUSH_SHARE
=
30
;
// 分享,倾诉推荐,课程,测评,文章
int
TYPE_PUSH_SHARE
=
30
;
// 分享,倾诉推荐,课程,测评,文章
int
TYPE_CUSTOMER_SERVICE
=
31
;
//客服名片
int
TYPE_CUSTOMER_SERVICE
=
31
;
//客服名片
int
TYPE_CUSTOMER_CONSULT_CALL_STATUS
=
32
;
//咨询的声网拨打状态的自定义消息
int
TYPE_CUSTOMER_CONSULT_CALL_STATUS
=
32
;
//咨询的声网拨打状态的自定义消息
int
ASSISTANT_RECEIVEDMONEY
=
33
;
//发起收款
}
}
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderAssistantReceivedMoney.java
0 → 100644
View file @
f4080b07
package
com
.
yidianling
.
im
.
session
.
viewholder
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.ydl.webview.H5Params
;
import
com.ydl.webview.NewH5Activity
;
import
com.ydl.ydlcommon.base.config.HttpConfig
;
import
com.yidianling.im.R
;
import
com.yidianling.im.session.extension.CustomAttachAssistantReceivedMoney
;
import
com.yidianling.im.session.extension.CustomAttachReceivedMoney
;
import
com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
;
import
com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
;
/**
* 收款消息拓展
* Created by wi1ls on 2017/1/10.
*/
public
class
MsgViewHolderAssistantReceivedMoney
extends
MsgViewHolderBase
{
private
String
num
;
//订单金额
private
String
title
;
//订单标题题
private
int
orPay
;
//支付状态 0未支付1已支付
private
String
url
;
//订单url
private
View
message_received
;
private
TextView
tit
,
content
;
private
ImageView
img
;
public
MsgViewHolderAssistantReceivedMoney
(
BaseMultiItemFetchLoadAdapter
adapter
)
{
super
(
adapter
);
}
@Override
protected
int
getContentResId
()
{
return
R
.
layout
.
im_ui_message_received_money
;
}
@Override
protected
void
inflateContentView
()
{
message_received
=
findViewById
(
R
.
id
.
message_received
);
tit
=
findViewById
(
R
.
id
.
packet_title
);
content
=
findViewById
(
R
.
id
.
text_content
);
img
=
findViewById
(
R
.
id
.
packte_im
);
}
@Override
protected
void
bindContentView
()
{
CustomAttachAssistantReceivedMoney
customAttachReceivedMoney
=
(
CustomAttachAssistantReceivedMoney
)
message
.
getAttachment
();
url
=
customAttachReceivedMoney
.
getUrl
();
num
=
customAttachReceivedMoney
.
getNum
();
title
=
customAttachReceivedMoney
.
getTitle
();
orPay
=
customAttachReceivedMoney
.
getOrPay
();
num
=
customAttachReceivedMoney
.
getNum
();
if
(
title
!=
null
)
tit
.
setText
(
title
);
if
(
orPay
==
1
)
{
//支付成功
if
(
num
!=
null
)
content
.
setText
(
"您支付了"
+
num
+
"元"
);
img
.
setImageDrawable
(
view
.
getResources
().
getDrawable
(
R
.
mipmap
.
im_zhifu
));
}
else
{
if
(
num
!=
null
)
content
.
setText
(
"您需要支付"
+
num
+
"元"
);
img
.
setImageDrawable
(
view
.
getResources
().
getDrawable
(
R
.
mipmap
.
im_weifu
));
}
hideItemBg
();
}
@Override
protected
void
onItemClick
()
{
if
(
isReceivedMessage
())
{
NewH5Activity
.
start
(
view
.
getContext
(),
new
H5Params
(
url
,
null
));
}
}
}
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