GlobalInstance.h 1011 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
//
//  LoginInfo.h
//  Car
//
//  Created by Javen on 2016/12/23.
//  Copyright © 2016年 上海勾芒信息科技. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "car_objc_json_client.h"
#import "WWSideslipViewController.h"
Sandy's avatar
Sandy committed
12
#import "MainViewController.h"
13 14 15 16 17 18 19
#define kGlobal [GlobalInstance shareInstance]
#define kUser kGlobal.loginResult.user

@interface GlobalInstance : NSObject
{
  NSString *_userName;
  NSString *_userPsw;
Sandy's avatar
Sandy committed
20
  BOOL _isNoFirst;
21 22 23 24 25 26 27 28 29 30 31 32
}


/**
 登录时返回的数据
 */
@property (strong, nonatomic) LoginResult *loginResult;

/**
 全局可访问的侧边栏vc
 */
@property (strong, nonatomic) WWSideslipViewController *sideSlipVC;
Sandy's avatar
Sandy committed
33 34
@property (strong, nonatomic) UINavigationController *mainNaVC;
@property (strong, nonatomic) MainViewController *mainVC;
35 36 37 38 39 40 41 42 43 44 45 46


+ (instancetype)shareInstance;

- (void)setUserName:(NSString *)userName;

- (void)setUserPsw:(NSString *)userPsw;

- (NSString *)userName;

- (NSString *)userPsw;

Sandy's avatar
Sandy committed
47 48 49
- (void)setIsNoFirst:(BOOL)isNoFirst;

- (BOOL)isNoFirst;
50
@end