无故事王国
2023-09-18 b395e5ea758b24803743535f86bf443765237551
WanPai/AppDelegate.swift
@@ -62,7 +62,7 @@
extension AppDelegate{
    func registerAndLoginSuccess(){
        let snapView = screnDelegate?.window?.snapshotView(afterScreenUpdates: true)
        let snapView = sceneDelegate?.window?.snapshotView(afterScreenUpdates: true)
        let tabBar = BaseTabBarVC()
        let homeNav = BaseNav(rootViewController: HomeVC())
@@ -77,9 +77,9 @@
        let searchVCNav = BaseNav(rootViewController: SearchVC())
        searchVCNav.tabBarItem = UITabBarItem(title: "搜索玩湃", image: UIImage(named: "tabbar_search"), selectedImage: UIImage(named: "tabbar_search_s")!.withRenderingMode(.alwaysOriginal))
        tabBar.viewControllers = [homeNav,clouseNav,welfareVCNav,searchVCNav]
        screnDelegate?.window?.rootViewController = tabBar
        screnDelegate?.window?.rootViewController?.view.addSubview(snapView!)
        screnDelegate?.window?.makeKeyAndVisible()
      sceneDelegate?.window?.rootViewController = tabBar
      sceneDelegate?.window?.rootViewController?.view.addSubview(snapView!)
      sceneDelegate?.window?.makeKeyAndVisible()
        UIView.animate(withDuration: 1.5) {
            snapView?.alpha = 0
@@ -91,9 +91,9 @@
    func needLogin(){
      UserViewModel.clearToken()
      let loginVC = LoginVC()
      loginVC.modalPresentationStyle = .fullScreen
      JQ_currentViewController().present(loginVC, animated: true)
      let loginNav = LoginNav(rootViewController: LoginVC())
      loginNav.modalPresentationStyle = .fullScreen
      JQ_currentViewController().present(loginNav, animated: true)
    }
}