123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- //
- // RegisterLoginManager.swift
- // RainbowPlanet
- //
- // Created by 南鑫林 on 2019/8/1.
- // Copyright © 2019 RainbowPlanet. All rights reserved.
- //
- import UIKit
- class RegisterLoginManager: NSObject {
- class func registerLoginSuccessApi(vc:UIViewController?) {
- // 设置友盟别名
- UMManager.shared.addAlias()
- weak var vc = vc
- if UserModel.shared().getModel()?.isFollowSuggestTopic == 0 || UserModel.shared().getModel()?.isFollowSuggestTopic == nil { //设置性别
- vc?.navigationController?.pushViewController(GenderSelectionViewController(), animated: true)
- }else {// 设置首页
- baseTabbarViewController?.setBadge()
- if vc?.presentingViewController != nil {
- if vc?.navigationController?.presentationController != nil {
- vc?.navigationController?.dismiss(animated: false, completion: {
- NotificationCenter.default.post(name: NSNotification.Name("login"), object: nil)
- LoginNowView.removeLoginNowView()
- kAppDelegate.setData()
- })
- }else {
- vc?.dismiss(animated: false, completion: {
- NotificationCenter.default.post(name: NSNotification.Name("login"), object: nil)
- LoginNowView.removeLoginNowView()
-
- kAppDelegate.setData()
- })
- }
-
- } else {
- vc?.navigationController?.popToRootViewController(animated: false)
- NotificationCenter.default.post(name: NSNotification.Name("login"), object: nil)
- LoginNowView.removeLoginNowView()
- kAppDelegate.setData()
- }
- baseTabbarViewController?.selectedIndex = 0
- }
- }
- }
|