PrefixHeader.pch 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. //
  2. // PrefixHeader.pch
  3. // JianYuIOS
  4. //
  5. // Created by lixianglan on 2018/1/23.
  6. // Copyright © 2018年 lixianglan. All rights reserved.
  7. //
  8. #ifndef PrefixHeader_pch
  9. #define PrefixHeader_pch
  10. #import "constant.h"
  11. #import "LXUserDefaults.h"
  12. #import "LXProgressView.h"
  13. #import "LXNetworkManager.h"
  14. #import "AppDelegate.h"
  15. #import "UITabBar+badge.h"
  16. //屏幕宽
  17. #define WIDTH [UIScreen mainScreen].bounds.size.width
  18. //屏幕高
  19. #define HEIGHT [UIScreen mainScreen].bounds.size.height
  20. //屏幕高 frame
  21. #define HEIGHT_NEW [UIScreen mainScreen].bounds.size.height - NAVIGATION_BAR_HEIGHT
  22. #define LocalStr_None @""//空字符串
  23. #define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
  24. //色值转换
  25. #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
  26. #define UIColorRGBA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
  27. // 判断是否是iPhone X 及其以上
  28. #define iPhoneX (HEIGHT>=812)
  29. // 状态栏高度
  30. #define STATUS_BAR_HEIGHT (iPhoneX ? 44.f : 20.f)
  31. // 导航栏高度
  32. #define NAVIGATION_BAR_HEIGHT (iPhoneX ? 88.f : 64.f)
  33. // tabBar高度
  34. #define TAB_BAR_HEIGHT (iPhoneX ? (49.f+34.f) : 49.f)
  35. // home indicator
  36. #define HOME_INDICATOR_HEIGHT (iPhoneX ? 34.f : 0.f)
  37. #define adjustsScrollViewInsets(scrollView)\
  38. do {\
  39. _Pragma("clang diagnostic push")\
  40. _Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"")\
  41. if ([scrollView respondsToSelector:NSSelectorFromString(@"setContentInsetAdjustmentBehavior:")]) {\
  42. NSMethodSignature *signature = [UIScrollView instanceMethodSignatureForSelector:@selector(setContentInsetAdjustmentBehavior:)];\
  43. NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];\
  44. NSInteger argument = 2;\
  45. invocation.target = scrollView;\
  46. invocation.selector = @selector(setContentInsetAdjustmentBehavior:);\
  47. [invocation setArgument:&argument atIndex:2];\
  48. [invocation retainArguments];\
  49. [invocation invoke];\
  50. }\
  51. _Pragma("clang diagnostic pop")\
  52. } while (0)
  53. // 调试打印输出
  54. #ifdef DEBUG
  55. #define NSLog(format, ...) printf("[%s] %s [第%d行] %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ## __VA_ARGS__] UTF8String]);
  56. #define FLog(...) NSLog(__VA_ARGS__);
  57. #else
  58. #define NSLog(format, ...)
  59. #define FLog(...)
  60. #endif
  61. #define FLogFunc FLog(@"%s",__func__)
  62. #import <JavaScriptCore/JavaScriptCore.h>
  63. #import <UShareUI/UShareUI.h>
  64. #import <UMSocialCore/UMSocialCore.h>
  65. #import <UMSocialCore/UMSocialCore.h>
  66. #import <AFNetworking.h>
  67. #import "NoNetView.h"
  68. //#import <WebKit/WebKit.h>
  69. #import <CommonCrypto/CommonCryptor.h>
  70. #define kRequestWebViewWithUrl @"kRequestWebViewWithUrl"
  71. #define kUpdateNotifyState @"kUpdateNotifyState"
  72. #define kAfterReceiveNewMsg @"kAfterReceiveNewMsg"
  73. #define JYNewsRedPoint @"JYNewsRedPoint"
  74. #define kReloadWebVIew @"kReloadWebVIew"
  75. #define kLoginOut @"kLoginOut"
  76. #define kNewsTable @"kNewsTable"
  77. //点击订阅通知
  78. #define ClickSubNotiMethods @"ClickSubNotiMethods"
  79. //点击支付相关通知
  80. #define ClickPayMethods @"ClickPayMethods"
  81. //支付回调通知
  82. #define AlipayWXpayStatus @"AlipayWXpayStatus"
  83. //前往登录通知-tabbar
  84. #define LoginIndexTabBar @"LoginIndexTabBar"
  85. //刷新非当前页
  86. #define RefreshNonCurVC @"RefreshNonCurVC"
  87. //刷新所有页面-非订阅
  88. #define RefreshAllVC @"RefreshAllVC"
  89. //只刷新我的和百宝箱
  90. #define RefreshExpAndMine @"RefreshExpAndMine"
  91. //通知-后台唤起-
  92. #define RemoteNotifications @"RemoteNotifications"
  93. //通知-粘贴板数据
  94. #define UpdateClipboard @"UpdateClipboard"
  95. //通知-打开粘贴板页面
  96. #define OpenTheClipboard @"OpenTheClipboard"
  97. //渐变色
  98. #define ColorGradientArray [NSArray arrayWithObjects:(id)UIColorFromRGB(0x094303).CGColor,(id)UIColorFromRGB(0x343d32).CGColor,(id)UIColorFromRGB(0xB2B7B7).CGColor, nil]
  99. //#define OCRAPPID @"TIDAXUV9"
  100. //#define LICENCE @"p78X6jCKNuDQkIOPNl8TNLbULoxMVDkf+gQM18uC0ZARhlA5Cjzk8SuUP+p43Vhr0aH+i/Jmxc8wzdnGdnlqiLCdRYTZYvR7oMol4AP534BxF9GMgqty0x4Hjf2d8usufYq6FT04EjMk9Mudcz0AGyBJGkgLCiKDZNNrCvXC9iGu6HjKkDlKWhcLFmMimw9NjpIBSVubmbZq9LI6yCTVVpJe934uUSpRX+4aGhH3x6M7Uv+aOz232qxVldLxSWeS+16IVVI+uoGILEgpTOLbdNGjtYxAI5X3GdyR9/ZXPHUKbSwNaJWj4svMDm+unKSvshPmZ9we28IzWx0ddxn22w=="
  101. #define OCRAPPID @"IDA24rmI"
  102. #define LICENCE @"p78X6jCKNuDQkIOPNl8TNLbULoxMVDkf+gQM18uC0ZARhlA5Cjzk8SuUP+p43Vhr0aH+i/Jmxc8wzdnGdnlqiLCdRYTZYvR7oMol4AP534BxF9GMgqty0x4Hjf2d8usufYq6FT04EjMk9Mudcz0AGyBJGkgLCiKDZNNrCvXC9iG2cYczbyncMrpud8GaWP/O2BhbWuWeoCpqhfOM16agoAHKepGWdhhkZTDOaVPKUMmbaQ8I2dFlk9IfOrmqc1UFO+mni7bJ90T8NjjyOPbcKYtJPFwVjyGzTse9klfXuHgNealpJfvXrTnS85BNZcxYxVh+U3H58Bel+LRnFIVUag=="
  103. //微信SDK头文件
  104. #import "WXApi.h"
  105. //支付宝支付头文件
  106. #import <AlipaySDK/AlipaySDK.h>
  107. //内购
  108. #import <StoreKit/StoreKit.h>
  109. //加载图片
  110. #import <SDWebImage/UIButton+WebCache.h>
  111. #import "UIImageView+WebCache.h"
  112. //OCR
  113. #import <WBOCRService/WBOCRService.h>
  114. #import <WBCloudReflectionFaceVerify/WBFaceVerifyCustomerService.h>
  115. #import "UIView+Extension.h"
  116. #import "GlobalData.h"
  117. #import "UIDevice+Hardware.h"
  118. #import "ZKControl.h"
  119. #import "ZKMethod.h"
  120. #import "Reachability.h"
  121. #import "NJKWebViewProgressView.h"
  122. #import "NJKWebViewProgress.h"
  123. #import "JYWKNewWebController.h"
  124. #import "ZKClipboardView.h"
  125. #import "ZKFaceVerifyMsgView.h"
  126. //#define kHost @"http://web-jydev-ws.jianyu360.cn/" //王山
  127. //#define kHost @"http://web-jydev-zyh.jianyu360.cn/" //张雨涵
  128. //#define kHost @"http://web-jydev-wcj.jianyu360.cn/" //王传近
  129. //#define kHost @"http://web-jydev-wky.jianyu360.cn/" //王凯悦
  130. //#define kHost @"http://web-jydev-zxl.jianyu360.cn/" //张鑫磊
  131. //#define kHost @"http://web-jydev-xzh.jianyu360.cn/" //徐志恒
  132. #define kHost @"https://app-jytest.jianyu360.cn/" //测试
  133. //#define kHost @"https://app-i2.jianyu360.com/" //新正式
  134. //#define kHost @"https://app207-jytest.jianyu360.cn/" //测试http
  135. /*
  136. 18613717801 123456
  137. */
  138. #define POST_JS @"function my_post(path, params) {\
  139. var method = \"POST\";\
  140. var form = document.createElement(\"form\");\
  141. form.setAttribute(\"method\", method);\
  142. form.setAttribute(\"action\", path);\
  143. for(var key in params){\
  144. if (params.hasOwnProperty(key)) {\
  145. var hiddenFild = document.createElement(\"input\");\
  146. hiddenFild.setAttribute(\"type\", \"hidden\");\
  147. hiddenFild.setAttribute(\"name\", key);\
  148. hiddenFild.setAttribute(\"value\", params[key]);\
  149. }\
  150. form.appendChild(hiddenFild);\
  151. }\
  152. document.body.appendChild(form);\
  153. form.submit();\
  154. }"
  155. #endif /* PrefixHeader_pch */