用内置有线传输帮助页替换飞书外链。

帮助文档改为应用内 WebView 加载本地 HTML,避免依赖外部平台内容。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-16 09:06:16 +08:00
parent ce6de76055
commit 5f1c22c6a8
6 changed files with 284 additions and 6 deletions

View File

@ -7,7 +7,7 @@ import SnapKit
import UIKit
import WebKit
/// H5 使 WebView
/// WebView H5 HTML
final class AgreementWebViewController: BaseViewController {
private let pageTitle: String
private let url: URL
@ -37,7 +37,15 @@ final class AgreementWebViewController: BaseViewController {
view.addSubview(loadingIndicator)
loadingIndicator.hidesWhenStopped = true
loadingIndicator.startAnimating()
webView.load(URLRequest(url: url))
loadContent()
}
private func loadContent() {
if url.isFileURL {
webView.loadFileURL(url, allowingReadAccessTo: url.deletingLastPathComponent())
} else {
webView.load(URLRequest(url: url))
}
}
override func setupConstraints() {

View File

@ -293,8 +293,11 @@ final class TravelAlbumCameraImportViewController: UIViewController {
}
@objc private func helpTapped() {
guard let url = URL(string: "https://sharesky.feishu.cn/wiki/CaAhwl3Gnin4Kqk0BVocK3SGnab?from=from_copylink") else { return }
UIApplication.shared.open(url)
guard let url = WiredCameraTransferHelpDocument.bundledURL() else { return }
navigationController?.pushViewController(
AgreementWebViewController(title: WiredCameraTransferHelpDocument.pageTitle, url: url),
animated: true
)
}
}

View File

@ -777,8 +777,14 @@ final class WiredCameraTransferViewController: BaseViewController {
}
@objc private func helpTapped() {
guard let url = URL(string: "https://sharesky.feishu.cn/wiki/CaAhwl3Gnin4Kqk0BVocK3SGnab?from=from_copylink") else { return }
UIApplication.shared.open(url)
guard let url = WiredCameraTransferHelpDocument.bundledURL() else {
showToast("帮助文档暂不可用")
return
}
navigationController?.pushViewController(
AgreementWebViewController(title: WiredCameraTransferHelpDocument.pageTitle, url: url),
animated: true
)
}
private func presentPhotoPreview(_ item: TravelAlbumOTGPhotoItem) {