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
38678631
Commit
38678631
authored
Jul 12, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 咨询师详情页改版
parent
aa9ca9ae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
229 additions
and
72 deletions
+229
-72
IImService.kt
api/im/src/main/java/com/yidianling/im/api/service/IImService.kt
+6
-0
WVClickAbstractListener.java
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
+11
-3
WebJavascriptHandler.kt
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
+5
-0
WebViewClientClickListener.java
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
+2
-0
BasePhotoFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/preview/BasePhotoFragment.kt
+8
-0
GPreviewActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/preview/GPreviewActivity.kt
+41
-4
consultant_image_preview_photo.xml
m-consultant/src/main/res/layout/consultant_image_preview_photo.xml
+5
-3
IMServiceImpl.kt
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
+21
-0
ExpertConsultServiceItemView.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceItemView.kt
+16
-1
ExpertConsultServiceListDialog2.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceListDialog2.kt
+105
-59
ExpertConsultServiceView.kt
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceView.kt
+9
-2
No files found.
api/im/src/main/java/com/yidianling/im/api/service/IImService.kt
View file @
38678631
...
...
@@ -23,6 +23,7 @@ interface IImService : IProvider {
// 直接打开聊天页面,不走分配导医
fun
startChatBySessionId
(
context
:
Activity
,
toUid
:
String
)
// 打开信息前置收集页
fun
startP2PSession
(
context
:
Activity
,
location
:
Int
,
ffrom2
:
String
?)
...
...
@@ -183,4 +184,8 @@ interface IImService : IProvider {
fun
initIm
(
app
:
Application
,
activity
:
Class
<
out
Activity
>,
imInitBean
:
IMInitConfigBean
)
fun
isWifiOr3G
(
activity
:
Activity
):
Boolean
fun
showConsultServiceDialog
(
activity
:
Activity
,
toUid
:
String
,
doctorId
:
String
)
fun
dismissConsultServiceDialog
();
}
\ No newline at end of file
app/src/main/java/com/ydl/component/service/web/WVClickAbstractListener.java
View file @
38678631
...
...
@@ -23,6 +23,7 @@ import com.yidianling.muse.activity.ChooseMusicActivity;
//import static com.ydl.ydlcommon.router.IYDLRouterConstant.ROUTER_MUSE_PLAY;
import
de.greenrobot.event.EventBus
;
import
com.yidianling.im.event.CloseBottomWebviewEvent
;
import
java.util.ArrayList
;
...
...
@@ -523,13 +524,18 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
.
setData
(
mThumbViewInfoList
)
.
setCurrentIndex
(
params
.
getPreview_index
())
.
setFullscreen
(
true
)
.
setToUid
(
info
.
getToUid
()
+
""
)
.
setToUid
(
info
.
getToUid
()
+
""
)
.
setDoctorId
(
info
.
getDoctorId
())
.
setType
(
GPreviewBuilder
.
IndicatorType
.
Dot
)
.
start
();
}
@Override
public
void
showDocBooking
(
H5JsBean
.
H5JsCmd
.
Params
params
)
{
ModularServiceManager
.
INSTANCE
.
provide
(
IImService
.
class
).
showConsultServiceDialog
(
mContext
,
params
.
getToUid
()
+
""
,
params
.
getDoctorId
()
+
""
);
}
@Override
public
void
switchSound
(
int
mediaId
,
long
meditationId
,
int
meditationType
,
int
businessType
,
String
buried
,
String
mediaUrl
,
String
mediaCoverUrl
,
String
title
,
String
desc
,
int
status
)
{
...
...
@@ -541,9 +547,11 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
businessType
,
buried
,
mediaUrl
,
mediaCoverUrl
,
title
,
desc
,
status
);
}
}
@Override
public
void
chatCloseBottomWebView
()
{
EventBus
.
getDefault
().
post
(
new
CloseBottomWebviewEvent
(
true
));
ModularServiceManager
.
INSTANCE
.
provide
(
IImService
.
class
).
dismissConsultServiceDialog
();
}
...
...
@@ -556,8 +564,8 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public
void
setWebViewBG
(
String
rgb
,
String
alpha
)
{
if
(
mContext
instanceof
NewH5Activity
){
((
NewH5Activity
)
mContext
).
setBG
(
rgb
,
alpha
);
if
(
mContext
instanceof
NewH5Activity
)
{
((
NewH5Activity
)
mContext
).
setBG
(
rgb
,
alpha
);
}
}
}
app/src/main/java/com/ydl/component/service/web/WebJavascriptHandler.kt
View file @
38678631
...
...
@@ -465,6 +465,11 @@ class WebJavascriptHandler(private val webView: WebView?, private val wvEnventPr
wvEnventPro
?.
resourceToPreview
(
jsData
.
cmd
?.
params
)
}
"doctor_booking"
->
{
wvEnventPro
?.
showDocBooking
(
jsData
.
cmd
?.
params
)
}
}
}
}
app/src/main/java/com/ydl/component/service/web/WebViewClientClickListener.java
View file @
38678631
...
...
@@ -205,4 +205,6 @@ public interface WebViewClientClickListener {
void
switchPushStatus
(
H5JsBean
.
H5JsCmd
.
Params
params
);
void
resourceToPreview
(
H5JsBean
.
H5JsCmd
.
Params
params
);
void
showDocBooking
(
H5JsBean
.
H5JsCmd
.
Params
params
);
}
m-consultant/src/main/java/com/yidianling/consultant/preview/BasePhotoFragment.kt
View file @
38678631
...
...
@@ -382,6 +382,14 @@ class BasePhotoFragment : Fragment() {
fun
actionCancel
()
}
fun
stopVideo
()
{
if
(
videoView
!=
null
&&
videoView
!!
.
isPlaying
)
{
ivPlay
!!
.
visibility
=
VISIBLE
stopTiming
()
videoView
!!
.
pause
()
}
}
companion
object
{
/**
* 预览图片 类型
...
...
m-consultant/src/main/java/com/yidianling/consultant/preview/GPreviewActivity.kt
View file @
38678631
...
...
@@ -12,16 +12,14 @@ import androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentStatePagerAdapter
import
androidx.viewpager.widget.ViewPager
import
com.alibaba.android.arouter.launcher.ARouter
import
com.ydl.ydlcommon.
data.http.BaseAPIResponse
import
com.ydl.ydlcommon.
modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.yidianling.consultant.R
import
com.yidianling.consultant.preview.GPreviewBuilder.IndicatorType
import
com.yidianling.consultant.preview.SmoothImageView.onTransformListener
import
com.yidianling.im.api.service.IImService
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Consumer
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.consultant_image_preview_photo.*
import
kotlinx.android.synthetic.main.fragment_image_photo_layout.*
import
java.util.*
/**
...
...
@@ -93,11 +91,26 @@ class GPreviewActivity : AppCompatActivity() {
if
(!
toUid
.
isNullOrBlank
())
{
ARouter
.
getInstance
().
navigation
(
IImService
::
class
.
java
)
?.
startChatBySessionId
(
context
=
this
,
toUid
=
toUid
!!
)
Timer
().
schedule
(
object
:
TimerTask
()
{
override
fun
run
()
{
runOnUiThread
{
if
(
fragments
!=
null
&&
currentIndex
<
fragments
!!
.
size
)
{
fragments
!!
[
currentIndex
].
stopVideo
()
}
}
}
},
2000
)
}
}
bookingBtn
.
setOnClickListener
{
ModularServiceManager
.
provide
(
IImService
::
class
.
java
)
.
showConsultServiceDialog
(
activity
=
this
,
toUid
=
toUid
!!
,
doctorId
=
doctorId
!!
)
}
...
...
@@ -116,12 +129,34 @@ class GPreviewActivity : AppCompatActivity() {
}
override
fun
onPageSelected
(
position
:
Int
)
{
currentIndex
=
position
;
selectPosition
?.
setText
((
position
+
1
).
toString
()
+
""
)
}
override
fun
onPageScrollStateChanged
(
state
:
Int
)
{}
})
if
(
toUid
!=
null
)
{
val
unReadByUid
=
ARouter
.
getInstance
().
navigation
(
IImService
::
class
.
java
).
getUnReadByUid
(
toUid
!!
)
when
{
unReadByUid
<=
0
->
{
un_read_num_ll
.
visibility
=
View
.
GONE
}
unReadByUid
>
99
->
{
un_read_num_ll
.
visibility
=
View
.
VISIBLE
un_read_num
.
text
=
"99"
}
else
->
{
un_read_num_ll
.
visibility
=
View
.
VISIBLE
un_read_num
.
text
=
unReadByUid
.
toString
()
}
}
}
// viewPager.setOffscreenPageLimit(3);
}
...
...
@@ -136,6 +171,8 @@ class GPreviewActivity : AppCompatActivity() {
val
isScale
=
intent
.
getBooleanExtra
(
"isScale"
,
false
)
SmoothImageView
.
setIsScale
(
isScale
)
initFragment
(
imgUrls
,
currentIndex
,
BasePhotoFragment
::
class
.
java
)
}
private
fun
initFragment
(
...
...
m-consultant/src/main/res/layout/consultant_image_preview_photo.xml
View file @
38678631
...
...
@@ -25,8 +25,8 @@
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"@dimen/platform_dp_20"
android:background=
"@drawable/consultant_bg_btn_chat"
android:text=
"立即私聊"
android:gravity=
"center"
android:text=
"立即私聊"
android:textColor=
"@color/white"
android:textSize=
"17sp"
android:textStyle=
"bold"
/>
...
...
@@ -39,26 +39,28 @@
android:layout_alignParentBottom=
"true"
android:layout_marginRight=
"@dimen/platform_dp_20"
android:background=
"@drawable/consultant_bg_btn_book"
android:text=
"立即预约"
android:gravity=
"center"
android:text=
"立即预约"
android:textColor=
"@color/white"
android:textSize=
"17sp"
android:textStyle=
"bold"
/>
<RelativeLayout
android:id=
"@+id/un_read_num_ll"
android:layout_width=
"@dimen/platform_dp_17"
android:layout_height=
"@dimen/platform_dp_17"
android:layout_alignTop=
"@+id/chatBtn"
android:layout_alignRight=
"@+id/chatBtn"
android:layout_marginTop=
"-10dp"
android:layout_marginRight=
"@dimen/platform_dp_10"
android:visibility=
"gone"
android:background=
"@drawable/consultant_bg_chat_unread_num"
>
<TextView
android:id=
"@+id/un_read_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:text=
"3"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_12"
/>
...
...
m-im/src/main/java/com/yidianling/im/modular/service/IMServiceImpl.kt
View file @
38678631
...
...
@@ -43,6 +43,7 @@ import com.yidianling.im.ui.page.NewMultiMessageFragment
import
com.yidianling.nimbase.common.media.picker.PickImageHelper
import
com.yidianling.uikit.api.NimUIKit
import
com.yidianling.uikit.business.session.helper.MessageListPanelHelper
import
com.yidianling.uikit.custom.widget.expertConsultService.view.ExpertConsultServiceListDialog2
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
...
...
@@ -53,6 +54,8 @@ import io.reactivex.schedulers.Schedulers
@Route
(
path
=
"/im/ImService"
)
class
IMServiceImpl
:
IImService
{
private
var
expertConsultServiceListDialog2
:
ExpertConsultServiceListDialog2
?=
null
override
fun
isHasUnread
():
Boolean
{
return
MsgReceiveHelper
.
isHasUnread
}
...
...
@@ -411,4 +414,21 @@ class IMServiceImpl : IImService {
override
fun
isWifiOr3G
(
activity
:
Activity
):
Boolean
{
return
NetworkUtil
.
isWifiOr3G
(
activity
)
}
override
fun
showConsultServiceDialog
(
activity
:
Activity
,
toUid
:
String
,
doctorId
:
String
)
{
// 获取专家是否在繁忙状态
if
(
activity
!=
null
)
{
expertConsultServiceListDialog2
=
ExpertConsultServiceListDialog2
(
activity
,
null
,
false
,
toUid
,
doctorId
)
expertConsultServiceListDialog2
?.
show
()
}
}
override
fun
dismissConsultServiceDialog
()
{
expertConsultServiceListDialog2
?.
changeItem
()
}
}
\ No newline at end of file
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceItemView.kt
View file @
38678631
...
...
@@ -55,6 +55,21 @@ class ExpertConsultServiceItemView : LinearLayout {
View
.
inflate
(
mContext
,
R
.
layout
.
im_expert_consult_service_item_view
,
this
)
}
fun
updateBusyStatus
(
isBusy
:
Boolean
)
{
mIsBusy
=
isBusy
if
(
mIsBusy
)
{
im_expert_service_list_btn
.
visibility
=
View
.
GONE
tv_add
.
visibility
=
View
.
VISIBLE
tv_add
.
setOnClickListener
{
mListener
?.
addTime
()
}
}
else
{
im_expert_service_list_btn
.
visibility
=
View
.
VISIBLE
tv_add
.
visibility
=
View
.
GONE
}
}
/**
* 设置数据
*/
...
...
@@ -149,7 +164,7 @@ class ExpertConsultServiceItemView : LinearLayout {
null
)
)
}
else
{
}
else
{
//新增需求,如果没有绑定手机号,跳转到绑定手机号页面
bindPhoneDialog
()
}
...
...
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceListDialog2.kt
View file @
38678631
This diff is collapsed.
Click to expand it.
m-im/src/main/java/com/yidianling/uikit/custom/widget/expertConsultService/view/ExpertConsultServiceView.kt
View file @
38678631
...
...
@@ -4,7 +4,6 @@ import android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
android.widget.LinearLayout
import
com.yidianling.avchatkit.common.log.LogUtil
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.im.R
import
com.yidianling.uikit.custom.http.response.ServiceItemBean
...
...
@@ -53,7 +52,6 @@ class ExpertConsultServiceView : LinearLayout {
private
fun
initView
()
{
val
mWidth
:
Int
=
RxDeviceTool
.
getScreenWidth
(
mContext
)
val
mHeight
:
Int
=
LayoutParams
.
MATCH_PARENT
...
...
@@ -68,6 +66,15 @@ class ExpertConsultServiceView : LinearLayout {
View
.
inflate
(
mContext
,
R
.
layout
.
im_expert_consult_service_view
,
this
)
}
fun
setBusyStatus
(
isBusy
:
Boolean
){
this
.
mIsBusy
=
isBusy
for
(
i
in
0
until
expert_consult_service_service_list
.
childCount
){
val
view
=
expert_consult_service_service_list
.
getChildAt
(
i
)
if
(
view
is
ExpertConsultServiceItemView
)
{
view
.
updateBusyStatus
(
mIsBusy
)
}
}
}
/**
* typeList 类型列表
* serviceList 服务列表
...
...
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