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

2处代码优化

parent a7e344d2
......@@ -293,6 +293,14 @@ private extension YHH5WebViewVC {
api.delegate = self
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)")
if let url = URL(string: url) {
......
......@@ -32,10 +32,8 @@ extension YHJsApi {
//19、返回时刷新界面
@objc func reloadwebVeiwSyn(_ tag : Any) {
DispatchQueue.main.async {
if let tag = tag as? String, tag.count == 1 {
if let delegate = self.delegate as? YHH5WebViewVC {
delegate.reloadwebVeiwSyn()
}
if let delegate = self.delegate as? YHH5WebViewVC {
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