diff --git a/Gemfile.lock b/Gemfile.lock index 7556feb..f748344 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -210,6 +210,7 @@ GEM xcpretty (~> 0.2, >= 0.0.7) PLATFORMS + arm64-darwin-21 arm64-darwin-22 DEPENDENCIES diff --git a/OrderScheduling/Common/WebView/WebViewController.swift b/OrderScheduling/Common/WebView/WebViewController.swift index 13d6797..df836f0 100644 --- a/OrderScheduling/Common/WebView/WebViewController.swift +++ b/OrderScheduling/Common/WebView/WebViewController.swift @@ -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() { diff --git a/OrderScheduling/Common/WebView/WebViewTool.swift b/OrderScheduling/Common/WebView/WebViewTool.swift index fd2b7d4..42a943b 100644 --- a/OrderScheduling/Common/WebView/WebViewTool.swift +++ b/OrderScheduling/Common/WebView/WebViewTool.swift @@ -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 }