Commit 2ad2db39 by 刘鹏

feat: 1. 倾诉2.0半屏uid刷新问题修复

parent d78288df
...@@ -5,7 +5,7 @@ ext { ...@@ -5,7 +5,7 @@ ext {
ydlPublishVersion = [ ydlPublishVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.24", "m-confide" : "0.0.50.25",
"m-consultant" : "0.0.60.67", "m-consultant" : "0.0.60.67",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.48", "m-user" : "0.0.62.48",
...@@ -94,7 +94,7 @@ ext { ...@@ -94,7 +94,7 @@ ext {
ydlCompileVersion = [ ydlCompileVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.50.24", "m-confide" : "0.0.50.25",
"m-consultant" : "0.0.60.67", "m-consultant" : "0.0.60.67",
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.48", "m-user" : "0.0.62.48",
......
...@@ -31,6 +31,7 @@ import com.ydl.confide.home.event.ConfideDialogEvent ...@@ -31,6 +31,7 @@ import com.ydl.confide.home.event.ConfideDialogEvent
import com.ydl.confide.home.http.ConfideHomeApi import com.ydl.confide.home.http.ConfideHomeApi
import com.ydl.confide.router.PhoneCallIn import com.ydl.confide.router.PhoneCallIn
import com.ydl.utils.WebUrlParamsUtils import com.ydl.utils.WebUrlParamsUtils
import com.ydl.webview.IJavascriptHandler
import com.ydl.webview.ProgressWebView import com.ydl.webview.ProgressWebView
import com.ydl.webview.TellData import com.ydl.webview.TellData
import com.ydl.webview.WebModularServiceUtils import com.ydl.webview.WebModularServiceUtils
...@@ -42,6 +43,7 @@ import com.ydl.ydlnet.YDLHttpUtils ...@@ -42,6 +43,7 @@ import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.api.service.IImService import com.yidianling.im.api.service.IImService
import com.yidianling.user.api.event.UserLoginEvent
import com.yidianling.user.api.service.IUserService import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus import de.greenrobot.event.EventBus
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
...@@ -75,7 +77,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -75,7 +77,7 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
lateinit var layoutBottom: View lateinit var layoutBottom: View
lateinit var itemView: View lateinit var itemView: View
var bottomSheet :FrameLayout?=null var bottomSheet :FrameLayout?=null
var mJtoJHandle:IJavascriptHandler?=null
private var behavior: BottomSheetBehavior<*>? = null private var behavior: BottomSheetBehavior<*>? = null
...@@ -345,14 +347,13 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -345,14 +347,13 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
setting.setAllowFileAccess(true) setting.setAllowFileAccess(true)
setting.setBlockNetworkImage(false) setting.setBlockNetworkImage(false)
wv_content!!.scrollBarStyle = View.SCROLLBARS_INSIDE_OVERLAY //滚动条风格,为0指滚动条不占用空间,直接覆盖在网页上 wv_content?.scrollBarStyle = View.SCROLLBARS_INSIDE_OVERLAY //滚动条风格,为0指滚动条不占用空间,直接覆盖在网页上
val jtoJHandle = WebModularServiceUtils.getWebService() mJtoJHandle = WebModularServiceUtils.getWebService()
.getJavascripHandler(requireActivity(), tellData = TellData()) .getJavascripHandler(requireActivity(), tellData = TellData())
wv_content!!.addJavascriptInterface(jtoJHandle, "javascriptHandler") wv_content?.addJavascriptInterface(mJtoJHandle, "javascriptHandler")
// var jumpurl = "http://192.168.210.152/jy/listenMask?listenerId=257&isFromApp=1" // var jumpurl = "http://192.168.210.152/jy/listenMask?listenerId=257&isFromApp=1"
val url = WebUrlParamsUtils.getSuffix(jumpUrl, jtoJHandle.getUriAppendSuffix()) loadUrl()
wv_content.loadUrl(url)
// wv_content.loadUrl(jumpUrl) // wv_content.loadUrl(jumpUrl)
wv_content.setOnTouchListener { p0, p1 -> //canScrollVertically(-1)的值表示是否能向下滚动,false表示已经滚动到顶部 wv_content.setOnTouchListener { p0, p1 -> //canScrollVertically(-1)的值表示是否能向下滚动,false表示已经滚动到顶部
...@@ -418,6 +419,11 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -418,6 +419,11 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
} }
} }
private fun loadUrl() {
val url = WebUrlParamsUtils.getSuffix(jumpUrl, mJtoJHandle?.getUriAppendSuffix())
wv_content?.loadUrl(url)
}
private fun shouldOverridePayUrl(view: WebView, url: String): Boolean { private fun shouldOverridePayUrl(view: WebView, url: String): Boolean {
if (url.startsWith("weixin://")) { if (url.startsWith("weixin://")) {
return try { return try {
...@@ -574,4 +580,8 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() { ...@@ -574,4 +580,8 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
wv_content.destroy() wv_content.destroy()
EventBus.getDefault().unregister(this) EventBus.getDefault().unregister(this)
} }
fun onEvent(event: UserLoginEvent) {
loadUrl()
}
} }
\ No newline at end of file
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