Commit c9d86b2d authored by David黄金龙's avatar David黄金龙

2处代码优化

parent a7e344d2
...@@ -293,6 +293,14 @@ private extension YHH5WebViewVC { ...@@ -293,6 +293,14 @@ private extension YHH5WebViewVC {
api.delegate = self api.delegate = self
webview.addJavascriptObject(api, namespace: nil) webview.addJavascriptObject(api, namespace: nil)
var tUrl = url
if !url.contains("navigationH=") {
tUrl = url + "?navigationH=\(k_Height_NavigationtBarAndStatuBar)"
if url.contains("?") {
tUrl = url + "&navigationH=\(k_Height_NavigationtBarAndStatuBar)"
}
}
url = tUrl
printLog("hjl: 当前加载的url是:\(url)") printLog("hjl: 当前加载的url是:\(url)")
if let url = URL(string: url) { if let url = URL(string: url) {
......
...@@ -32,10 +32,8 @@ extension YHJsApi { ...@@ -32,10 +32,8 @@ extension YHJsApi {
//19、返回时刷新界面 //19、返回时刷新界面
@objc func reloadwebVeiwSyn(_ tag : Any) { @objc func reloadwebVeiwSyn(_ tag : Any) {
DispatchQueue.main.async { DispatchQueue.main.async {
if let tag = tag as? String, tag.count == 1 { if let delegate = self.delegate as? YHH5WebViewVC {
if let delegate = self.delegate as? YHH5WebViewVC { delegate.reloadwebVeiwSyn()
delegate.reloadwebVeiwSyn()
}
} }
} }
} }
......
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