少年修仙传客户端基础资源
client_Zxw
2018-08-28 2cfc54da70f0639f662d2cd8ce08c69d813e9bd2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
//  YLAccount.h
//  YileSDK
//
//  Created by 李英辉 on 11/11/17.
//
@class DYYFloatWindow;
 
#import <UIKit/UIKit.h>
 
/**
 *  玩家账号类
 */
@interface YLAccount : NSObject <NSCoding>
 
@property (nonatomic, assign) NSInteger accountId;
@property (nonatomic, strong) NSString * identifier;
@property (nonatomic, strong) NSString * token;
@property (nonatomic, strong) NSDate * tokenExpiry;
@property (nonatomic, strong) NSString * password;
//@property (nonatomic, strong) NSString * phoneNumber;
 
@property(nonatomic, assign)NSInteger hasBindPhone; // -1 未定义 0 未绑定 1绑定
@property (nonatomic, readonly) BOOL loggedIn;
 
//小助手位置
@property(nonatomic) CGFloat x;
@property(nonatomic) CGFloat y;
 
/**
 *  检查令牌是否过期
 *
 *  @return 是否过期
 */
- (BOOL)tokenExpired;
 
/**
 *  获取当前登录的玩家账号
 */
+ (YLAccount *)sharedInstance;
 
//小助手
-(DYYFloatWindow *)floatBtn;
 
/// 显示小助手
- (void)showFloatBtn;
/// 隐藏小助手
- (void)hideFloatBtn;
 
//显示绑定手机号页面  isLogin是否是登录自动弹出
- (void)showBindPhoneView:(BOOL)isLogin;
 
/**
 *  将账号相关信息序列化到本地进行缓存,下次可免登陆(token过期则仍需重新登录)
 */
+ (BOOL)rememberCurrentAccount;
 
/**
 *  退出当前账号
 */
+ (void)logout;
 
@end