feat: 更新素材管理和举报风险地图

This commit is contained in:
2026-07-09 12:20:02 +08:00
parent 9b92d81902
commit 42aca73588
42 changed files with 6164 additions and 1369 deletions

View File

@ -4,7 +4,6 @@
//
import PhotosUI
import QuickLook
import SnapKit
import UIKit
@ -23,7 +22,6 @@ final class WildReportSupplementEvidenceViewController: BaseViewController {
private let submitButton = UIButton(type: .system)
private var pickerTarget: WildReportPickerTarget = .image
private var previewURL: URL?
private weak var activeInputView: UIView?
init(
@ -322,14 +320,11 @@ final class WildReportSupplementEvidenceViewController: BaseViewController {
}
private func previewAttachment(_ attachment: WildReportAttachment) {
guard let url = attachment.localFileURL else {
guard let item = MediaPreviewItem(wildReportAttachment: attachment) else {
showToast("当前附件暂无本地预览")
return
}
previewURL = url
let preview = QLPreviewController()
preview.dataSource = self
present(preview, animated: true)
presentMediaPreview(items: [item], startIndex: 0)
}
@objc private func submitTapped() {
@ -420,16 +415,6 @@ extension WildReportSupplementEvidenceViewController: PHPickerViewControllerDele
}
}
extension WildReportSupplementEvidenceViewController: QLPreviewControllerDataSource {
func numberOfPreviewItems(in controller: QLPreviewController) -> Int {
previewURL == nil ? 0 : 1
}
func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem {
previewURL! as NSURL
}
}
extension WildReportSupplementEvidenceViewController: UITextViewDelegate {
func textViewDidBeginEditing(_ textView: UITextView) {
activeInputView = textView