From 299add0575da42abc5c47962149f0a6e510434fd Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 19 Jan 2024 11:06:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4webView=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/common/activity/WebViewActivity.java | 4 ++++ .../com/yunbao/common/utils/JavascriptInterfaceUtils.java | 1 + 2 files changed, 5 insertions(+) diff --git a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java index ee1dbfbfc..edff6179d 100644 --- a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java @@ -100,6 +100,10 @@ public class WebViewActivity extends AbsActivity { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { L.e("H5-------->" + url); + if(isKefu(url)){ + RouteUtil.forwardCustomerService(url); + return true; + } if (url.startsWith(Constants.COPY_PREFIX)) { String content = url.substring(Constants.COPY_PREFIX.length()); if (!TextUtils.isEmpty(content)) { diff --git a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java index 8f013b898..33048d9ce 100644 --- a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java @@ -680,6 +680,7 @@ public class JavascriptInterfaceUtils { @JavascriptInterface public void androidGotoCustomerService(String url) { + ToastUtil.showDebug("网页跳客服页面"); RouteUtil.forwardCustomerService(url); } }