GlobalVariables.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. //
  2. // GlobalVariables.h
  3. // BuguLive
  4. //
  5. // Created by xfg on 16/2/15.
  6. // Copyright © 2016年 xfg. All rights reserved.
  7. #import <Foundation/Foundation.h>
  8. #import "AppModel.h"
  9. #import "LiveState.h"
  10. #import "UserModel.h"
  11. #import "GiftQuantityModel.h"
  12. #import "BogoGuardianModel.h"
  13. @interface GlobalVariables : NSObject
  14. @property (nonatomic, strong) NSMutableDictionary *config;
  15. @property (nonatomic, strong) AppModel *appModel;
  16. @property (nonatomic, strong) NSArray *doMainUrlArray; // app域名列表(为什么不是单个域名呢?原因是我们有加了域名备份功能)
  17. @property (nonatomic, copy) NSString *currentDoMianUrlStr; // app当前接口地址
  18. @property (nonatomic, copy) NSString *ios_down_url; // ios升级路径
  19. @property (nonatomic, copy) NSString *deviceToken; // 设备id
  20. @property (nonatomic, strong) NSData *new_deviceToken;
  21. @property (nonatomic, copy) NSString *voip_deviceToken; // voip 推送,设备id
  22. @property (nonatomic, assign) double latitude; // 用户当前位置纬度
  23. @property (nonatomic, assign) double longitude; // 用户当前位置经度
  24. @property (nonatomic, copy) NSString *locationCity; // 定位出来的城市
  25. @property (nonatomic, copy) NSString *province; // 定位出来的省
  26. @property (nonatomic, copy) NSString *area; // 定位出来的行政区
  27. @property (nonatomic, copy) NSString *locateName; // 定位出来的具体地址
  28. @property (nonatomic, copy) NSString *addressJsonStr; // 用来存储js_position2的第三个参数(json格式)
  29. @property (nonatomic, copy) NSString *agreement_link ; // 直播协议链接
  30. @property (nonatomic, copy) NSString *privateKeyString ; // 私密的key
  31. @property (nonatomic, assign) BOOL isEnterHistoryLive; // 是否进入回播;
  32. @property (nonatomic, assign) BOOL isHaveDelete; // h5退出当前自己直播是否还有悬浮的x;
  33. @property (nonatomic, strong) LiveState *liveState; // 记录当前app是否在某个直播间,为nil的时候表示退出了直播间
  34. @property (nonatomic, assign)int live_pay_count_down; // 收费直播的倒计时
  35. @property (nonatomic, assign)int live_pay; // 是否支持付费直播1支持0不支持
  36. @property (nonatomic, assign)int distribution; // 是否支持分销1支持0不支持
  37. @property (nonatomic, assign) NSTimeInterval foreGroundTime; // 进入前台时间(s)
  38. @property (nonatomic, assign) NSTimeInterval backGroundTime; // 进入后台时间(s)
  39. @property (nonatomic, assign) NSTimeInterval refreshAudienceListTime; // 推送观众列表的时间
  40. @property (nonatomic, strong) NSMutableArray *newestLivingMArray; // 最新直播列表
  41. @property (nonatomic, strong) NSMutableArray *listMsgMArray; // 观众第一次进入直播间默认显示的消息
  42. @property (nonatomic, copy) NSString *aesKeyStr;
  43. @property (nonatomic, assign) CGFloat appNavigationBarHeight; // 导航栏高度
  44. @property (nonatomic, assign) CGFloat appTabBarHeight; // 状态栏高度
  45. @property(nonatomic, strong) NSDictionary *openinstallDic;//openinstall dic
  46. @property(nonatomic, assign) BOOL isBeingLinkMic;//判断是否正在连麦。
  47. @property(nonatomic, assign) BOOL isBeingPK;//判断是否正在PK。
  48. @property(nonatomic, strong) NSString *token;//登录时返回的token
  49. @property(nonatomic, strong) UserModel *userModel;
  50. @property(nonatomic, assign) BOOL isUserInfoCheck;//判断个人资料是否已修改
  51. @property(nonatomic, strong) NSString *is_noble_mysterious;//是否有权限开启神秘人
  52. @property(nonatomic, strong) NSString *is_noble_stealth;//是否隐身
  53. @property(nonatomic, strong) NSString *is_noble_ranking_stealth;//榜单隐身
  54. @property(nonatomic, strong) NSString *is_guartian;//是否是直播间的守护者
  55. @property(nonatomic, strong) NSString *authentication_name;//认证名称
  56. @property(nonatomic, strong) NSArray *guardImgArr;
  57. @property(nonatomic, assign) BOOL isShop;
  58. @property(nonatomic, strong) BogoGuardianModel *guardianModel;
  59. /// 是不是外设直播
  60. @property(nonatomic, assign) BOOL isOtherPush;
  61. @property(nonatomic, assign) BOOL isShutDownYoung;
  62. + (GlobalVariables *)sharedInstance;
  63. - (void)storageAppMainUrls:(NSArray *)mainUrlArray;
  64. - (void)storageAppCurrentMainUrl:(NSString *)currentMainUrl;
  65. - (void)storageAppAESKey:(NSString *)aesKeyStr;
  66. - (void)storageLoginString:(NSString *)string;
  67. //获取卡通头像
  68. -(UIImage *)getKatongImageWidthID:(NSString *)uid;
  69. - (UIViewController *)getCurrentVC;
  70. +(void)checkXibString:(NSString *)string;
  71. @property(nonatomic, assign) BOOL openAgora;
  72. @property(nonatomic, assign) BOOL openFirebaseSMS;
  73. //Tlive的view
  74. @property(nonatomic, strong) UIView *tliveView;
  75. @property(nonatomic, strong) NSString *giftSelecUserId;
  76. @property(nonatomic, strong) NSString *g_live_type;
  77. @property(nonatomic, strong) NSArray <GiftQuantityModel *> *giftQuantityModelList;
  78. @property(nonatomic, strong) UIView *voiceGiftView;
  79. @property(nonatomic, strong) NSString *otp_message_id;
  80. @end