| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- //
- // Header.h
- // Haishenghai-master
- //
- // Created by GG on 2018/12/29.
- // Copyright © 2018年 Haishenghai intelligence network technology. All rights reserved.
- //
- #ifndef Header_h
- #define Header_h
- #ifdef DEBUG
- //Debug状态下的测试API
- //#define BASE_URL @"http://47.110.138.172/hsh_app/"
- //#define PICBASE_URL @"http://fubangyun.com:4445/"
- //#define BASE_URL @"http://172.16.15.252:1551/"
- //#define PICBASE_URL @"http://172.16.15.252:1029/"
- #else
- //Release状态下的线上API
- //#define BASE_URL @"https://www.hsh-iot.com/test/hsh_app"
- //#define PICBASE_URL @"http://fubangyun.com:4445/"
- //#define BASE_URL @"http://172.16.15.252:1551/"
- //#define PICBASE_URL @"http://172.16.15.252:1029/"
- #endif
- /* define */
- #define ALERTSHOW(errorMessage) UIAlertController *_controller =[UIAlertController alertControllerWithTitle:@"温馨提示" message:errorMessage preferredStyle:UIAlertControllerStyleAlert];[_controller addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:nil]];[self presentViewController:_controller animated:YES completion:nil];
- //登录用的
- //rgb颜色转换
- #define SXUIColorFromRGB(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 WIDTH [UIScreen mainScreen].bounds.size.width
- #define HEIGHT [UIScreen mainScreen].bounds.size.height
- //状态栏高度
- #define kStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
- #define kNavBarHeight 44.0
- #define kTabBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:49)
- #define kTopHeight (kStatusBarHeight + kNavBarHeight)
- #define IS_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)/* header file */
- #import "MBProgressHUD.h"
- #import "NSMutableDictionary+NullSaf.h"
- #import <Masonry.h>
- #import <AFHTTPSessionManager.h>
- #import "AppDelegate.h"
- #import "ViewController.h"
- #import "UserLogin_VC.h"
- #import "UserRegister_VC.h"
- #import "ResetPassword_VC.h"
- #import "Addplace_VC.h"
- #import "AddDevece_VC.h"
- #import "popViewController.h"
- #import "CollectionViewCell.h"
- #import "DeveceList_VC.h"
- #import "Message_VC.h"
- #import "Person_VC.h"
- #import "ScanViewController.h"
- #import "DeveceDetail_VC.h"
- #import "PlaceList_VC.h"
- #import "ManageDeveceList_VC.h"
- #import "DetailTableViewCell.h"
- #import "FireAlarm_VC.h"
- #import "PushManage_VC.h"
- #import "ProblemViewController.h"
- #import "Service_VC.h"
- #import "DetailDeveceList_VC.h"
- #import "Contacts_VC.h"
- #import "Recorddetail_VC.h"
- #import "FireManage_VC.h"
- #import "SubmitInformation_VC.h"
- #import "CommitMessage_VC.h"
- #import "PlaceDetail_VC.h"
- #import "popMenuView.h"
- #import <MJRefresh.h>
- #import "DataSourceManager.h"
- #import <AMapFoundationKit/AMapFoundationKit.h>
- #import <MAMapKit/MAMapKit.h>
- #import <AMapSearchKit/AMapSearchKit.h>
- #import <AMapLocationKit/AMapLocationKit.h>
- #import <FLAnimatedImageView+WebCache.h>
- #import "About_VC.h"
- #import "Setting_VC.h"
- #import "detatilDeviceModel.h"
- #import "Protcol_VC.h"
- #import "privacy_VC.h"
- #import <Availability.h>
- #import "NSString+Category.h"
- #import "NSString+Path.h"
- #import "LanguageManager.h"
- #import "LoginShowControl.h"
- #import "CommonControl.h"
- #import "NSUserDefaultData.h"
- #import "MessageUI.h"
- #import "DeviceControl.h"
- // 开放平台App信息,需要在开放平台上面创建APP来生成,每一个APP对应一组不同并且唯一的平台信息,不能重复
- #define UUID "646bd6f4c60c4f2d940f103a585eddf7" //客户唯一标识
- #define APPKEY "44fed9d2cd9f4c82892e32dacdfd1940" //APP唯一标识
- #define APPSECRET "b1663cac01a94248b3e4e1cf7a7b4b86" //内容保护参数
- #define MOVECARD 3 //内容保护参数
- //#define UUID "79279113d6fc4bfcbd7a4a81705b1e53"
- //#define APPKEY "56f0aaa189054b4aa74ff64f35f5b957"
- //#define APPSECRET "03a83c7b448f4aedb978948bd3faa826"
- //#define MOVECARD 2 //4
- #define SZSTR(x) [x UTF8String]
- #define NSSTR(x) [NSString ToNSStr:x]
- #define STRNCPY(x,y) strncpy(x, y, sizeof(x))
- #ifdef __OBJC__
- #import <UIKit/UIKit.h>
- #import <Foundation/Foundation.h>
- #endif
- // 获取 系统的版本 号
- #define iOS_Version [UIDevice currentDevice].systemVersion.floatValue
- #define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
- // 导航栏颜色
- #define GlobalMainColor [UIColor colorWithRed:239/255.0 green:125/255.0 blue:56/255.0 alpha:1] //主色 亮红
- #define btnTextColor [UIColor colorWithRed:80/255.0 green:80/255.0 blue:80/255.0 alpha:1]
- #define btnBorderColor [UIColor colorWithRed:220/255.0 green:220/255.0 blue:220/255.0 alpha:1]
- #define NormalFontColor [UIColor blackColor] //通用字体色
- // 屏幕的宽度 和 高度
- #define ScreenWidth [[UIScreen mainScreen] bounds].size.width
- #define ScreenHeight ([[UIScreen mainScreen] bounds].size.height+20-APP_STATUSBAR_HEIGHT)
- #define APP_STATUSBAR_HEIGHT (CGRectGetHeight([UIApplication sharedApplication].statusBarFrame))
- #define NavAndStatusHight self.navigationController.navigationBar.frame.size.height+APP_STATUSBAR_HEIGHT
- #define realPlayViewHeight (ScreenHeight > 480 ? ScreenWidth * 0.8 : ScreenWidth * 0.8)
- #define DeviceVersion [[CommonControl getInstance] getDeviceString]
- #define NavHeight ((DeviceVersion == 10) ? 88 :64)
- #define Handle [self MsgHandle]
- #define SELF [self MsgHandle]
- #define OS_IOS 1
- //
- #import "SVProgressHUD.h"
- //
- #import "AppDelegate.h"
- //日期格式
- #define DateFormatter @"yyyy-MM-dd"
- //时间格式
- #define TimeFormatter @"yyyy-MM-dd HH:mm:ss"
- //时间格式
- #define TimeFormatter2 @"HH:mm:ss"
- //通知消息key
- #define MasterAccount @"MasterAccount"
- #define PushNotification @"PushNotification"
- #pragma mark - 设备类型定义
- NS_ENUM(NSInteger,XM_DEV_TYPE)
- {
- XM_DEV_DEV = 0,
- XM_DEV_SOCKET = 1, // 插座
- XM_DEV_BULB = 2, // 情景灯泡
- XM_DEV_BULB_SOCKET = 3, // 灯座
- XM_DEV_CAR = 4, // 汽车伴侣
- XM_DEV_BEYE = 5, // 大眼睛
- XM_DEV_SEYE = 6, // 小眼睛(小雨点)
- XM_DEV_ROBOT = 7, // 雄迈摇头机
- XM_DEV_SPORT_CAMERA = 8, // 运动摄像机
- XM_DEV_FEYE = 9, // 鱼眼小雨点(小雨点全景摄像机)
- XM_DEV_FISH_BULB = 10, // 鱼眼灯泡(智能全景摄像灯泡)
- XM_DEV_BOB = 11, // 小黄人
- XM_DEV_MUSIC_BOX = 12, // wifi音乐盒
- XM_DEV_SPEAKER = 13, // wifi音响
- XM_DEV_INTELLIGENT_CENTER = 14, // 智联中心
- XM_DEV_STRIP = 16, // 插排
- XM_DEV_DOORLOCK = 17, // 门磁
- XM_DEV_CENTER_COPY = 19, // 智能中心
- XM_DEV_UFO = 20, //飞碟
- XM_DEV_DOORBELL = 21, // 智能门铃
-
- XM_DEV_BULLET = 22, //E型枪机--XMJP_bullet_xxxx
- XM_DEV_DRUM = 23, //架子鼓--xmjp_drum_xxxx
- XM_DEV_GUNLOCK_510 = 24, // 雄迈枪机510
- XM_DEV_FEEDER = 25, //喂食器设备--feeder_xxxx
- XM_DEV_CAT = 26, // 猫眼
-
- XM_DEV_NSEYE = 601, //直播小雨点
-
- XM_DEV_INTELLIGENT_LOCK= 286326823, // 门铃锁
- XM_DEV_DOORLOCK_V2 = 0x11110031, // 门锁支持对讲 智联大迈
- XM_DEV_DOORBELL_A = 285409282, // 门铃
- XM_DEV_SMALL_V = 0x11110032, // 小V
- CZ_DOORBELL = 286457857, // 创泽门铃
- };
- #endif /* Header_h */
|