Commit cdd0be70 by 刘鹏

feat: webview加入页内跳转url方法

parent c6b43e16
...@@ -33,12 +33,12 @@ ext { ...@@ -33,12 +33,12 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//mdt 组件 //mdt 组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.23",
//第一步 //第一步
"ydl-platform" : "0.0.41.5", "ydl-platform" : "0.0.41.06",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.73", "ydl-webview" : "0.0.38.77",
"ydl-media" : "0.0.21.44", "ydl-media" : "0.0.21.44",
"ydl-pay" : "0.0.18.19", "ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.85", "m-audioim" : "0.0.49.29.85",
...@@ -119,10 +119,10 @@ ext { ...@@ -119,10 +119,10 @@ ext {
//mdt组件 //mdt组件
"ydl-tuicore" : "0.0.22", "ydl-tuicore" : "0.0.22",
//第一步 //第一步
"ydl-platform" : "0.0.41.5", "ydl-platform" : "0.0.41.06",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.73", "ydl-webview" : "0.0.38.77",
"ydl-media" : "0.0.21.44", "ydl-media" : "0.0.21.44",
"ydl-pay" : "0.0.18.19", "ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.85", "m-audioim" : "0.0.49.29.85",
......
package com.ydl.event
/**
* h5页面内访问URL
*/
class ReloadUrlEvent {
var url: String? = null
constructor(url: String) {
this.url = url
}
}
\ No newline at end of file
...@@ -34,6 +34,7 @@ import com.tencent.smtt.sdk.WebView; ...@@ -34,6 +34,7 @@ import com.tencent.smtt.sdk.WebView;
import com.tencent.smtt.sdk.WebViewClient; import com.tencent.smtt.sdk.WebViewClient;
import com.umeng.socialize.UMShareAPI; import com.umeng.socialize.UMShareAPI;
import com.umeng.socialize.bean.SHARE_MEDIA; import com.umeng.socialize.bean.SHARE_MEDIA;
import com.ydl.event.ReloadUrlEvent;
import com.ydl.utils.PopUtils; import com.ydl.utils.PopUtils;
import com.ydl.utils.ProxyCheckUtils; import com.ydl.utils.ProxyCheckUtils;
import com.ydl.utils.WebUrlParamsUtils; import com.ydl.utils.WebUrlParamsUtils;
...@@ -1068,6 +1069,12 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -1068,6 +1069,12 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
} }
} }
public void onEvent(ReloadUrlEvent event) {
//刷新页面
loadUrl(event.getUrl());
shouldClearHistory = true;
}
public void onEvent(UserBindPhoneEvent event) { public void onEvent(UserBindPhoneEvent event) {
//刷新页面 //刷新页面
loadUrl(h5Params.getUrl()); loadUrl(h5Params.getUrl());
......
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