Эх сурвалжийг харах

feat: 补充 app 内 web 页面功能

陈文艺 3 сар өмнө
parent
commit
7d14d2e08f

+ 3 - 2
Lanu/Common/Views/Base/LNNavigationController.swift

@@ -10,7 +10,8 @@ import UIKit
 
 class LNNavigationController: UINavigationController {
     private let whileListVC: [UIViewController.Type] = [
-        LNMainViewController.self
+        LNMainViewController.self,
+        LNWebViewController.self
     ]
     
     override func viewDidLoad() {
@@ -61,7 +62,7 @@ extension LNNavigationController {
     }
     
     private func showLoginPanel() {
-        LNLoginPanel.show(container: view)
+        LNLoginPanel.show(container: viewControllers.first?.view)
     }
 }
 

+ 2 - 1
Lanu/Views/Login/LNPrivacyTextView.swift

@@ -28,7 +28,8 @@ class LNPrivacyTextView: LNAutoSizeTextView {
 extension LNPrivacyTextView: UITextViewDelegate {
     func textView(_ textView: UITextView, shouldInteractWith URL: URL,
                   in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
-        true
+        pushToWebView(.init(url: URL.absoluteString))
+        return false
     }
     
     func textViewDidChangeSelection(_ textView: UITextView) {