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
61142785
Commit
61142785
authored
May 28, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加uid
parent
b72f91de
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
24 deletions
+38
-24
ConfideBottomSheetDialogFragment.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
+23
-14
VideoShowAdapter.kt
m-confide/src/main/java/com/ydl/confide/home/adapter/VideoShowAdapter.kt
+5
-2
ConfideHomeBodyBean.kt
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideHomeBodyBean.kt
+2
-1
ConfideHomeEventImpl.kt
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
+4
-3
IConfideHomeEvent.kt
m-confide/src/main/java/com/ydl/confide/home/event/IConfideHomeEvent.kt
+1
-1
ConfideHomeRecommendExpertItemView.kt
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendExpertItemView.kt
+1
-1
ConfideHomeRecommendView.kt
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendView.kt
+2
-2
No files found.
m-confide/src/main/java/com/ydl/confide/home/ConfideBottomSheetDialogFragment.kt
View file @
61142785
...
...
@@ -47,6 +47,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
private
const
val
KEY_JUMP_URL
=
"jumpUrl"
private
const
val
KEY_DOCTOR_ID
=
"doctor_id"
private
const
val
KEY_SHOULD_SHOW
=
"should_show"
private
const
val
KEY_UID
=
"uid"
}
private
var
firstVisitWXH5PayUrl
=
true
...
...
@@ -70,17 +71,19 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
lateinit
var
jumpUrl
:
String
lateinit
var
doctorId
:
String
var
shouldShow
:
Boolean
?
=
false
var
uid
:
String
?=
"0"
var
uid
:
String
?
=
null
fun
showBottomSheetDialog
(
activity
:
FragmentActivity
,
jumpUrl
:
String
,
doctorId
:
String
,
shouldShow
:
Boolean
=
false
shouldShow
:
Boolean
=
false
,
uid
:
String
?
=
null
)
{
arguments
=
Bundle
().
apply
{
putString
(
KEY_JUMP_URL
,
jumpUrl
)
putString
(
KEY_DOCTOR_ID
,
doctorId
)
putBoolean
(
KEY_SHOULD_SHOW
,
shouldShow
)
uid
?.
let
{
putString
(
KEY_UID
,
it
)
}
}
show
(
activity
.
supportFragmentManager
,
"confide_bottom_showdialog"
)
}
...
...
@@ -106,6 +109,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
jumpUrl
=
arguments
?.
getString
(
KEY_JUMP_URL
)
?:
""
doctorId
=
arguments
?.
getString
(
KEY_DOCTOR_ID
)
?:
""
shouldShow
=
arguments
?.
getBoolean
(
KEY_SHOULD_SHOW
)
?:
false
uid
=
arguments
?.
getString
(
KEY_UID
)
onLoadDialStatus
(
doctorId
)
// +
wv_content
=
view
.
findViewById
<
ProgressWebView
>(
com
.
ydl
.
webview
.
R
.
id
.
wv_content
)
...
...
@@ -145,7 +149,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
private
fun
onShowReady
(){
private
fun
onShowReady
()
{
itemView
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
confide_bottom_two
,
null
,
false
)
layoutCall
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutCall
)
layoutChange
=
itemView
.
findViewById
<
View
>(
R
.
id
.
layoutChange
)
...
...
@@ -159,7 +163,10 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
val
isLogin
=
userService
.
isLogin
()
first_order
.
visibility
=
if
(
isLogin
)
View
.
GONE
else
View
.
VISIBLE
layoutCall
.
setOnClickListener
{
ActionCountUtils
.
record
(
"ydl_experts_detail_popupwindows_page"
,
"ydl_experts_detail_popupwindows_page_visit"
)
ActionCountUtils
.
record
(
"ydl_experts_detail_popupwindows_page"
,
"ydl_experts_detail_popupwindows_page_visit"
)
if
(!
PhoneCallIn
.
loginByOneKeyLogin
(
requireContext
(),
true
))
{
return
@setOnClickListener
}
...
...
@@ -258,18 +265,19 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
updateChange
(
event
.
doctorID
,
event
.
title
,
event
.
uid
)
}
private
fun
updateChange
(
doctorId
:
String
,
title
:
String
,
uid
:
String
)
{
private
fun
updateChange
(
doctorId
:
String
,
title
:
String
,
uid
:
String
)
{
if
(
doctorId
==
"0"
)
{
//没有下一位了
layoutChange
.
visibility
=
View
.
GONE
return
}
this
.
uid
=
uid
text_title
.
text
=
title
confideProgress
.
visibility
=
View
.
GONE
layout_change_text
.
visibility
=
View
.
VISIBLE
this
.
uid
=
uid
text_title
.
text
=
title
confideProgress
.
visibility
=
View
.
GONE
layout_change_text
.
visibility
=
View
.
VISIBLE
onLoadDialStatus
(
doctorId
)
callJsFun
(
wv_content
,
"setUnRead(${getUnReadByUid(uid =uid
)})"
)
callJsFun
(
wv_content
,
"setUnRead(${getUnReadByUid(uid = uid
)})"
)
}
@SuppressLint
(
"ClickableViewAccessibility"
)
private
fun
webViewInit
(
wv_content
:
ProgressWebView
)
{
val
setting
:
WebSettings
=
wv_content
?.
settings
!!
...
...
@@ -323,14 +331,14 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
override
fun
onProgressChanged
(
view
:
WebView
,
newProgress
:
Int
)
{
if
(
newProgress
==
100
)
{
callJsFun
(
wv_content
,
"setUnRead(${uid?.let { getUnReadByUid(uid = it) }})"
)
callJsFun
(
wv_content
,
"setUnRead(${uid?.let { getUnReadByUid(uid = it) }})"
)
}
super
.
onProgressChanged
(
view
,
newProgress
)
}
override
fun
onReceivedTitle
(
view
:
WebView
,
title
:
String
)
{
super
.
onReceivedTitle
(
view
,
title
)
text_title
.
text
=
title
text_title
.
text
=
title
}
// For Android < 3.0
...
...
@@ -434,9 +442,10 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
}
fun
getUnReadByUid
(
uid
:
String
):
Int
{
fun
getUnReadByUid
(
uid
:
String
):
Int
{
return
ARouter
.
getInstance
().
navigation
(
IImService
::
class
.
java
).
getUnReadByUid
(
uid
)
}
@SuppressLint
(
"CheckResult"
)
private
fun
onLoadDialStatus
(
doctorId
:
String
)
{
val
confideApi
=
YDLHttpUtils
.
obtainApi
(
ConfideHomeApi
::
class
.
java
)
...
...
@@ -470,7 +479,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
tvCall
.
text
=
"继续倾诉"
layoutCall
.
background
=
context
?.
getDrawable
(
R
.
drawable
.
confide_line_bg_1
)
context
?.
getDrawable
(
R
.
drawable
.
confide_line_bg_1
)
context
?.
getDrawable
(
R
.
drawable
.
confide_line_bg_1
)
val
t
=
resp
?.
data
?.
remainingTime
?.
remainingTime
if
(
t
!=
null
)
{
tvTime
.
visibility
=
View
.
VISIBLE
...
...
m-confide/src/main/java/com/ydl/confide/home/adapter/VideoShowAdapter.kt
View file @
61142785
...
...
@@ -69,7 +69,8 @@ class RecentConfideAdapter(val data: List<ItemVideoShowViewModel>, private val e
)
event
.
consultantClick
(
itemVideoShowViewModel
.
doctorId
,
itemVideoShowViewModel
.
confideId
itemVideoShowViewModel
.
confideId
,
itemVideoShowViewModel
.
uid
)
}
}
...
...
@@ -84,10 +85,11 @@ class ItemVideoShowViewModel {
val
state
=
ObservableInt
()
var
doctorId
:
String
?
=
null
var
confideId
:
String
?
=
null
var
uid
:
String
?
=
null
}
internal
fun
ItemVideoShowViewModel
.
mapOf
(
bean
:
ConfideHomeBodyBean
):
ItemVideoShowViewModel
{
name
.
set
(
bean
.
confidedName
)
name
.
set
(
bean
.
videoTitle
?:
""
)
coverUrl
.
set
(
bean
.
confidedIcon
)
if
(
bean
.
coverVideoPicture
.
isNullOrBlank
())
{
videoCoverUrl
.
set
(
bean
.
coverPicture
)
...
...
@@ -97,6 +99,7 @@ internal fun ItemVideoShowViewModel.mapOf(bean: ConfideHomeBodyBean): ItemVideoS
state
.
set
(
bean
.
confideLine
?:
0
)
doctorId
=
bean
.
doctorId
confideId
=
bean
.
confidedId
uid
=
bean
.
uid
?.
toString
()
return
this
}
...
...
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideHomeBodyBean.kt
View file @
61142785
...
...
@@ -19,7 +19,8 @@ data class ConfideHomeBodyBean(
//专家的uid
val
uid
:
Int
?,
//咨询师姓名
val
confidedName
:
String
?,
val
confidedName
:
String
?,
val
videoTitle
:
String
?,
//咨询师性别 1.男 2.女
val
confideSex
:
Int
=
1
,
//对你留言
...
...
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
View file @
61142785
...
...
@@ -31,6 +31,7 @@ import com.ydl.media.view.PlayerFloatView
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.modular.route
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.utils.remind.ToastHelper
...
...
@@ -131,13 +132,13 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
* 最佳倾诉榜单--点我倾诉
* @param linkUrl 跳转地址
*/
override
fun
consultantClick
(
doctorId
:
String
?,
confideId
:
String
?)
{
override
fun
consultantClick
(
doctorId
:
String
?,
confideId
:
String
?
,
uid
:
String
?
)
{
confideId
?.
let
{
ConfideBottomSheetDialogFragment
()
.
showBottomSheetDialog
(
mContext
as
FragmentActivity
,
/*HttpConfig.MH5_URL*/
"http://192.168.210.152/"
+
ConfideRoute
.
h5ConfideIntro
(
it
),
doctorId
!!
HttpConfig
.
MH5_URL
+
ConfideRoute
.
h5ConfideIntro
(
it
),
doctorId
!!
,
uid
=
uid
)
}
}
...
...
m-confide/src/main/java/com/ydl/confide/home/event/IConfideHomeEvent.kt
View file @
61142785
...
...
@@ -73,7 +73,7 @@ interface IConfideHomeEvent {
* 咨询师推荐--点我倾诉
* @param linkUrl 跳转地址
*/
fun
consultantClick
(
doctorId
:
String
?,
confideId
:
String
?)
fun
consultantClick
(
doctorId
:
String
?,
confideId
:
String
?
,
uid
:
String
?
)
fun
videoShowClick
(
index
:
Int
,
data
:
List
<
ConfideHomeBodyBean
>?)
...
...
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendExpertItemView.kt
View file @
61142785
...
...
@@ -243,7 +243,7 @@ class ConfideHomeRecommendExpertItemView(mContext: Context, private var confideH
private
fun
click
(
bodyBean
:
ConfideHomeBodyBean
)
{
when
(
bodyBean
.
confideLine
)
{
//1在线 2离线 3通话中
1
,
3
,
4
->
{
confideHomeEvent
.
consultantClick
(
bodyBean
.
doctorId
,
bodyBean
.
confidedId
)
confideHomeEvent
.
consultantClick
(
bodyBean
.
doctorId
,
bodyBean
.
confidedId
,
bodyBean
.
uid
?.
toString
()
)
}
2
->
{
//跳转私聊 并发送自定义消息
...
...
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendView.kt
View file @
61142785
...
...
@@ -94,7 +94,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
"1"
)
confideHomeEvent
.
consultantClick
(
bodyBean
.
doctorId
,
bodyBean
.
confidedId
)
confideHomeEvent
.
consultantClick
(
bodyBean
.
doctorId
,
bodyBean
.
confidedId
,
bodyBean
.
uid
?.
toString
()
)
}
img_head
.
setOnClickListener
{
ActionCountUtils
.
record
(
"listen_counselor_list_page"
,
"head_portrait_click"
,
"2"
)
...
...
@@ -344,7 +344,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
if
(
bodyBean
.
confideLine
==
3
)
{
}
confideHomeEvent
.
consultantClick
(
bodyBean
.
doctorId
,
bodyBean
.
confidedId
)
confideHomeEvent
.
consultantClick
(
bodyBean
.
doctorId
,
bodyBean
.
confidedId
,
bodyBean
.
uid
?.
toString
()
)
}
2
->
{
//跳转私聊 并发送自定义消息
...
...
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