// // netHeader.h // tianyin // // Created by xTT on 15/6/6. // Copyright (c) 2015年 xTT. All rights reserved. // #ifndef tianyin_netHeader_h #define tianyin_netHeader_h typedef NS_ENUM(NSInteger, HTTP_CODE) { HTTP_SUCCESS = 0, HTTP_ERROR_400 = 400,//请求参数错误,错误详情见 msg 参数 HTTP_ERROR_401 = 401,//accesstoken参数无效 HTTP_ERROR_402 = 402,//用户密码已变更,需要重新登录校验身份 HTTP_ERROR_403 = 403,//业务所需参数校验失败(密码,验证码等无效) HTTP_ERROR_500 = 500,//处理异常,请稍后重试 HTTP_ERROR_600 = 600,//触发了平台未定义的业务行为 HTTP_ERROR_2000 = 2000,//账号数据不存在(使用该openid无法找到) HTTP_ERROR_2001 = 2001,//设备数据不存在(查找设备数据的参数无法找到对应数据) HTTP_ERROR_2002 = 2002,//厂商数据不存在(使用该vendor无法找到) HTTP_ERROR_2003 = 2003,//聊天群不存在(使用该groupid无法找到) HTTP_ERROR_4000 = 4000,//该设备已绑定于某一用于,不可再次被绑定(通常用于用户绑定设备验证) HTTP_ERROR_4001 = 4001,//该设备已在某一群组中,不能再加入其它群组(通常用于群组添加设备验证) HTTP_ERROR_4002 = 4002,//该设备不在此群组中,无法对其进行删除(通常用于对群组删除设备的验证) HTTP_ERROR_4004 = 4004,//该设备未与用户绑定,所以无法进入聊天群组(即设备进入群组的前提是该设备已绑定用户) HTTP_ERROR_4005 = 4005,//用户还没有使用此手机号注册应用 HTTP_ERROR_4006 = 4006,//用户不在该设备的联系人中 HTTP_ERROR_4007 = 4007,//该语音提醒已被删除,不在此设备中 HTTP_ERROR_4008 = 4008,//该免打扰设置已被删除,不在此设备中 HTTP_ERROR_4009 = 4009,//该照片未找到 HTTP_ERROR_4010 = 4010,//所创建的业务数据因业务场景原因数量已超限(sos号码,语音提醒,免打扰) HTTP_ERROR_5001 = 5001,//发送设备指令失败 HTTP_ERROR_5002 = 5002,//发送设备指令超时 }; #define HTTP_DEVICETOKEN__ @"getway/devicetoken/%@/related-account" //重置苹果设备token(删除) #define HTTP_VERSION @"getway/version" //上传版本信息 #define HTTP_ADS_CONFIG @"getway/accounts/ads/[openid]" // 更新广告配置 #define HTTP_GETSUPPLIER_CONFIG @"getway/devices/[imei]/configuration" // 根据imei获取供应商的配置 #define HTTP_DEVICES__ @"[vendor]/devices/[imei]" //设备信息 #define HTTP_DEVICES__OPERATION @"[vendor]/devices/[imei]/operation" //设备功能信息 #define HTTP_DEVICES__AUTHCODE @"[vendor]/devices/[imei]/authcode" //设备注册码 #define HTTP_ZUOYEBANG_SERVICE @"getway/zuoYeBang/customerServiceUrl" #define HTTP_DEVICES__SOS @"[vendor]/devices/[imei]/sos" //SOS号码 #define HTTP_DEVICES__INQUIRE @"getway/inquire/[imei]" //设备 查询话费或者流量 #define HTTP_DEVICES__CONTACT @"getway/devices/[imei]/contact" //通讯录 #define HTTP_DEVICES__MANYCONTACT @"getway/devices/[imei]/mancontact_class" //多人通讯录添加 #define HTTP_DEVICES__RAIL @"getway/devices/[imei]/rail" //安全区域 #define HTTP_FAMILY__CONTACT @"API/devices/family" // 亲情号码 #define HTTP_WHITE__CONTACT @"getway/devices/[imei]/whiteList" // 白名单 #define HTTP_HHTWHITE__CONTACT @"getway/devices/[imei]/hhtWhiteList" // 火火兔白名单 #define HTTP_CHATGROUPS__RELATECHATGROP @"getway/accounts/[openid]/related-chat-group" //圈信息 #define HTTP_CHATGROUPS__ @"getway/chatGroups/[groupid]" //圈信息 #define HTTP_CHATGROUPS__INVITETOKEN @"getway/chatGroups/[groupid]/inviteToken" //圈邀请码 #define HTTP_CHATGROUPS__MESSAGE @"getway/chatGroups/[groupid]/message" #define HTTP_SINGLEDELETE_MESSAGE @"getway/single/[imei]/message" /// 删除单聊信息 #define HTTP_REPORT__MESSAGE @"getway/accounts/[openid]/report" #define HTTP_POST_ACCOUNTS_LOGIN @"getway/accounts/login"//用户登录 #define HTTP_POST_ACCOUNTS_WXDATAUP @"getway/accounts/wx_login"// 微信授权上传信息 #define HTTP_POST_ACCOUNTS_LOGOUT @"getway/accounts/[openid]/logout"//用户主动退出登录 #define HTTP_POST_ACCOUNTS_UNREGISTER @"getway/accounts/[openid]/deleteAccount" //注销用户信息 #define HTTP_POST_ACCOUNTS @"getway/accounts"//用户登录 (QQ, 微信, imei号登录) #define HTTP_POST_REGISTER @"getway/accounts/register"//用户注册 #define HTTP_GET_SLIDESHOW @"getway/slideshow" //获取轮播图 #define HTTP_POST_PAGELIST @"http://120.77.209.176:8700/product_dial/dial/pageList" /// 表盘列表分页查询 #define HTTP_POST_MYPAGELIST @"http://120.77.209.176:8700/order_detail/detail/pageList" /// 我的表盘列表分类查询 #define HTTP_POST_PAYTYPE @"http://120.77.209.176:8700/order_detail/detail/payType" /// 获取支付方式 #define HTTP_POST_PAYORDERAPP @"http://120.77.209.176:8700/order-master/pay/order/app" #define HTTP_POST_DOWNDIAL @"API/downDial" /// 同步表盘 #define HTTP_POST_ACCOUNTSSIGN @"API/accounts/sign" /// 签到 #define HTTP_POST_GETHXID @"getway/accounts/[imei]/video" //注册环信用户ID账号 #define HTTP_DEVICES__VIDEO_USER_LIST @"getway/devices/[imei]/video_user_list" //获取设备加入视频通话的成员列表 //发起 挂断 上传通话时间 (查询通话配置/发起视频通话) #define HTTP_POST_VideoOperation @"getway/accounts/[imei]/video" #define HTTP_POST_ACCOUNTS_APPLY_BIND_PHONE @"getway/accounts/[openid]/apply_bind_phone"// 微信用户绑定 手机号 //手机账号 绑定微信账号 和 解绑微信账号 #define HTTP_ACCOUNTS_BIND_AND_UNBIND_WX @"getway/accounts/[openid]" #define HTTP_ACCOUNTS_INFO @"getway/accounts/[openid]" #define HTTP_ACCOUNTS_GZH_SWITCH @"getway/accounts/[openid]/vipcn" #define HTTP_ACCOUNTS__RELATEDDEVICE @"getway/accounts/[openid]/related-device"//绑定设备(删除) ,获取用户关联设备 #define HTTP_ACCOUNTS__AFTER @"getway/accounts/[openid]/after" //扫码查询设备是否存在管理员,如果存在则得到管理员的 openid 和 phone #define HTTP_ACCOUNTS__APPLY_BIND @"getway/accounts/[openid]/apply_bind" //发送关注申请的接口 需要管理员的 openid 和 phone #define HTTP_ACCOUNTS__UNREAD_MSG @"getway/accounts/[openid]/notificationCount" #define HTTP_POST_NEWCIRCLE_ @"getway/chat-groups"//新建聊天群 /// 上传健jk信息/获取jk码信息 #define HTTP_POST_IOSCODE @"/getway/devices/iosQrcode/[imei]" #define HTTP_DEVICES__VOICEALARM @"[vendor]/devices/[imei]/voiceAlarm" //语音提醒 #define HTTP_DEVICES__DISTURBBAN @"[vendor]/devices/[imei]/disturbBan" //免打扰 #define HTTP_DEVICES__LOCATION_LAST @"[vendor]/devices/[imei]/location/last" //当前定位信息 #define HTTP_DEVICES__LOCATION @"[vendor]/devices/[imei]/location"//定位点数据 #define HTTP_DEVICES__LOCATION_DAILY @"[vendor]/devices/[imei]/location/daily" //历史记录 //计步 #define HTTP_DEVICES_STEPRANKING @"[vendor]/devices/[imei]/step/ranking" //计步排行榜 #define HTTP_DEVICES_STEP @"[vendor]/devices/[imei]/step/daily" //计步 查询和 设置目标步数 //心率/体温 #define HTTP_DEVICES_HeartAndTemp @"getway/heart_temperature/[imei]" //定时开关机 TimingSwitch #define HTTP_DEVICES_TimingSwitch @"getway/timing_switch/[imei]" //gps开关 #define HTTP_DEVICES_GpsSwitch @"getway/gps_switch/[imei]" //设备WIFI设置 #define HTTP_DEVICES_WIFI @"getway/devices/[imei]/wifi" #define HTTP_DEVICES_WIFI_LIST @"20000/devices/[imei]/wifiList" //学生资料 #define HTTP_STUDENT_INFO @"20000/devices/[imei]/studentInfo" #define HTTP_DEVICES_SCHEDULE @"20000/devices/[imei]/schedule" //常见问题 #define HTTP_GET_CQ_AND_HOTQ @"getway/categorys_and_titles"//获取问题类别和热门问题 #define HTTP_GET_ALL_CQ @"getway/titles/[categoryid]"//获取某个问题类别中的所有问题 ////////////////////////// ///获取用户所有单聊和群聊信息 #define HTTP_GET_CHATGROUPSMESSAGE @"getway/chatGroups/message" /// 获取未读消息 #define HTTP_GET_NotificationCount @"getway/accounts/[openid]/notificationCount" /// 获取短信列表/删除短信 #define HTTP_GET_DEVICESSMS @"getway/devices/[imei]/sms" /// 位置纠偏 #define HTTP_POST_LocationRectify @"getway/devices/[imei]/locationRectify" //MQTT #define kMQTT_ServerHost @"mqf-fzg6mhr94w.mqtt.aliyuncs.com" #define kMQTT_ServerPort 1883 #define kMQTT_UserName @"telling"; #define kMQTT_Password @"swkky"; #define xMQTT_Topic @"topic" #define xAPNS_talk @"talk" #define xAPNS_talk_status @"talk_status" #define xAPNS_watch_locate @"watch_locate" #define xAPNS_user_locate @"user_locate" #define xAPNS_request_user_locate @"request_user_locate" #define xAPNS_group_user_enter @"group_user_enter" #define xAPNS_group_user_leave @"group_user_leave" #define xAPNS_group_watch_enter @"group_watch_enter" #define xAPNS_group_watch_leave @"group_watch_leave" #define xAPNS_service @"service" #define xANPSType_talk_audio @"talk_audio" #define xANPSType_talk_image @"talk_image" #define xANPSType_talk_text @"talk_text" //#define xANPSType_talk_audio @"talk_audio" //文件目录 #define xDirBabyHead @"babyhead" #define xDirUserHead @"userhead" #define xDirVoice @"voice" #define xDirStroy @"story" //#define xDirCare @"care" //#define xDBName @"zjwb.db" #define xExtAMR @"amr" #define xExtWAV @"wav" #define xExtM4A @"m4a" #define mob_key @"932faa836670" #define sina_key @"1728795983" #define sina_secret @"65ea6057876025c3992b3e1b2ede76f9" #define sina_redirectUri @"https://www.baidu.com/" #define QQ_key @"1104720197" #define QQ_secret @"vt3IsdifS6wIGlpU" #define QQ_redirectUri @"" #define WX_key @"wx7033bf753c230fcb" #define WX_secret @"d03570db6f5c7ba9ad0e69543723bfa8" #define WX_redirectUri @"" #endif