Commit 01335115 by fengquan

feat: 离线可预约跳专家主页

parent 7f1628e3
...@@ -481,8 +481,8 @@ public class WVClickAbstractListener implements WebViewClientClickListener { ...@@ -481,8 +481,8 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
} }
@Override @Override
public void getNextExpertStatus(String doctorID, String title, String uid) { public void getNextExpertStatus(String doctorID, String title, String uid, String linkUrl) {
EventBus.getDefault().post(new ChangeAnotherExpertEvent(doctorID,title,uid)); EventBus.getDefault().post(new ChangeAnotherExpertEvent(doctorID, title, uid, linkUrl));
} }
@Override @Override
......
...@@ -50,6 +50,7 @@ class WebJavascriptHandler : IJavascriptHandler{ ...@@ -50,6 +50,7 @@ class WebJavascriptHandler : IJavascriptHandler{
if (YDLRouterManager.router(params)) { if (YDLRouterManager.router(params)) {
return return
} }
if (js.handle(params)) return if (js.handle(params)) return
val jsData = Gson().fromJson(params, H5JsBean::class.java) val jsData = Gson().fromJson(params, H5JsBean::class.java)
//是否登录 //是否登录
...@@ -447,7 +448,7 @@ class WebJavascriptHandler : IJavascriptHandler{ ...@@ -447,7 +448,7 @@ class WebJavascriptHandler : IJavascriptHandler{
//再换一位 //再换一位
"get_next_doctor"->{ "get_next_doctor"->{
wvEnventPro?.getNextExpertStatus(jsData.cmd?.params?.doctorId.toString(),jsData.cmd?.params?.title,jsData.cmd?.params?.uid.toString()) wvEnventPro?.getNextExpertStatus(jsData.cmd?.params?.doctorId.toString(),jsData.cmd?.params?.title,jsData.cmd?.params?.uid.toString(),jsData.cmd?.params?.linkUrl)
} }
"show_popup_window" -> { "show_popup_window" -> {
val doctorId = jsData.cmd?.params?.doctorId?.toString() val doctorId = jsData.cmd?.params?.doctorId?.toString()
......
...@@ -199,6 +199,6 @@ public interface WebViewClientClickListener { ...@@ -199,6 +199,6 @@ public interface WebViewClientClickListener {
default void setWebViewBG(String rgb,String alpha){} default void setWebViewBG(String rgb,String alpha){}
void getNextExpertStatus(String doctorID,String title,String uid); void getNextExpertStatus(String doctorID, String title, String uid, String linkUrl);
} }
...@@ -264,7 +264,7 @@ ext { ...@@ -264,7 +264,7 @@ ext {
"ydl-pushagent" : "com.ydl:pushagent:0.1.1", "ydl-pushagent" : "com.ydl:pushagent:0.1.1",
"ydl-notracepoint" : "com.ydl:notracepoint-lib:0.2.3.3@aar", "ydl-notracepoint" : "com.ydl:notracepoint-lib:0.2.3.3@aar",
"ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar", "ydl-js" : "com.ydl:ydl-js:1.0.7-SNAPSHOT@aar",
"ydl-router" : "com.ydl:ydl-router:1.4.1-SNAPSHOT@aar", "ydl-router" : "com.ydl:ydl-router:1.4.2",
"xrecyclerview" : "com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar", "xrecyclerview" : "com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar",
"mmkv" : "com.tencent:mmkv-static:1.2.6", "mmkv" : "com.tencent:mmkv-static:1.2.6",
"arouter-api" : "com.alibaba:arouter-api:1.4.1", "arouter-api" : "com.alibaba:arouter-api:1.4.1",
......
...@@ -378,10 +378,10 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -378,10 +378,10 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
} }
fun onEventMainThread(event: ChangeAnotherExpertEvent) { fun onEventMainThread(event: ChangeAnotherExpertEvent) {
updateChange(event.doctorID, event.title, event.uid) updateChange(event.doctorID, event.title, event.uid, event.linkUrl)
} }
private fun updateChange(doctorId: String, title: String, uid: String) { private fun updateChange(doctorId: String, title: String, uid: String, linkUrl: String) {
if (doctorId == "0") {//没有下一位了 if (doctorId == "0") {//没有下一位了
layoutChange.visibility = View.GONE layoutChange.visibility = View.GONE
return return
...@@ -392,11 +392,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -392,11 +392,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
layout_change_text.visibility = View.VISIBLE layout_change_text.visibility = View.VISIBLE
this.doctorId = doctorId this.doctorId = doctorId
onLoadDialStatus(doctorId) onLoadDialStatus(doctorId)
this.expertUrl = linkUrl
if (activity is ConfideHomeActivity) {
val confideHomeActivity = activity as ConfideHomeActivity
expertUrl = confideHomeActivity?.searchLinkUrlByUid(uid) ?: ""
}
callJsFun(wv_content, "setUnRead(${getUnReadByUid(uid = uid)})") callJsFun(wv_content, "setUnRead(${getUnReadByUid(uid = uid)})")
} }
......
...@@ -3,7 +3,8 @@ package com.ydl.confide.home.event ...@@ -3,7 +3,8 @@ package com.ydl.confide.home.event
data class ChangeAnotherExpertEvent( data class ChangeAnotherExpertEvent(
var doctorID: String, var doctorID: String,
var title: String, var title: String,
var uid: String var uid: String,
var linkUrl: String
) )
class ConfideDialogEvent(val show: Int) class ConfideDialogEvent(val show: Int)
\ No newline at end of file
...@@ -102,6 +102,7 @@ class H5JsBean { ...@@ -102,6 +102,7 @@ class H5JsBean {
var cate_id = 0 //搜索主题id var cate_id = 0 //搜索主题id
var imageBase64: String? = null//图片base64编码数据 var imageBase64: String? = null//图片base64编码数据
var sourceUrl: String? = null//登录完成后跳转地址 var sourceUrl: String? = null//登录完成后跳转地址
var linkUrl: String? = null //专家主页地址
override fun toString(): String { override fun toString(): String {
return "Params(url=$url, search_name='$search_name', id=$id, uid=$uid, toName=$toName, toUid=$toUid, docHead=$docHead, doctorId=$doctorId, listenerId=$listenerId, " + return "Params(url=$url, search_name='$search_name', id=$id, uid=$uid, toName=$toName, toUid=$toUid, docHead=$docHead, doctorId=$doctorId, listenerId=$listenerId, " +
......
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