充电管理
This commit is contained in:
@@ -210,6 +210,7 @@ GEM
|
||||
xcpretty (~> 0.2, >= 0.0.7)
|
||||
|
||||
PLATFORMS
|
||||
arm64-darwin-21
|
||||
arm64-darwin-22
|
||||
|
||||
DEPENDENCIES
|
||||
|
||||
@@ -138,7 +138,11 @@ class WebViewController : ZDViewController {
|
||||
if showNavBar == false { return true }
|
||||
guard let hiddenPaths = hiddenNavBarURLPaths, let currentUrl = webView.url else { return false }
|
||||
let currentPath = currentUrl.path
|
||||
return hiddenPaths.contains(currentPath)
|
||||
return hiddenPaths.contains { hiddenPath in
|
||||
// 完全匹配当前 path,或以该 path + "/" 开头(覆盖子页面)
|
||||
let basePath = hiddenPath.hasSuffix("/") ? String(hiddenPath.dropLast()) : hiddenPath
|
||||
return currentPath == basePath || currentPath.hasPrefix(basePath + "/")
|
||||
}
|
||||
}
|
||||
|
||||
private func updateNavBarVisibility() {
|
||||
|
||||
@@ -170,7 +170,7 @@ open class WebViewTool : NSObject {
|
||||
vc = WebViewController(showNavBar:false, title: nil, url: "\((h5Models?.managerPeople)!)?token=\((USER.token)!)"+(appending ?? ""))
|
||||
break
|
||||
case .gjUrl:
|
||||
vc = WebViewController(showNavBar:true, title: nil, url: "\((h5Models?.gjUrl)!)?"+(appending ?? ""), hiddenNavBarURLPaths: ["/h5/pages/order/list", "/h5/pages/invoice/list"])
|
||||
vc = WebViewController(showNavBar:true, title: nil, url: "\((h5Models?.gjUrl)!)?"+(appending ?? ""), hiddenNavBarURLPaths: ["/h5/pages/order/list", "/h5/pages/invoice/list", "/h5/pages/order/detail", "/h5/pages/invoice/detail"])
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user