Commit 38678631 by fengquan

feat: 咨询师详情页改版

parent aa9ca9ae
...@@ -23,6 +23,7 @@ interface IImService : IProvider { ...@@ -23,6 +23,7 @@ interface IImService : IProvider {
// 直接打开聊天页面,不走分配导医 // 直接打开聊天页面,不走分配导医
fun startChatBySessionId(context: Activity, toUid: String) fun startChatBySessionId(context: Activity, toUid: String)
// 打开信息前置收集页 // 打开信息前置收集页
fun startP2PSession(context: Activity, location: Int, ffrom2: String?) fun startP2PSession(context: Activity, location: Int, ffrom2: String?)
...@@ -183,4 +184,8 @@ interface IImService : IProvider { ...@@ -183,4 +184,8 @@ interface IImService : IProvider {
fun initIm(app: Application, activity: Class<out Activity>, imInitBean: IMInitConfigBean) fun initIm(app: Application, activity: Class<out Activity>, imInitBean: IMInitConfigBean)
fun isWifiOr3G(activity: Activity): Boolean fun isWifiOr3G(activity: Activity): Boolean
fun showConsultServiceDialog(activity: Activity, toUid: String, doctorId: String)
fun dismissConsultServiceDialog();
} }
\ No newline at end of file
...@@ -23,6 +23,7 @@ import com.yidianling.muse.activity.ChooseMusicActivity; ...@@ -23,6 +23,7 @@ import com.yidianling.muse.activity.ChooseMusicActivity;
//import static com.ydl.ydlcommon.router.IYDLRouterConstant.ROUTER_MUSE_PLAY; //import static com.ydl.ydlcommon.router.IYDLRouterConstant.ROUTER_MUSE_PLAY;
import de.greenrobot.event.EventBus; import de.greenrobot.event.EventBus;
import com.yidianling.im.event.CloseBottomWebviewEvent; import com.yidianling.im.event.CloseBottomWebviewEvent;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -523,13 +524,18 @@ public class WVClickAbstractListener implements WebViewClientClickListener { ...@@ -523,13 +524,18 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
.setData(mThumbViewInfoList) .setData(mThumbViewInfoList)
.setCurrentIndex(params.getPreview_index()) .setCurrentIndex(params.getPreview_index())
.setFullscreen(true) .setFullscreen(true)
.setToUid(info.getToUid() +"") .setToUid(info.getToUid() + "")
.setDoctorId(info.getDoctorId()) .setDoctorId(info.getDoctorId())
.setType(GPreviewBuilder.IndicatorType.Dot) .setType(GPreviewBuilder.IndicatorType.Dot)
.start(); .start();
} }
@Override @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, public void switchSound(int mediaId, long meditationId, int meditationType, int businessType,
String buried, String mediaUrl, String mediaCoverUrl, String buried, String mediaUrl, String mediaCoverUrl,
String title, String desc, int status) { String title, String desc, int status) {
...@@ -541,9 +547,11 @@ public class WVClickAbstractListener implements WebViewClientClickListener { ...@@ -541,9 +547,11 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
businessType, buried, mediaUrl, mediaCoverUrl, title, desc, status); businessType, buried, mediaUrl, mediaCoverUrl, title, desc, status);
} }
} }
@Override @Override
public void chatCloseBottomWebView() { public void chatCloseBottomWebView() {
EventBus.getDefault().post(new CloseBottomWebviewEvent(true)); EventBus.getDefault().post(new CloseBottomWebviewEvent(true));
ModularServiceManager.INSTANCE.provide(IImService.class).dismissConsultServiceDialog();
} }
...@@ -556,8 +564,8 @@ public class WVClickAbstractListener implements WebViewClientClickListener { ...@@ -556,8 +564,8 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override @Override
public void setWebViewBG(String rgb, String alpha) { public void setWebViewBG(String rgb, String alpha) {
if (mContext instanceof NewH5Activity){ if (mContext instanceof NewH5Activity) {
((NewH5Activity)mContext).setBG(rgb, alpha); ((NewH5Activity) mContext).setBG(rgb, alpha);
} }
} }
} }
...@@ -465,6 +465,11 @@ class WebJavascriptHandler(private val webView: WebView?, private val wvEnventPr ...@@ -465,6 +465,11 @@ class WebJavascriptHandler(private val webView: WebView?, private val wvEnventPr
wvEnventPro?.resourceToPreview(jsData.cmd?.params) wvEnventPro?.resourceToPreview(jsData.cmd?.params)
} }
"doctor_booking" -> {
wvEnventPro?.showDocBooking(jsData.cmd?.params)
}
} }
} }
} }
...@@ -205,4 +205,6 @@ public interface WebViewClientClickListener { ...@@ -205,4 +205,6 @@ public interface WebViewClientClickListener {
void switchPushStatus(H5JsBean.H5JsCmd.Params params); void switchPushStatus(H5JsBean.H5JsCmd.Params params);
void resourceToPreview(H5JsBean.H5JsCmd.Params params); void resourceToPreview(H5JsBean.H5JsCmd.Params params);
void showDocBooking(H5JsBean.H5JsCmd.Params params);
} }
...@@ -382,6 +382,14 @@ class BasePhotoFragment : Fragment() { ...@@ -382,6 +382,14 @@ class BasePhotoFragment : Fragment() {
fun actionCancel() fun actionCancel()
} }
fun stopVideo() {
if (videoView != null && videoView!!.isPlaying) {
ivPlay!!.visibility = VISIBLE
stopTiming()
videoView!!.pause()
}
}
companion object { companion object {
/** /**
* 预览图片 类型 * 预览图片 类型
......
...@@ -12,16 +12,14 @@ import androidx.fragment.app.FragmentManager ...@@ -12,16 +12,14 @@ import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.viewpager.widget.ViewPager import androidx.viewpager.widget.ViewPager
import com.alibaba.android.arouter.launcher.ARouter 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.ydl.ydlcommon.utils.StatusBarUtils
import com.yidianling.consultant.R import com.yidianling.consultant.R
import com.yidianling.consultant.preview.GPreviewBuilder.IndicatorType import com.yidianling.consultant.preview.GPreviewBuilder.IndicatorType
import com.yidianling.consultant.preview.SmoothImageView.onTransformListener import com.yidianling.consultant.preview.SmoothImageView.onTransformListener
import com.yidianling.im.api.service.IImService 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.consultant_image_preview_photo.*
import kotlinx.android.synthetic.main.fragment_image_photo_layout.*
import java.util.* import java.util.*
/** /**
...@@ -93,11 +91,26 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -93,11 +91,26 @@ class GPreviewActivity : AppCompatActivity() {
if (!toUid.isNullOrBlank()) { if (!toUid.isNullOrBlank()) {
ARouter.getInstance().navigation(IImService::class.java) ARouter.getInstance().navigation(IImService::class.java)
?.startChatBySessionId(context = this, toUid = toUid!!) ?.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 { bookingBtn.setOnClickListener {
ModularServiceManager.provide(IImService::class.java)
.showConsultServiceDialog(activity = this, toUid = toUid!!, doctorId = doctorId!!)
} }
...@@ -116,12 +129,34 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -116,12 +129,34 @@ class GPreviewActivity : AppCompatActivity() {
} }
override fun onPageSelected(position: Int) { override fun onPageSelected(position: Int) {
currentIndex = position;
selectPosition?.setText((position + 1).toString() + "") selectPosition?.setText((position + 1).toString() + "")
} }
override fun onPageScrollStateChanged(state: Int) {} 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); // viewPager.setOffscreenPageLimit(3);
} }
...@@ -136,6 +171,8 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -136,6 +171,8 @@ class GPreviewActivity : AppCompatActivity() {
val isScale = intent.getBooleanExtra("isScale", false) val isScale = intent.getBooleanExtra("isScale", false)
SmoothImageView.setIsScale(isScale) SmoothImageView.setIsScale(isScale)
initFragment(imgUrls, currentIndex, BasePhotoFragment::class.java) initFragment(imgUrls, currentIndex, BasePhotoFragment::class.java)
} }
private fun initFragment( private fun initFragment(
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/platform_dp_20" android:layout_marginLeft="@dimen/platform_dp_20"
android:background="@drawable/consultant_bg_btn_chat" android:background="@drawable/consultant_bg_btn_chat"
android:text="立即私聊"
android:gravity="center" android:gravity="center"
android:text="立即私聊"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="17sp" android:textSize="17sp"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -39,26 +39,28 @@ ...@@ -39,26 +39,28 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginRight="@dimen/platform_dp_20" android:layout_marginRight="@dimen/platform_dp_20"
android:background="@drawable/consultant_bg_btn_book" android:background="@drawable/consultant_bg_btn_book"
android:text="立即预约"
android:gravity="center" android:gravity="center"
android:text="立即预约"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="17sp" android:textSize="17sp"
android:textStyle="bold" /> android:textStyle="bold" />
<RelativeLayout <RelativeLayout
android:id="@+id/un_read_num_ll"
android:layout_width="@dimen/platform_dp_17" android:layout_width="@dimen/platform_dp_17"
android:layout_height="@dimen/platform_dp_17" android:layout_height="@dimen/platform_dp_17"
android:layout_alignTop="@+id/chatBtn" android:layout_alignTop="@+id/chatBtn"
android:layout_alignRight="@+id/chatBtn" android:layout_alignRight="@+id/chatBtn"
android:layout_marginTop="-10dp" android:layout_marginTop="-10dp"
android:layout_marginRight="@dimen/platform_dp_10" android:layout_marginRight="@dimen/platform_dp_10"
android:visibility="gone"
android:background="@drawable/consultant_bg_chat_unread_num"> android:background="@drawable/consultant_bg_chat_unread_num">
<TextView <TextView
android:id="@+id/un_read_num"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:text="3"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/sp_12" /> android:textSize="@dimen/sp_12" />
......
...@@ -43,6 +43,7 @@ import com.yidianling.im.ui.page.NewMultiMessageFragment ...@@ -43,6 +43,7 @@ import com.yidianling.im.ui.page.NewMultiMessageFragment
import com.yidianling.nimbase.common.media.picker.PickImageHelper import com.yidianling.nimbase.common.media.picker.PickImageHelper
import com.yidianling.uikit.api.NimUIKit import com.yidianling.uikit.api.NimUIKit
import com.yidianling.uikit.business.session.helper.MessageListPanelHelper 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.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
...@@ -53,6 +54,8 @@ import io.reactivex.schedulers.Schedulers ...@@ -53,6 +54,8 @@ import io.reactivex.schedulers.Schedulers
@Route(path = "/im/ImService") @Route(path = "/im/ImService")
class IMServiceImpl : IImService { class IMServiceImpl : IImService {
private var expertConsultServiceListDialog2: ExpertConsultServiceListDialog2 ?= null
override fun isHasUnread(): Boolean { override fun isHasUnread(): Boolean {
return MsgReceiveHelper.isHasUnread return MsgReceiveHelper.isHasUnread
} }
...@@ -411,4 +414,21 @@ class IMServiceImpl : IImService { ...@@ -411,4 +414,21 @@ class IMServiceImpl : IImService {
override fun isWifiOr3G(activity: Activity): Boolean { override fun isWifiOr3G(activity: Activity): Boolean {
return NetworkUtil.isWifiOr3G(activity) 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
...@@ -55,6 +55,21 @@ class ExpertConsultServiceItemView : LinearLayout { ...@@ -55,6 +55,21 @@ class ExpertConsultServiceItemView : LinearLayout {
View.inflate(mContext, R.layout.im_expert_consult_service_item_view, this) 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 { ...@@ -149,7 +164,7 @@ class ExpertConsultServiceItemView : LinearLayout {
null null
) )
) )
}else{ } else {
//新增需求,如果没有绑定手机号,跳转到绑定手机号页面 //新增需求,如果没有绑定手机号,跳转到绑定手机号页面
bindPhoneDialog() bindPhoneDialog()
} }
......
...@@ -16,20 +16,30 @@ import com.netease.nimlib.sdk.RequestCallback ...@@ -16,20 +16,30 @@ import com.netease.nimlib.sdk.RequestCallback
import com.netease.nimlib.sdk.msg.MessageBuilder import com.netease.nimlib.sdk.msg.MessageBuilder
import com.netease.nimlib.sdk.msg.MsgService import com.netease.nimlib.sdk.msg.MsgService
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
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.im.R import com.yidianling.im.R
import com.yidianling.im.bean.BusyBean
import com.yidianling.im.session.extension.CustomAttachSubScriptTime import com.yidianling.im.session.extension.CustomAttachSubScriptTime
import com.yidianling.uikit.business.session.helper.MessageListPanelHelper import com.yidianling.uikit.business.session.helper.MessageListPanelHelper
import com.yidianling.uikit.custom.bridge.ActionHandlerStorage import com.yidianling.uikit.custom.bridge.ActionHandlerStorage
import com.yidianling.uikit.custom.http.ServiceImpl
import com.yidianling.uikit.custom.http.ServiceImpl.Companion.instance
import com.yidianling.uikit.custom.http.response.ServiceItemBean import com.yidianling.uikit.custom.http.response.ServiceItemBean
import com.yidianling.uikit.custom.widget.expertConsultService.callback.ConsultServiceViewCallback import com.yidianling.uikit.custom.widget.expertConsultService.callback.ConsultServiceViewCallback
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.im_expert_consult_service_list_dialog_layout.dialog_bottom_scroll_view import kotlinx.android.synthetic.main.im_expert_consult_service_list_dialog_layout.dialog_bottom_scroll_view
import kotlinx.android.synthetic.main.im_expert_consult_service_list_fragment_layout.* import kotlinx.android.synthetic.main.im_expert_consult_service_list_fragment_layout.*
class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<ServiceItemBean>, val mIsBusy: Boolean, class ExpertConsultServiceListDialog2(
val toUid:String, val doctorID:String) : BottomSheetDialogFragment() { val mContext: Context, val mList: List<ServiceItemBean>?, val mIsBusy: Boolean,
val toUid: String, val doctorID: String
) : BottomSheetDialogFragment() {
private var mConsultServiceListView: ExpertConsultServiceView? = null private var mConsultServiceListView: ExpertConsultServiceView? = null
private var mWebviewView: ExpertConsultWebview? = null private var mWebviewView: ExpertConsultWebview? = null
...@@ -37,10 +47,9 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser ...@@ -37,10 +47,9 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser
private var mSelectType: String = "全部" private var mSelectType: String = "全部"
var bottomSheet: FrameLayout? = null var bottomSheet: FrameLayout? = null
private var behavior: BottomSheetBehavior<*>? = null private var behavior: BottomSheetBehavior<*>? = null
fun changeItem(){ fun changeItem() {
dialog_bottom_scroll_view.currentItem = 0 dialog_bottom_scroll_view.currentItem = 0
} }
...@@ -55,32 +64,72 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser ...@@ -55,32 +64,72 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser
container: ViewGroup?, container: ViewGroup?,
savedInstanceState: Bundle? savedInstanceState: Bundle?
): View? { ): View? {
return inflater.inflate(R.layout.im_expert_consult_service_list_fragment_layout, container, false) return inflater.inflate(
R.layout.im_expert_consult_service_list_fragment_layout,
container,
false
)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
var typeList:ArrayList<String> = ArrayList() var typeList: ArrayList<String> = ArrayList()
typeList.add(mSelectType)//默认选中 typeList.add(mSelectType)//默认选中
if (mList != null) {
mList.forEach { item -> mList.forEach { item ->
typeList.add(item.cateName) typeList.add(item.cateName)
} }
onViewCreate(typeList, mList)
} else {
ServiceImpl.instance.serviceList(doctorID)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer<BaseAPIResponse<List<ServiceItemBean>>> { res: BaseAPIResponse<List<ServiceItemBean>> ->
if (res.data != null && res.data.size > 0) {
var serviceItemBeanList = res.data
serviceItemBeanList.forEach { item ->
typeList.add(item.cateName)
}
onViewCreate(typeList, serviceItemBeanList)
// 获取专家是否在繁忙状态
instance.queryDoctorIsBusy(doctorID)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{ res: BaseAPIResponse<BusyBean> ->
var isBusy = res.data.success
mConsultServiceListView?.setBusyStatus(isBusy)
}
) { throwable: Throwable? -> }
} else {
ToastUtil.toastShort("咨询师暂未发布服务")
}
}, Consumer { throwable: Throwable? -> })
}
}
mConsultServiceListView = ExpertConsultServiceView(mContext,mIsBusy) private fun onViewCreate(typeList: ArrayList<String>, mList: List<ServiceItemBean>) {
mConsultServiceListView = ExpertConsultServiceView(mContext, mIsBusy)
(mConsultServiceListView as ExpertConsultServiceView).setDataAndClick(typeList, mList, object : (mConsultServiceListView as ExpertConsultServiceView).setDataAndClick(
typeList,
mList,
object :
ConsultServiceViewCallback { ConsultServiceViewCallback {
override fun onCloseClick() { override fun onCloseClick() {
dismiss() dismiss()
} }
override fun onItemClick(serviceBean: ServiceItemBean.ProductsBean) { override fun onItemClick(serviceBean: ServiceItemBean.ProductsBean) {
// if (mConsultServiceDetailView != null) {
// mConsultServiceDetailView?.updateData(serviceBean)
// dialog_bottom_scroll_view.currentItem = 1
// }
mWebviewView?.setData(serviceBean) mWebviewView?.setData(serviceBean)
dialog_bottom_scroll_view.currentItem = 1 dialog_bottom_scroll_view.currentItem = 1
} }
...@@ -88,12 +137,20 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser ...@@ -88,12 +137,20 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser
override fun addTime() { // 提醒添加时间回调 override fun addTime() { // 提醒添加时间回调
dismiss() dismiss()
// 埋点 // 埋点
ActionCountUtils.baiDuCountSign3("ydl_user_product_page","remind_add_click",toUid, ActionCountUtils.baiDuCountSign3(
ActionHandlerStorage.getL(toUid).info.name,"") "ydl_user_product_page", "remind_add_click", toUid,
ActionHandlerStorage.getL(toUid).info.name, ""
)
// 发送提醒消息 // 发送提醒消息
val customTime = CustomAttachSubScriptTime("请尽快添加可预约时间") val customTime = CustomAttachSubScriptTime("请尽快添加可预约时间")
val message = MessageBuilder.createCustomMessage(toUid, SessionTypeEnum.P2P, "请尽快添加可预约时间", customTime) val message = MessageBuilder.createCustomMessage(
NIMClient.getService(MsgService::class.java).sendMessage(message, false).setCallback(object : toUid,
SessionTypeEnum.P2P,
"请尽快添加可预约时间",
customTime
)
NIMClient.getService(MsgService::class.java).sendMessage(message, false)
.setCallback(object :
RequestCallback<Void> { RequestCallback<Void> {
override fun onSuccess(param: Void?) { override fun onSuccess(param: Void?) {
MessageListPanelHelper.getInstance().notifyAddMessage(message) MessageListPanelHelper.getInstance().notifyAddMessage(message)
...@@ -112,24 +169,15 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser ...@@ -112,24 +169,15 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser
}) })
consult_service_dialog_close.setOnTouchListener { v, event -> consult_service_dialog_close.setOnTouchListener { v, event ->
when(event.action){ when (event.action) {
MotionEvent.ACTION_DOWN ->{ MotionEvent.ACTION_DOWN -> {
behavior?.isHideable = true behavior?.isHideable = true
} }
} }
true true
} }
mViewList.add(mConsultServiceListView as View) mViewList.add(mConsultServiceListView as View)
mWebviewView = ExpertConsultWebview(mContext, doctorID = doctorID)
// mConsultServiceDetailView = ExpertConsultServiceDetailView(mContext, object : ConsultServiceViewCallback {
// override fun onBackClick() {
// dialog_bottom_scroll_view.currentItem = 0
// }
// },mIsBusy,toUid)
// mViewList.add(mConsultServiceDetailView as View)
mWebviewView= ExpertConsultWebview(mContext,doctorID =doctorID )
mViewList.add(mWebviewView as View) mViewList.add(mWebviewView as View)
dialog_bottom_scroll_view.adapter = ConsultServicePagerAdapter() dialog_bottom_scroll_view.adapter = ConsultServicePagerAdapter()
...@@ -137,8 +185,6 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser ...@@ -137,8 +185,6 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser
} }
override fun setCancelable(cancelable: Boolean) { override fun setCancelable(cancelable: Boolean) {
val dialog = dialog val dialog = dialog
val touchOutsideView = val touchOutsideView =
...@@ -231,7 +277,7 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser ...@@ -231,7 +277,7 @@ class ExpertConsultServiceListDialog2(val mContext: Context, val mList: List<Ser
} }
fun show() { fun show() {
if (mContext is FragmentActivity){ if (mContext is FragmentActivity) {
show(mContext.supportFragmentManager, "consult_bottom_showdialog") show(mContext.supportFragmentManager, "consult_bottom_showdialog")
} }
......
...@@ -4,7 +4,6 @@ import android.content.Context ...@@ -4,7 +4,6 @@ import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import android.widget.LinearLayout import android.widget.LinearLayout
import com.yidianling.avchatkit.common.log.LogUtil
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.im.R import com.yidianling.im.R
import com.yidianling.uikit.custom.http.response.ServiceItemBean import com.yidianling.uikit.custom.http.response.ServiceItemBean
...@@ -53,7 +52,6 @@ class ExpertConsultServiceView : LinearLayout { ...@@ -53,7 +52,6 @@ class ExpertConsultServiceView : LinearLayout {
private fun initView() { private fun initView() {
val mWidth: Int = RxDeviceTool.getScreenWidth(mContext) val mWidth: Int = RxDeviceTool.getScreenWidth(mContext)
val mHeight: Int = LayoutParams.MATCH_PARENT val mHeight: Int = LayoutParams.MATCH_PARENT
...@@ -68,6 +66,15 @@ class ExpertConsultServiceView : LinearLayout { ...@@ -68,6 +66,15 @@ class ExpertConsultServiceView : LinearLayout {
View.inflate(mContext, R.layout.im_expert_consult_service_view, this) 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 类型列表 * typeList 类型列表
* serviceList 服务列表 * serviceList 服务列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment