Browse Source

feat:配置修改/bug修复

ythtc 1 month ago
parent
commit
984f3c94c8

+ 1 - 1
VenusKitto/FeedbackViewController.swift

@@ -287,7 +287,7 @@ final class VKWhistleBoardController: UIViewController {
     
     private func navigateToQuestionViewController() {
         // 初始化答题页面
-        let questionVC = QuizStageController()
+        let questionVC = EntryGateController()
         if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
             if let window = windowScene.windows.first {
                 // 将 questionVC 作为 rootViewController

+ 3 - 3
VenusKitto/Power/EntryGateController.swift

@@ -9,7 +9,7 @@ import Foundation
 import UIKit
 //import sys/utsname.h
 
-class EntryGateController: UIViewController, RoutePickerAgent {
+class EntryGateController: UIViewController, RoutePickerDelegate {
     
     // MARK: - API Endpoints
     private let pathGetRoutes = "/ditch/list"
@@ -576,12 +576,12 @@ class EntryGateController: UIViewController, RoutePickerAgent {
         }
     }
     
-    // MARK: - RoutePickerAgent
+    // MARK: - RoutePickerDelegate
     func routePicker(_ panel: RoutePickerView, didPick channel: Channel) {
         selectedChannel = channel
         refreshChannelTitle()
         
-        view.removeFromSuperview()
+        panel.removeFromSuperview()
         routePopup = nil
         
         print("[Channel] Selected channel: \(channel.name) (id=\(channel.id))")

+ 1 - 0
VenusKitto/Power/QuizStageController.swift

@@ -300,6 +300,7 @@ class QuizStageController: UIViewController, ATAdLoadingDelegate, ATBannerDelega
     }
     
     func setSelectedChannel(_ channel: Channel) {
+        print("SSSS\(channel.id)")
         self.selectedChannelRef = channel
         
     }

+ 2 - 2
VenusKitto/Power/RoutePickerView.swift

@@ -14,12 +14,12 @@ struct Channel: Codable, Hashable {
     let name: String
 }
 
-protocol RoutePickerAgent: AnyObject {
+protocol RoutePickerDelegate: AnyObject {
     func routePicker(_ panel: RoutePickerView, didPick channel: Channel)
 }
 
 class RoutePickerView: UIView {
-    weak var delegate: RoutePickerAgent?
+    weak var delegate: RoutePickerDelegate?
     private let channels: [Channel]
 
     private let backdropView: UIView = {

+ 1 - 1
VenusKitto/SettingsViewController.swift

@@ -829,7 +829,7 @@ final class SettingsViewController: UIViewController, ATAdLoadingDelegate, ATBan
             "finishtimestamp": finishMs
         ]
         // 发起上报
-        let urlString = "\(baseURL)/ad/saveRecord"
+        let urlString = "\(apiBaseURL)/ad/saveRecord"
         guard let url = URL(string: urlString) else {
             print("[AD-Upload] URL 无效: \(urlString)")
             return

+ 7 - 1
VenusKitto/SomeConfig.swift

@@ -15,7 +15,13 @@ let baseURL: String = {
 //    #endif
 }()
 
-let apiBaseURL: String = baseURL
+let apiBaseURL: String = {
+//        #if DEBUG
+//        return "http://192.168.1.20:25903"
+//        #else
+        return "http://advise.ytmdm.com/gateway/gollumios-service"  // 生产环境
+//        #endif
+}()
 
 let kTakuAppID: String = "a68d88c483d8c5"
 let kTakuAppKey: String = "a3bf738fa8162cf221450ce3d76210f21"

+ 1 - 1
VenusKitto/SplashAdViewController.swift

@@ -370,7 +370,7 @@ extension SplashAdViewController {
         ]
         
         // 发起上报
-        let urlString = "\(baseURL)/ad/saveRecord"
+        let urlString = "\(apiBaseURL)/ad/saveRecord"
         guard let url = URL(string: urlString) else {
             print("[AD-Upload] URL 无效: \(urlString)")
             return