Commit e3175a48 by fengquan

fix: 修复离线可预约

parent d7001ffe
......@@ -5,7 +5,7 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.50.41",
"m-confide" : "0.0.50.42",
"m-consultant" : "0.0.60.68",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55",
......@@ -91,7 +91,7 @@ ext {
ydlCompileVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.50.41",
"m-confide" : "0.0.50.42",
"m-consultant" : "0.0.60.68",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55",
......
......@@ -82,20 +82,24 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
val status = item.lineStatus.get()
when (status) {
5 -> {
if (!TextUtils.isEmpty(item.linkedUrl.get())){
if (!TextUtils.isEmpty(item.linkedUrl.get())) {
val linkUri = Uri.parse(item.linkedUrl.get())
if (linkUri != null) {
val host = linkUri.host
if (!TextUtils.isEmpty(host) && host == "h5") {
//如果是h5,跳转至NewH5Activity
try {
var params = URLDecoder.decode(linkUri.getQueryParameter("params"),"UTF-8")
ARouter.getInstance().build("/new_h5/h5").withSerializable("routerParam", params).navigation()
}catch (e : NullPointerException){
var params = URLDecoder.decode(
linkUri.getQueryParameter("params"),
"UTF-8"
)
ARouter.getInstance().build("/new_h5/h5")
.withSerializable("routerParam", params).navigation()
} catch (e: NullPointerException) {
com.yidianling.common.tools.LogUtil.e("params参数为空")
}catch (e : UnsupportedEncodingException){
} catch (e: UnsupportedEncodingException) {
com.yidianling.common.tools.LogUtil.e("解码错误")
}catch (e : UnsupportedOperationException){
} catch (e: UnsupportedOperationException) {
com.yidianling.common.tools.LogUtil.e("这不是一个uri格式的地址")
}
}
......@@ -118,7 +122,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
}
else -> {
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, true)
}
}
......@@ -165,7 +174,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId ?: "",
"4"
)
showDoctorDetail(item,false)
showDoctorDetail(item, false)
}
binding.ivAvatar.setOnClickListener {
ActionCountUtils.record(
......@@ -181,7 +190,7 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId ?: "",
"3"
)
showDoctorDetail(item,false)
showDoctorDetail(item, false)
}
binding.vDisableClick.setOnClickListener { }
binding.btnShare.setOnClickListener {
......@@ -363,16 +372,18 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
disposable?.dispose()
}
private fun showDoctorDetail(item: VideoViewModel,toPay:Boolean) {
private fun showDoctorDetail(item: VideoViewModel, toPay: Boolean) {
item.confideId?.let {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it)+ if(toPay) "&payPage=1" else ""
val url =
HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it) + if (toPay) "&payPage=1" else ""
ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(
itemView.context as FragmentActivity,
url,
item.doctorId!!,
uid = item.uid,
listenFree = item.listenFree.get()
listenFree = item.listenFree.get(),
expertUrl = item.linkedUrl.get() ?: ""
)
}
}
......
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