| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // ViewController.swift
- // QuickSearchLocation
- //
- // Created by mac on 2024/4/10.
- //
- import UIKit
- class ViewController: UIViewController {
- override func viewDidLoad() {
- super.viewDidLoad()
- self.intoMain()
- }
-
- func intoMain() {
-
- QSLBaseManager.shared.initConfig()
-
- // 是否通过引导页
- let isShowGuideKey = UserDefaults.standard.bool(forKey: "isShowGuideKey")
- if !isShowGuideKey {
- // 引导页
- UserDefaults.standard.set(true, forKey: "isShowGuideKey")
- if let sceneDelegate = UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate {
- sceneDelegate.window?.rootViewController = QSLGuideController()
- sceneDelegate.window?.makeKeyAndVisible()
- }
- } else {
- if(!QSLBaseManager.shared.isLoadG){
- QSLBaseManager.shared.initIDFA()
- }
- // 主页
- if let sceneDelegate = UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate {
- sceneDelegate.window?.rootViewController = CustomTabBarController()
- sceneDelegate.window?.makeKeyAndVisible()
- }
- }
-
- }
-
- // 用户协议跳转
- func agreementAction() {
-
- let vc = QSLWebViewController()
- vc.webUrl = QSLConfig.AppServiceAgreementLink
- vc.title = "用户协议"
- vc.isShowTop = true
- self.present(vc, animated: true)
- }
-
- // 隐私协议跳转
- func privacyAction() {
-
- let vc = QSLWebViewController()
- vc.webUrl = QSLConfig.AppPrivacyAgreementLink
- vc.title = "隐私政策"
- vc.isShowTop = true
- self.present(vc, animated: true)
- }
- }
|