123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- //
- // PrefixHeader.pch
- // JianYuIOS
- //
- // Created by lixianglan on 2018/1/23.
- // Copyright © 2018年 lixianglan. All rights reserved.
- //
- #ifndef PrefixHeader_pch
- #define PrefixHeader_pch
- #import "constant.h"
- #import "LXUserDefaults.h"
- #import "LXProgressView.h"
- #import "LXNetworkManager.h"
- #import "AppDelegate.h"
- #import "UITabBar+badge.h"
- //屏幕宽
- #define WIDTH [UIScreen mainScreen].bounds.size.width
- //屏幕高
- #define HEIGHT [UIScreen mainScreen].bounds.size.height
- //屏幕高 frame
- #define HEIGHT_NEW [UIScreen mainScreen].bounds.size.height - NAVIGATION_BAR_HEIGHT
- #define LocalStr_None @""//空字符串
- #define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
- //色值转换
- #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]
- #define UIColorRGBA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
- // 判断是否是iPhone X 及其以上
- #define iPhoneX (HEIGHT>=812)
- // 状态栏高度
- #define STATUS_BAR_HEIGHT (iPhoneX ? 44.f : 20.f)
- // 导航栏高度
- #define NAVIGATION_BAR_HEIGHT (iPhoneX ? 88.f : 64.f)
- // tabBar高度
- #define TAB_BAR_HEIGHT (iPhoneX ? (49.f+34.f) : 49.f)
- // home indicator
- #define HOME_INDICATOR_HEIGHT (iPhoneX ? 34.f : 0.f)
- #define adjustsScrollViewInsets(scrollView)\
- do {\
- _Pragma("clang diagnostic push")\
- _Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"")\
- if ([scrollView respondsToSelector:NSSelectorFromString(@"setContentInsetAdjustmentBehavior:")]) {\
- NSMethodSignature *signature = [UIScrollView instanceMethodSignatureForSelector:@selector(setContentInsetAdjustmentBehavior:)];\
- NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];\
- NSInteger argument = 2;\
- invocation.target = scrollView;\
- invocation.selector = @selector(setContentInsetAdjustmentBehavior:);\
- [invocation setArgument:&argument atIndex:2];\
- [invocation retainArguments];\
- [invocation invoke];\
- }\
- _Pragma("clang diagnostic pop")\
- } while (0)
- // 调试打印输出
- #ifdef DEBUG
- #define NSLog(format, ...) printf("[%s] %s [第%d行] %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ## __VA_ARGS__] UTF8String]);
- #define FLog(...) NSLog(__VA_ARGS__);
- #else
- #define NSLog(format, ...)
- #define FLog(...)
- #endif
- #define FLogFunc FLog(@"%s",__func__)
- #import <JavaScriptCore/JavaScriptCore.h>
- #import <UShareUI/UShareUI.h>
- #import <UMSocialCore/UMSocialCore.h>
- #import <UMSocialCore/UMSocialCore.h>
- #import <AFNetworking.h>
- #import "NoNetView.h"
- //#import <WebKit/WebKit.h>
- #import <CommonCrypto/CommonCryptor.h>
- #define kRequestWebViewWithUrl @"kRequestWebViewWithUrl"
- #define kUpdateNotifyState @"kUpdateNotifyState"
- #define kAfterReceiveNewMsg @"kAfterReceiveNewMsg"
- #define JYNewsRedPoint @"JYNewsRedPoint"
- #define kReloadWebVIew @"kReloadWebVIew"
- #define kLoginOut @"kLoginOut"
- #define kNewsTable @"kNewsTable"
- //点击订阅通知
- #define ClickSubNotiMethods @"ClickSubNotiMethods"
- //点击支付相关通知
- #define ClickPayMethods @"ClickPayMethods"
- //支付回调通知
- #define AlipayWXpayStatus @"AlipayWXpayStatus"
- //前往登录通知-tabbar
- #define LoginIndexTabBar @"LoginIndexTabBar"
- //刷新非当前页
- #define RefreshNonCurVC @"RefreshNonCurVC"
- //刷新所有页面-非订阅
- #define RefreshAllVC @"RefreshAllVC"
- //只刷新我的和百宝箱
- #define RefreshExpAndMine @"RefreshExpAndMine"
- //通知-后台唤起-
- #define RemoteNotifications @"RemoteNotifications"
- //通知-粘贴板数据
- #define UpdateClipboard @"UpdateClipboard"
- //通知-打开粘贴板页面
- #define OpenTheClipboard @"OpenTheClipboard"
- //渐变色
- #define ColorGradientArray [NSArray arrayWithObjects:(id)UIColorFromRGB(0x094303).CGColor,(id)UIColorFromRGB(0x343d32).CGColor,(id)UIColorFromRGB(0xB2B7B7).CGColor, nil]
- //#define OCRAPPID @"TIDAXUV9"
- //#define LICENCE @"p78X6jCKNuDQkIOPNl8TNLbULoxMVDkf+gQM18uC0ZARhlA5Cjzk8SuUP+p43Vhr0aH+i/Jmxc8wzdnGdnlqiLCdRYTZYvR7oMol4AP534BxF9GMgqty0x4Hjf2d8usufYq6FT04EjMk9Mudcz0AGyBJGkgLCiKDZNNrCvXC9iGu6HjKkDlKWhcLFmMimw9NjpIBSVubmbZq9LI6yCTVVpJe934uUSpRX+4aGhH3x6M7Uv+aOz232qxVldLxSWeS+16IVVI+uoGILEgpTOLbdNGjtYxAI5X3GdyR9/ZXPHUKbSwNaJWj4svMDm+unKSvshPmZ9we28IzWx0ddxn22w=="
- #define OCRAPPID @"IDA24rmI"
- #define LICENCE @"p78X6jCKNuDQkIOPNl8TNLbULoxMVDkf+gQM18uC0ZARhlA5Cjzk8SuUP+p43Vhr0aH+i/Jmxc8wzdnGdnlqiLCdRYTZYvR7oMol4AP534BxF9GMgqty0x4Hjf2d8usufYq6FT04EjMk9Mudcz0AGyBJGkgLCiKDZNNrCvXC9iG2cYczbyncMrpud8GaWP/O2BhbWuWeoCpqhfOM16agoAHKepGWdhhkZTDOaVPKUMmbaQ8I2dFlk9IfOrmqc1UFO+mni7bJ90T8NjjyOPbcKYtJPFwVjyGzTse9klfXuHgNealpJfvXrTnS85BNZcxYxVh+U3H58Bel+LRnFIVUag=="
- //微信SDK头文件
- #import "WXApi.h"
- //支付宝支付头文件
- #import <AlipaySDK/AlipaySDK.h>
- //内购
- #import <StoreKit/StoreKit.h>
- //加载图片
- #import <SDWebImage/UIButton+WebCache.h>
- #import "UIImageView+WebCache.h"
- //OCR
- #import <WBOCRService/WBOCRService.h>
- #import <WBCloudReflectionFaceVerify/WBFaceVerifyCustomerService.h>
- #import "UIView+Extension.h"
- #import "GlobalData.h"
- #import "UIDevice+Hardware.h"
- #import "ZKControl.h"
- #import "ZKMethod.h"
- #import "Reachability.h"
- #import "NJKWebViewProgressView.h"
- #import "NJKWebViewProgress.h"
- #import "JYWKNewWebController.h"
- #import "ZKClipboardView.h"
- #import "ZKFaceVerifyMsgView.h"
- //#define kHost @"http://web-jydev-ws.jianyu360.cn/" //王山
- //#define kHost @"http://web-jydev-zyh.jianyu360.cn/" //张雨涵
- //#define kHost @"http://web-jydev-wcj.jianyu360.cn/" //王传近
- //#define kHost @"http://web-jydev-wky.jianyu360.cn/" //王凯悦
- //#define kHost @"http://web-jydev-zxl.jianyu360.cn/" //张鑫磊
- //#define kHost @"http://web-jydev-xzh.jianyu360.cn/" //徐志恒
- #define kHost @"https://app-jytest.jianyu360.cn/" //测试
- //#define kHost @"https://app-i2.jianyu360.com/" //新正式
- //#define kHost @"https://app207-jytest.jianyu360.cn/" //测试http
- /*
- 18613717801 123456
- */
- #define POST_JS @"function my_post(path, params) {\
- var method = \"POST\";\
- var form = document.createElement(\"form\");\
- form.setAttribute(\"method\", method);\
- form.setAttribute(\"action\", path);\
- for(var key in params){\
- if (params.hasOwnProperty(key)) {\
- var hiddenFild = document.createElement(\"input\");\
- hiddenFild.setAttribute(\"type\", \"hidden\");\
- hiddenFild.setAttribute(\"name\", key);\
- hiddenFild.setAttribute(\"value\", params[key]);\
- }\
- form.appendChild(hiddenFild);\
- }\
- document.body.appendChild(form);\
- form.submit();\
- }"
- #endif /* PrefixHeader_pch */
|