Commit e3175a48 by fengquan

fix: 修复离线可预约

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