用内置有线传输帮助页替换飞书外链。
帮助文档改为应用内 WebView 加载本地 HTML,避免依赖外部平台内容。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user