|
@@ -485,8 +485,15 @@ extension WebViewController{
|
|
|
self.navigationController?.pushViewController(VC, animated: false)
|
|
|
}
|
|
|
|
|
|
+ func showBrowsingUrl(strUrl: String) {
|
|
|
+ guard let url = URL(string: strUrl) else {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ self.webView.load(url)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
extension WebViewController:WKUIDelegate, WKNavigationDelegate, WKScriptMessageHandler{
|
|
|
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping ((WKNavigationActionPolicy) -> Void)) {
|
|
|
|
|
@@ -557,6 +564,8 @@ extension WebViewController:WKUIDelegate, WKNavigationDelegate, WKScriptMessageH
|
|
|
self.exitApp()
|
|
|
case "lockscreen":
|
|
|
self.lockscreen()
|
|
|
+ case "showBrowsingUrl":
|
|
|
+ self.showBrowsingUrl(strUrl: parameters)
|
|
|
default:
|
|
|
break
|
|
|
}
|