12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- //
- // UserManager.h
- // LiveTV
- //
- // Created by 翟玉磊 on 2019/4/22.
- // Copyright © 2019 翟玉磊. All rights reserved.
- //
- /*
- 使用方式
- // 引用
- #import "UserManager.h"
- // 调用
- [UserManager saveUserInfo:@{@"nickname":@"小张飞"}];
-
- UserInfo *model = [UserManager userInfo];
-
- NSLog(@"%@", model.nickname);
- */
- #import <Foundation/Foundation.h>
- NS_ASSUME_NONNULL_BEGIN
- @interface UserInfo : NSObject
- @property (nonatomic,copy)NSString *userid;//用户id
- @property (nonatomic,copy)NSString *avatar;//头像
- @property (nonatomic,copy)NSString *mobile;//手机号
- @property (nonatomic,copy)NSString *userName;//用户名
- @property (nonatomic,copy)NSString *nickname;//用户昵称
- @property (nonatomic,copy)NSString *birthday;//生日
- @property (nonatomic,copy)NSString *token;//token
- @property (nonatomic,copy)NSString *sex;//性别
- - (instancetype)initWithDictionary:(NSDictionary *)dictionary;
- @end
- @interface UserManager : NSObject
- /**
- 存储用户信息
- @param dic 服务器获取来的用户信息字典
- @return return value description
- */
- + (BOOL)saveUserInfo:(NSDictionary *)dic;
- /**
- 取用户信息
- @return 返回用户信息模型
- */
- + (UserInfo *)userInfo;
- /**
- 清空用户信息
- @return 是否清空
- */
- + (BOOL)clearUserInfo;
- @end
- NS_ASSUME_NONNULL_END
|