|
@@ -23,40 +23,23 @@ open class WebViewActivity : MBActivity<BViewModel<BRepository>, ActivityWebview
|
|
|
|
|
|
binding.webView.webViewClient = object : QMUIWebViewClient(true, false) {
|
|
|
override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
|
|
|
-
|
|
|
- Log.e("-shy-", "url=: " + url)
|
|
|
if (url!!.contains("about:blank")) {
|
|
|
finishActivity()
|
|
|
return false
|
|
|
}
|
|
|
- if (url!!.contains(BApp.instance()!!.config()!!.searchUrl()+"h5")||url!!.contains(BApp.instance()!!.config()!!.searchUrl()+"")) {
|
|
|
- // if (url!!.contains("xl://goods:8888/goodsDetail")) {
|
|
|
- //发送消息--关闭
|
|
|
-// var ss = url!!.split("&")
|
|
|
-// var s1 = ss[1].split("=")
|
|
|
-
|
|
|
+ if (url!!.contains(BApp.instance()!!.config()!!.searchUrl()+"h5")
|
|
|
+ ||url!!.contains(BApp.instance()!!.config()!!.searchUrl()+"")) {
|
|
|
if (type.equals("1")) {
|
|
|
RxBus.get().post(ConfigRx.PAY_SD_SUESS, "")
|
|
|
} else {
|
|
|
//寄售
|
|
|
RxBus.get().post(ConfigRx.REFRESH_SELL, "")
|
|
|
}
|
|
|
-
|
|
|
finishActivity()
|
|
|
-
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
return true
|
|
|
-// if (Uri.parse(url).host == "www.example.com") {
|
|
|
- // This is my web site, so do not override; let my WebView load the page
|
|
|
- // return false
|
|
|
-// }
|
|
|
- // Otherwise, the link is not for a page on my site, so launch another Activity that handles URLs
|
|
|
-// Intent(Intent.ACTION_VIEW, Uri.parse(url)).apply {
|
|
|
-// startActivity(this)
|
|
|
-// }
|
|
|
-// return true
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|