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

帮助文档改为应用内 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() {