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

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

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-16 09:06:16 +08:00
co-authored by Cursor
parent ce6de76055
commit 5f1c22c6a8
6 changed files with 284 additions and 6 deletions
@@ -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() {
@@ -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
)
}
}
@@ -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) {