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
a002933e
Commit
a002933e
authored
May 30, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 消息ui还原、倾诉支付
parent
c312118b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
24 deletions
+32
-24
ConfideBottomSheetDialogFragment.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
+16
-5
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+1
-1
ItemIntroHolder.kt
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
+5
-5
SessionHelper.java
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
+1
-1
MsgViewHolderConsultCallStatus.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderConsultCallStatus.java
+4
-8
im_ui_message_custom_confide.xml
m-im/src/main/res/layout/im_ui_message_custom_confide.xml
+5
-4
No files found.
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
View file @
a002933e
...
@@ -29,10 +29,12 @@ import com.ydl.webview.ProgressWebView
...
@@ -29,10 +29,12 @@ import com.ydl.webview.ProgressWebView
import
com.ydl.webview.TellData
import
com.ydl.webview.TellData
import
com.ydl.webview.WebModularServiceUtils
import
com.ydl.webview.WebModularServiceUtils
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.utils.ScreenUtil
import
com.ydl.ydlcommon.utils.TimeUtil
import
com.ydl.ydlcommon.utils.TimeUtil
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.ydl.ydlnet.YDLHttpUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.api.service.IImService
import
com.yidianling.im.api.service.IImService
import
com.yidianling.user.api.service.IUserService
import
com.yidianling.user.api.service.IUserService
...
@@ -66,6 +68,8 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
...
@@ -66,6 +68,8 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
lateinit
var
layout_change_text
:
View
lateinit
var
layout_change_text
:
View
lateinit
var
layoutBottom
:
View
lateinit
var
layoutBottom
:
View
lateinit
var
itemView
:
View
lateinit
var
itemView
:
View
var
bottomSheet
:
FrameLayout
?=
null
private
var
behavior
:
BottomSheetBehavior
<*>?
=
null
private
var
behavior
:
BottomSheetBehavior
<*>?
=
null
...
@@ -194,7 +198,6 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
...
@@ -194,7 +198,6 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
}
}
}
override
fun
onCreateDialog
(
savedInstanceState
:
Bundle
?):
Dialog
{
override
fun
onCreateDialog
(
savedInstanceState
:
Bundle
?):
Dialog
{
val
dialog
=
super
.
onCreateDialog
(
savedInstanceState
)
as
BottomSheetDialog
val
dialog
=
super
.
onCreateDialog
(
savedInstanceState
)
as
BottomSheetDialog
onShowReady
()
onShowReady
()
...
@@ -209,10 +212,17 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
...
@@ -209,10 +212,17 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
FrameLayout
.
LayoutParams
.
WRAP_CONTENT
).
apply
{
gravity
=
Gravity
.
BOTTOM
or
Gravity
.
CENTER_HORIZONTAL
}
).
apply
{
gravity
=
Gravity
.
BOTTOM
or
Gravity
.
CENTER_HORIZONTAL
}
dialog
?.
window
?.
addContentView
(
itemView
,
layoutParams
)
dialog
?.
window
?.
addContentView
(
itemView
,
layoutParams
)
val
bottomSheet
=
bottomSheet
=
(
it
as
BottomSheetDialog
).
findViewById
<
View
>(
com
.
google
.
android
.
material
.
R
.
id
.
design_bottom_sheet
)
as
FrameLayout
?
(
it
as
BottomSheetDialog
).
findViewById
<
View
>(
com
.
google
.
android
.
material
.
R
.
id
.
design_bottom_sheet
)
as
FrameLayout
?
behavior
=
BottomSheetBehavior
.
from
(
bottomSheet
!!
)
behavior
=
BottomSheetBehavior
.
from
(
bottomSheet
!!
)
behavior
?.
peekHeight
=
(
resources
.
displayMetrics
.
heightPixels
*
0.7F
).
roundToInt
()
behavior
?.
peekHeight
=
(
resources
.
displayMetrics
.
heightPixels
*
0.7F
).
roundToInt
()
if
(
jumpUrl
?.
contains
(
"payPage=1"
)){
//支付70%高度
setMaxHeight
(
RxImageTool
.
dp2px
(
495f
))
}
else
{
setMaxHeight
(
resources
.
displayMetrics
.
heightPixels
)
}
//true是跳过peekHeight,直接滑下去,false是可以滑动到顶部还可以保持peekHeight在滑下去
//true是跳过peekHeight,直接滑下去,false是可以滑动到顶部还可以保持peekHeight在滑下去
// behavior?.skipCollapsed=true
// behavior?.skipCollapsed=true
behavior
?.
addBottomSheetCallback
(
object
:
BottomSheetBehavior
.
BottomSheetCallback
()
{
behavior
?.
addBottomSheetCallback
(
object
:
BottomSheetBehavior
.
BottomSheetCallback
()
{
...
@@ -242,7 +252,10 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
...
@@ -242,7 +252,10 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
}
return
dialog
return
dialog
}
}
private
fun
setMaxHeight
(
height
:
Int
){
bottomSheet
?.
layoutParams
?.
height
=
height
bottomSheet
?.
requestLayout
()
}
private
fun
callJsFun
(
wv_content
:
ProgressWebView
,
funcName
:
String
)
{
private
fun
callJsFun
(
wv_content
:
ProgressWebView
,
funcName
:
String
)
{
val
sb
=
StringBuffer
(
"javascript:"
)
val
sb
=
StringBuffer
(
"javascript:"
)
sb
.
append
(
funcName
)
sb
.
append
(
funcName
)
...
@@ -287,10 +300,8 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
...
@@ -287,10 +300,8 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
private
fun
webViewInit
(
wv_content
:
ProgressWebView
)
{
private
fun
webViewInit
(
wv_content
:
ProgressWebView
)
{
val
setting
:
WebSettings
=
wv_content
?.
settings
!!
val
setting
:
WebSettings
=
wv_content
?.
settings
!!
//支持js
//支持js
//支持js
setting
.
setJavaScriptEnabled
(
true
)
setting
.
setJavaScriptEnabled
(
true
)
//设置字符编码
//设置字符编码
//设置字符编码
setting
.
setDefaultTextEncodingName
(
"GBK"
)
setting
.
setDefaultTextEncodingName
(
"GBK"
)
setting
.
setDomStorageEnabled
(
true
)
setting
.
setDomStorageEnabled
(
true
)
val
appCachePath
:
String
=
context
?.
getCacheDir
()
?.
getAbsolutePath
().
toString
()
val
appCachePath
:
String
=
context
?.
getCacheDir
()
?.
getAbsolutePath
().
toString
()
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
a002933e
...
@@ -220,7 +220,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
...
@@ -220,7 +220,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
}
}
private
fun
showDoctorDetail
(
confideId
:
String
,
doctorId
:
String
)
{
private
fun
showDoctorDetail
(
confideId
:
String
,
doctorId
:
String
)
{
val
url
=
HttpConfig
.
MH5_URL
+
ConfideRoute
.
h5ConfideIntro
(
confideId
)
val
url
=
HttpConfig
.
MH5_URL
+
ConfideRoute
.
h5ConfideIntro
(
confideId
)
+
"&payPage=1"
ConfideBottomSheetDialogFragment
()
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
this
@ConfideHomeActivity
,
url
,
doctorId
)
.
showBottomSheetDialog
(
this
@ConfideHomeActivity
,
url
,
doctorId
)
}
}
...
...
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
View file @
a002933e
...
@@ -60,7 +60,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
...
@@ -60,7 +60,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
)
)
if
(!
item
.
confideId
.
isNullOrBlank
())
{
if
(!
item
.
confideId
.
isNullOrBlank
())
{
ConfideWebServiceImpl
().
connectionJava
(
item
.
confideId
!!
.
toInt
(),
3
,
it
.
context
as
Activity
,
null
)
{
ConfideWebServiceImpl
().
connectionJava
(
item
.
confideId
!!
.
toInt
(),
3
,
it
.
context
as
Activity
,
null
)
{
showDoctorDetail
(
item
)
showDoctorDetail
(
item
,
true
)
}
}
}
}
// showDoctorDetail(item)
// showDoctorDetail(item)
...
@@ -102,7 +102,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
...
@@ -102,7 +102,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item
.
confideId
?:
""
,
item
.
confideId
?:
""
,
"4"
"4"
)
)
showDoctorDetail
(
item
)
showDoctorDetail
(
item
,
false
)
}
}
binding
.
ivAvatar
.
setOnClickListener
{
binding
.
ivAvatar
.
setOnClickListener
{
ActionCountUtils
.
record
(
ActionCountUtils
.
record
(
...
@@ -118,7 +118,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
...
@@ -118,7 +118,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item
.
confideId
?:
""
,
item
.
confideId
?:
""
,
"3"
"3"
)
)
showDoctorDetail
(
item
)
showDoctorDetail
(
item
,
false
)
}
}
binding
.
vDisableClick
.
setOnClickListener
{
}
binding
.
vDisableClick
.
setOnClickListener
{
}
binding
.
btnShare
.
setOnClickListener
{
binding
.
btnShare
.
setOnClickListener
{
...
@@ -278,9 +278,9 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
...
@@ -278,9 +278,9 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
disposable
?.
dispose
()
disposable
?.
dispose
()
}
}
private
fun
showDoctorDetail
(
item
:
VideoViewModel
)
{
private
fun
showDoctorDetail
(
item
:
VideoViewModel
,
toPay
:
Boolean
)
{
item
.
confideId
?.
let
{
item
.
confideId
?.
let
{
val
url
=
HttpConfig
.
MH5_URL
+
ConfideRoute
.
h5ConfideIntro
(
it
)
val
url
=
HttpConfig
.
MH5_URL
+
ConfideRoute
.
h5ConfideIntro
(
it
)
+
if
(
toPay
)
"&payPage=1"
else
""
ConfideBottomSheetDialogFragment
()
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
itemView
.
context
as
FragmentActivity
,
url
,
item
.
doctorId
!!
)
.
showBottomSheetDialog
(
itemView
.
context
as
FragmentActivity
,
url
,
item
.
doctorId
!!
)
}
}
...
...
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
View file @
a002933e
...
@@ -466,7 +466,7 @@ public class SessionHelper {
...
@@ -466,7 +466,7 @@ public class SessionHelper {
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachConsultPerfectData
.
class
,
MsgViewHolderPerfectConsultData
.
class
);
//完善咨询资料提醒消息
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachConsultPerfectData
.
class
,
MsgViewHolderPerfectConsultData
.
class
);
//完善咨询资料提醒消息
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachPleaseSubscribeConsultDate
.
class
,
MsgViewHolderPleaseSubscribeConsultDate
.
class
);
//请预约咨询时间
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachPleaseSubscribeConsultDate
.
class
,
MsgViewHolderPleaseSubscribeConsultDate
.
class
);
//请预约咨询时间
NimUIKit
.
registerMsgItemViewHolder
(
CustomCustomerServiceCardAttachment
.
class
,
MsgViewHolderCustomerServiceCard
.
class
);
//客服小壹名片
NimUIKit
.
registerMsgItemViewHolder
(
CustomCustomerServiceCardAttachment
.
class
,
MsgViewHolderCustomerServiceCard
.
class
);
//客服小壹名片
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentShareMsg
.
class
,
MsgViewHolderShareMsg
.
class
);
//分享推送
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentShareMsg
.
class
,
MsgViewHolderShareMsg
.
class
);
//分享推送
30
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachConsultCallStatus
.
class
,
MsgViewHolderConsultCallStatus
.
class
);
//咨询声网的拨打状态 32
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachConsultCallStatus
.
class
,
MsgViewHolderConsultCallStatus
.
class
);
//咨询声网的拨打状态 32
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachAssistantReceivedMoney
.
class
,
MsgViewHolderAssistantReceivedMoney
.
class
);
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachAssistantReceivedMoney
.
class
,
MsgViewHolderAssistantReceivedMoney
.
class
);
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentBusinessCard
.
class
,
MsgViewHolderBusinessCard
.
class
);
//专家自定义名片 ,TYPE=34
NimUIKit
.
registerMsgItemViewHolder
(
CustomAttachmentBusinessCard
.
class
,
MsgViewHolderBusinessCard
.
class
);
//专家自定义名片 ,TYPE=34
...
...
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderConsultCallStatus.java
View file @
a002933e
package
com
.
yidianling
.
im
.
session
.
viewholder
;
package
com
.
yidianling
.
im
.
session
.
viewholder
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
android.widget.TextView
;
...
@@ -52,14 +51,11 @@ public class MsgViewHolderConsultCallStatus extends MsgViewHolderBase {
...
@@ -52,14 +51,11 @@ public class MsgViewHolderConsultCallStatus extends MsgViewHolderBase {
typeImageRight
.
setVisibility
(
View
.
VISIBLE
);
typeImageRight
.
setVisibility
(
View
.
VISIBLE
);
}
}
if
(
TextUtils
.
equals
(
"1"
,
customAttachTipMsg
.
getStatus
()))
{
statusLabel
.
setText
(
customAttachTipMsg
.
getDuration
());
if
(
isReceivedMessage
())
{
statusLabel
.
setText
(
customAttachTipMsg
.
getCallee
());
}
else
{
}
else
{
if
(
isReceivedMessage
())
{
statusLabel
.
setText
(
customAttachTipMsg
.
getCaller
());
statusLabel
.
setText
(
customAttachTipMsg
.
getCallee
());
}
else
{
statusLabel
.
setText
(
customAttachTipMsg
.
getCaller
());
}
}
}
//只有倾诉加角标,咨询不加
//只有倾诉加角标,咨询不加
if
(!
"true"
.
equals
(
customAttachTipMsg
.
getIsConsultOrder
()))
{
if
(!
"true"
.
equals
(
customAttachTipMsg
.
getIsConsultOrder
()))
{
...
...
m-im/src/main/res/layout/im_ui_message_custom_confide.xml
View file @
a002933e
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<TextView
<TextView
android:padding=
"12dp"
android:id=
"@+id/tv_title"
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -20,9 +21,9 @@
...
@@ -20,9 +21,9 @@
android:id=
"@+id/message_layout"
android:id=
"@+id/message_layout"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"88dp"
android:layout_height=
"88dp"
android:layout_marginLeft=
"12dp"
android:layout_marginRight=
"12dp"
android:layout_below=
"@+id/tv_title"
android:layout_below=
"@+id/tv_title"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"11dp"
android:background=
"@drawable/im_bg_push_confide_content"
android:background=
"@drawable/im_bg_push_confide_content"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:padding=
"10dp"
>
android:padding=
"10dp"
>
...
@@ -103,15 +104,15 @@
...
@@ -103,15 +104,15 @@
android:layout_below=
"@+id/message_layout"
android:layout_below=
"@+id/message_layout"
android:layout_alignLeft=
"@+id/message_layout"
android:layout_alignLeft=
"@+id/message_layout"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:padding=
"12dp"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"
18dp
"
android:layout_height=
"
wrap_content
"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
android:includeFontPadding=
"false"
android:includeFontPadding=
"false"
android:text=
"¥"
android:text=
"¥"
android:textSize=
"8sp"
android:textSize=
"8sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
...
...
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