123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- //
- // User.h
- // NIMDemo
- //
- // Created by Fenix Wang on 2017/5/24.
- // Copyright © 2017年 Netease. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import "GiftInputContainer.h"
- #import "NIMSDK/NIMSDK.h"
- @interface User : NSObject
- + (instancetype _Nonnull ) sharedInfo;
- @property int userId;
- @property (nonatomic, nullable) NSString *nick;
- @property (nonatomic, nullable) NSString *mobile;
- @property (nonatomic, nullable) NSString *token;
- @property int coin;
- @property double latitude;
- @property double longitude;
- @property (nonatomic, nullable) NSString *province;
- @property (nonatomic, nullable) NSString *city;
- @property (nonatomic, nullable) NSString *district;
- //chat
- @property (nonatomic, nullable) NSString *countryRoomId;
- @property (nonatomic, nullable) NSString *provinceRoomId;
- @property (nonatomic, nullable) NSString *cityRoomId;
- @property (nonatomic, nullable) NSString *districtRoomId;
- @property (nonatomic, assign) int newCreateTeamId;
- @property (nonatomic, assign) BOOL firstTimeJoin;
- @property (nonatomic, assign) BOOL hasNewSocial;
- @property (nonatomic, nullable, strong) NSString *currentChatRoomId;
- @property (nonatomic, strong, nonnull) NSMutableDictionary * giftGotDict;
- @property (nonatomic, strong, nonnull) NSMutableDictionary * tradeGotDict;
- //social
- @property (nonatomic, strong, nonnull) NSMutableArray *picArr;
- @property (nonatomic, strong, nonnull) NSMutableArray *thumbArr;
- //trade
- @property (nonatomic, strong, nonnull) NSMutableArray *tradePriorityItemArr;
- + (UIColor *_Nonnull)greenColor;
- + (UIColor *_Nonnull)orangeColor;
- + (UIColor *_Nonnull)tinyGrayColor;
- + (UIColor *_Nonnull)blueColor;
- //gift utils
- - (void)requestGiftList:(void (^_Nullable)(NSMutableArray * _Nullable list))success
- failure:(void (^_Nullable)(NSError * _Nullable error))failure;
- - (void)sendGif:(GiftData *_Nullable)giftData
- count:(int)count
- teamId:(NSString *_Nullable)teamId
- targetId:(NSString *_Nullable)targetId
- msg:(NSString *_Nullable)msg
- success:(void (^_Nullable)(NSString * _Nullable giftId, NSString * _Nullable info))sucCallBack
- failure:(void (^_Nullable)(NSError * _Nullable error))failCallBack;
- - (void)requestGif:(NSString *_Nullable)senderId
- targetId:(NSString *_Nullable)targetId
- teamId:(NSString *_Nullable)teamId
- success:(void (^_Nullable)(NSMutableArray * _Nonnull giftArr))sucCallBack
- failure:(void (^_Nullable)(NSError * _Nullable error))failCallBack;
- - (BOOL)isNewGiftGot:(NSString *_Nonnull)key dataId:(NSString *_Nullable)dataId;
- - (void)initGiftGot:(NSString *_Nullable)key dataId:(NSString *_Nullable)dataId;
- - (GiftData *_Nullable)getGiftData:(NSString *_Nonnull)giftId;
- //trade utils
- - (BOOL)isNewTradeGot:(NSString *_Nullable)key dataId:(NSString *_Nullable)dataId;
- //user info utils
- + (NSString *_Nonnull)distance:(double)originLat originLng:(double)originLng targetLat:(double)targetLat targetLng:(double)targetLng;
- + (void)showUserInfo:(NSString *_Nullable)userId;
- - (BOOL)isTeamOwner:(NIMTeam *_Nullable)team;
- - (NSAttributedString *_Nonnull)getUserNameStr:(NIMUser *_Nullable)user;
- - (BOOL)isSystemTeam:(NSString *_Nonnull)teamId;
- + (UIImage *_Nonnull)defaultUserAvatar;
- + (UIImage *_Nonnull)defaultTeamAvatar;
- + (UIImage *_Nonnull)defaultPlaceHolderImage;
-
-
- @end
|