854 lines
26 KiB
Objective-C
854 lines
26 KiB
Objective-C
//
|
||
// AFHttpTool.h
|
||
// Ifish
|
||
//
|
||
// Created by imac on 15/12/24.
|
||
// Copyright © 2015年 imac. All rights reserved.
|
||
//
|
||
//仅登陆 注册 验证码 接口使用 直接使用 全地址
|
||
//若按服务器ip 请求可参考 Netmanager 类中登陆注册方法(仅限登陆注册)
|
||
//
|
||
|
||
//此类v3.2起 只用于验证码 登陆注册 和2016 10 27 后新增接口 因为请求头中 加了安全验证
|
||
|
||
|
||
#import <Foundation/Foundation.h>
|
||
|
||
#define IFISHERROCODE @"100"
|
||
|
||
#define IFFISHFAIL @"101"
|
||
|
||
#define IFISHDEVICE_REMOVE @"207"
|
||
|
||
#define IFISHCAMERA_REMOVE @"210"
|
||
//上传图片太大
|
||
|
||
#define IFISH_UPLOADPICBIGEER @"206"
|
||
|
||
//用户ID 不能存在
|
||
#define IFISH_USERIDNONE @"207"
|
||
//安全校验失败
|
||
#define IFISH_SAFEERRPR @"400"
|
||
//参数校验失败
|
||
#define IFISH_ParamERRPR @"401"
|
||
|
||
typedef NS_ENUM(NSInteger, RequestMethodType){
|
||
RequestMethodTypePost = 1,
|
||
RequestMethodTypeGet = 2
|
||
};
|
||
|
||
typedef NS_ENUM(NSInteger, IfishAdType){
|
||
IfishAdTypeShouYE = 1,
|
||
IfishAdTypeZiXun = 2,
|
||
IfishAdTypeYouXuanShop = 3,
|
||
IfishAdTypeQianDao = 4,
|
||
IfishAdTypeKankan = 5,
|
||
IfishAdTypeYuYiSheng =6,
|
||
IfishAdTypeLoadAD =7
|
||
};
|
||
|
||
typedef NS_ENUM(NSInteger, IfishGoodsListType){
|
||
IfishGoodsTypeShouYE = 1,
|
||
IfishGoodsTypeYuYinSheng = 2,
|
||
IfishGoodsTypeAiYuYanXuan = 3,
|
||
IfishGoodsTypeJinHuoGuanLi = 4
|
||
};
|
||
@interface AFHttpTool : NSObject
|
||
/**
|
||
* 发送一个请求
|
||
*
|
||
* @param methodType 请求方法
|
||
* @param url 请求路径
|
||
* @param params 请求参数
|
||
* @param success 请求成功后的回调(请将请求成功后想做的事情写到这个block中)
|
||
* @param failure 请求失败后的回调(请将请求失败后想做的事情写到这个block中)
|
||
* @param token "userId+timestamp+”ifish8”经MD5加密后生成的口令
|
||
*/
|
||
+(void)requestWihtMethod:(RequestMethodType)methodType
|
||
url : (NSString *)url
|
||
params:(NSDictionary *)params
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError *err))failure;
|
||
|
||
/**
|
||
* 获取验证码 getSecurityCode
|
||
*
|
||
* @param phoneNumber phoneNumber
|
||
* @param sendType sendType
|
||
* @param success success
|
||
* @param failure failure
|
||
*/
|
||
+(void)getSecurityCodeWithPhoneNumber:(NSString*)phoneNumber
|
||
sendType:(NSString*)sendType
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 注册
|
||
*
|
||
* @param phoneNumber phoneNumber
|
||
* @param userPassword userPassword
|
||
* @param phoneType 手机类型IOS
|
||
* @param address 注册所在地
|
||
* @param success success
|
||
* @param failure failure
|
||
*/
|
||
+(void)addUserWithPhoneNumber:(NSString*)phoneNumber
|
||
password:(NSString*)userPassword
|
||
phoneType:(NSString*)phoneType
|
||
address:(NSString*)address
|
||
longitude:(double)longitude
|
||
latitude:(double)latitude
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 用户登录 userLogin
|
||
*
|
||
* @param phoneNumber phoneNumber description
|
||
* @param userPassword userPassword description
|
||
* @param phoneType phoneType description
|
||
* @param success success description
|
||
* @param failure failure description
|
||
*/
|
||
+(void)userLogInWithPhoneNumber:(NSString*)phoneNumber
|
||
password:(NSString*)userPassword
|
||
phoneType:(NSString *)phoneType
|
||
address:(NSString*)address
|
||
longitude:(double)longitude
|
||
latitude:(double)latitude
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure expara:(NSDictionary*)dic;
|
||
/*
|
||
*获取更多用户数据 get 请求
|
||
*/
|
||
+(void)getMoreUserDataWith:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/*
|
||
用户用户信息修改 updateUser
|
||
*/
|
||
+(void)updateUserWithUserId:(NSNumber*)userId
|
||
nickName:(NSString*)nickName
|
||
phoneNumber:(NSString*)phoneNumber
|
||
userSex:(NSString*)userSex
|
||
userImg:(NSString*)userImg
|
||
signature:(NSString*)signature
|
||
timestamp:(NSNumber*)timestamp
|
||
token:(NSString*)token
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/*
|
||
头像上传 uploadFile
|
||
fileUpload :上传头像类型GIF,PNG,BMP,JPG,JPEG
|
||
*/
|
||
+(void)uploadUserImgWithUserId:(NSNumber*)userId
|
||
fileUpload:(NSString*)fileUpload
|
||
token:(NSString*)token
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/*
|
||
* 密码修改 updatePwd
|
||
*/
|
||
+(void)updatePwdWithUserId:(NSNumber*)userId
|
||
oldPassword:(NSString*)oldPassword
|
||
newPassword:(NSString*)userPassword
|
||
timestamp:(NSNumber*)timestamp
|
||
token:(NSString*)token
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/*
|
||
忘记密码 resetPassword
|
||
userPassword :是新密码
|
||
*/
|
||
+(void)resetPasswordWithUserId:(NSString*)phoneNumber
|
||
userPassword:(NSString*)userPassword
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
|
||
/*
|
||
* 获取用户设备信息 getDeviceInf
|
||
*/
|
||
+(void)getDeviceInfoWithUserId:(NSNumber*)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/*
|
||
* 设备信息修改 updateDevice
|
||
*/
|
||
+(void)updateDeviceWithPriIdDeviceId:(NSString*)deviceId
|
||
priIdUserId:(NSString*)userId
|
||
showName:(NSString*)showName
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/*
|
||
* 通过手机分享设备 shareDevice
|
||
*/
|
||
+(void)shareDeviceWithPhoneNumber:(NSString*)phoneNumber
|
||
deviceId:(NSString*)deviceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/*
|
||
* 扫一扫分享设备 shareDeviceByQrCode
|
||
*/
|
||
+(void)shareDeviceByQrCodeWithUserId:(NSNumber*)userId
|
||
deviceId:(NSString*)deviceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/*
|
||
* 解除分享的设备 deleteShareDevice
|
||
*/
|
||
+(void)deleteShareDeviceWithUserId:(NSNumber*)userId
|
||
deviceId:(NSString*)deviceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/*
|
||
* 删除绑定的设备 deleteDeviceUser
|
||
*/
|
||
+(void)deleteDeviceUserWithPriIdDeviceId:(NSString*)deviceId
|
||
priIdUserId:(NSNumber*)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/*
|
||
* 版本检测 getNewestVersion
|
||
*/
|
||
+(void)getNewestVersionWithPhoneType:(NSString*)ios
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/*
|
||
* 问题反馈 questionsFeedback
|
||
*/
|
||
+(void)questionsFeedbackWithUserId:(NSNumber*)uerId
|
||
questionContent:(NSString*)questionContent
|
||
timestamp:(NSNumber*)timestamp
|
||
token:(NSString*)token
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/*
|
||
* 更多厂家 venderListInf
|
||
* firstResult :开始条数
|
||
* pageSize: 每页大小
|
||
*/
|
||
+(void)getVerderListInfWithFirstResult:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/*
|
||
* 更多商家 merchantListInf
|
||
* firstResult :开始条数
|
||
* pageSize: 每页大小
|
||
*/
|
||
+(void)getMerchantListInfWithFirstResult:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/*
|
||
* 设置默认店铺 defaultShop
|
||
*/
|
||
+(void)setDefaultShopWithUserId:(NSNumber*)userId
|
||
merchantId:(NSString*)merchantId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/*
|
||
* 扫描二维码纪录激活量 sweepQRCode
|
||
*/
|
||
+(void)sweepQRCCodeWithActivateIdUserId:(NSNumber*)activateIdUserId
|
||
activateIdRecodeId:(NSString*)activateIdRecodeId
|
||
activeIdProvinceId:(NSString*)activeIdProvinceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/*
|
||
* 重新生成融云token getToken
|
||
*/
|
||
+(void)getTokenWithUserId:(NSNumber*)UserId
|
||
imgPath:(NSString*)imgPath
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 保存自定义图标
|
||
*/
|
||
+(void)saveCustomIconWith:(NSNumber*)UserId
|
||
deviceId:(NSString*)deviceId
|
||
customIconName:(NSString*)customIconName
|
||
customShowName:(NSString*)customShowName
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 设置换水提醒
|
||
*/
|
||
+(void)setRemindWaterInfWith:(NSString*)deviceId
|
||
waterRemind:(NSString*)waterRemind
|
||
remindCycle:(NSString*)remindCycle
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 获取换水提醒信息
|
||
*/
|
||
|
||
+(void)getRemindWaterInfwith:(NSString*)deviceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 绑定摄像头
|
||
*/
|
||
|
||
+(void)bindCameraWith:(NSString *)cameraId
|
||
userId:(NSNumber *)userId
|
||
success:(void (^)(id response))success
|
||
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 设备关联摄像头
|
||
*/
|
||
|
||
+(void)deviceBindCameraWith:(NSString *)cameraId
|
||
userId:(NSNumber *)userId
|
||
deviceId:(NSString *)deviceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 删除绑定的摄像头
|
||
*/
|
||
|
||
+(void)deleteCameraUserWith:(NSString *)cameraId
|
||
deiviceId:(NSString *)deiviceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 删除设备和摄像头关系
|
||
*/
|
||
|
||
+(void)deleteDeviceCameraWith:(NSString *)cameraId
|
||
deiviceId:(NSString *)deiviceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 扫码激活摄像头
|
||
*/
|
||
|
||
|
||
+(void)scanCodeActiveCamea:(NSString *)cameraId
|
||
deiviceId:(NSString *)deiviceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
|
||
/**
|
||
* 新增商户信息 或 审核失败修改商户 v3
|
||
*/
|
||
|
||
|
||
+(void)saveShopsInfo:(NSDictionary *)paras
|
||
formatImgArr:(NSArray *)multipartFile
|
||
requsetUrl:(NSString *)url
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 审核成功修改商户 v3
|
||
*/
|
||
+(void)updateBaseShopsInfo:(NSDictionary *)paras
|
||
formatImg:(UIImage *)formatImg
|
||
requsetUrl:(NSString *)url
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
|
||
/**
|
||
* 审核状态查询
|
||
*/
|
||
|
||
|
||
+(void)getShopsStatus:(NSString *)shopsId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 选择看护商家
|
||
*/
|
||
|
||
+(void)xuanZeKanHuShangJia:(NSString *)shopsPhone
|
||
yongHuId:(NSNumber *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 看护开关
|
||
*/
|
||
|
||
+(void)kanHuKaiGuanWith:(NSString *)cameraId
|
||
userId:(NSString *)userId
|
||
status:(NSString *)status
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 看护列表
|
||
*/
|
||
|
||
+(void)getKanHuListWithShopsId:(NSString *)shopsUserId
|
||
firstResult:(NSString *)firstResult
|
||
pageSize:(NSString *)pageSize
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 发送看护报告
|
||
*/
|
||
|
||
+(void)sendReportWithUserId:(NSString * )userId
|
||
baoGaoHtmlName:(NSString *)fileName
|
||
reportId:(NSString *)reportId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 查询看护报告详情
|
||
*/
|
||
|
||
+(void)getLookReportById:(NSString *)reportId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 新增直播间
|
||
*/
|
||
|
||
+(void)addLiveRoombyUserId:(NSString*)userId
|
||
cameraId:(NSString*)cameraId
|
||
isLive:(NSString*)isLive
|
||
roomName:(NSString*)roomName
|
||
roomDec:(NSString*)roomDec
|
||
upLoadFile:(UIImage*)upLoadImg
|
||
name:(NSString*)name
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 获取直播间信息
|
||
*/
|
||
|
||
+(void)getLiewRoomInfo:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 修改直播间
|
||
*/
|
||
|
||
+(void)updateLiveRoomCameraId:(NSString *)cameraId
|
||
userId:(NSString *)userId
|
||
roomId:(NSString *)roomId
|
||
isLive:(NSString *)isLive
|
||
roomName:(NSString *)roomName
|
||
roomDesc:(NSString *)roomDesc
|
||
upLoadFile:(UIImage*)upLoadImg
|
||
name:(NSString*)name
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 直播间 人气加1
|
||
*/
|
||
|
||
+(void)popularityValueRoomId:(NSString *)roomId
|
||
userId:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
|
||
/**
|
||
* 直播间 获取直播列表 综合数据列表 获取综合数据(5条距离用户最近的+5条用户最近浏览的+5条人气值最高的)传userId,
|
||
*/
|
||
|
||
//+(void)getLiveRoomsuserId:(NSString*)userId
|
||
// success:(void (^)(id response))success
|
||
// failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 直播间 获取直播列表 分页列表 compreRoomId 获取综合数的所有roomId 和 “,”组成的字符串
|
||
*/
|
||
|
||
+(void)getLiveRoomsfirstResult:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
userId:(NSString *)userId
|
||
orders:(NSString *)orders
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 直播banner图
|
||
*/
|
||
|
||
+(void)getLiveBannerSuccess:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* getGwellCodes
|
||
*/
|
||
+(void)getGwellCodes:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 获取商家列表
|
||
*/
|
||
+(void)getShopsinfo:(NSString *)userId
|
||
firstResult:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 选择看护商家(新)
|
||
*/
|
||
|
||
+(void)newChoiceShops:(NSString *)shopsUserId
|
||
userId:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 删除看护关系
|
||
*/
|
||
|
||
+(void)removeLookUserId:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 鱼医生提问
|
||
*/
|
||
+(void)fishDoctorQuestion:(NSString *)userId
|
||
questionContent:(NSString *)questionContent
|
||
payTourSum:(NSString *)payTourSum
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 十四、 提交直播间留言
|
||
*/
|
||
|
||
+(void)IfishCommitLeaveMessage:(NSString *)userId
|
||
roomId:(NSString *)roomId
|
||
asUserId:(NSString *)asUserId
|
||
messageContent:(NSString *)messageContent
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 十五、 直播间留言分页数据
|
||
*/
|
||
+(void)ifishGetLiveMeassage:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
roomId:(NSInteger)roomId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 获取规则等级信息 (GET请求)
|
||
*/
|
||
|
||
+(void)getLevelRuleInfo:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 新增加经验
|
||
*/
|
||
+(void)addLevelValueWith:(NSString *)userId
|
||
ruleType:(NSString *)ruleType
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 分页经验值获取记录
|
||
*/
|
||
+(void)gradeRecorde:(NSString *)userId
|
||
firstResult:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 新增金币
|
||
*/
|
||
+(void)addGoldValue:(NSString *)userId
|
||
ruleType:(NSString *)ruleType
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 金币获取记录
|
||
*/
|
||
+(void)goldValueRecord:(NSString *)userId
|
||
firstResult:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 金币消耗记录
|
||
*/
|
||
|
||
+(void)goldExpendRecord:(NSString *)userId
|
||
firstResult:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 获取金币规则信息
|
||
*/
|
||
+(void)getgGoldRuleInfo:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 三十 签到 (post请求)
|
||
*/
|
||
+(void)ifishSignIn:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 三十一 砸金蛋 (post请求)
|
||
*/
|
||
+(void)ifishHitGoldenEgg:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 获取广告信息 get 请求
|
||
*/
|
||
|
||
+(void)getIfishBannerData:(IfishAdType)type
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 分页资讯信息 get 请求
|
||
*/
|
||
+(void)ifishGetInformations:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
userId:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 增加点击数 post 请求
|
||
*/
|
||
+(void)ifishAdditionClickNum:(int)infoId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 分页直播间信息 get 请求
|
||
*/
|
||
+(void)ifishGetliveRooms:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
userId:(NSString *)userId
|
||
orderType:(NSString *)orderType
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 扫一扫绑定水族箱(分享设备)此新接口 老接口无请求头数据
|
||
*/
|
||
+(void)shareDeviceWhth:(NSString *)userId
|
||
deviceId:(NSString *)deviceId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/*
|
||
* 绑定设备 bindDevice
|
||
*/
|
||
+(void)bindDeviceWithUserId:(NSString*)userId
|
||
macAddress:(NSString*)macAddress
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 获取商品信息(分类型)1 首页商品 2 鱼医生页
|
||
*/
|
||
+(void)getIfishGoodsListWith:(IfishGoodsListType)type
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 扫一扫成为商家会员
|
||
*/
|
||
+(void)becomeShopUserWith:(NSString *)userId
|
||
shopId:(NSString *)shopId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 分页获取商家会员信息列表
|
||
*/
|
||
+(void)getPageShopsUserInfo:(NSInteger)firstResult
|
||
pageSize:(NSInteger)pageSize
|
||
userId:(NSString *)userId
|
||
shopsId:(NSString *)shopsId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 获取商家会员信息
|
||
*/
|
||
+(void)getShopsUserInfo:(NSString *)userId
|
||
shopId:(NSString *)shopId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
|
||
/**
|
||
* 更新商家会员信息
|
||
* memberLevel 会员等级(1-3)
|
||
* userName 备注名称(10)
|
||
* phoneNumber 手机号码(11)
|
||
* province 省(30)
|
||
* city 市(30)
|
||
* area 区(30)
|
||
* address 地址(100)
|
||
* remark 备注(50)
|
||
*/
|
||
+(void)updateShopsUserInfo:(NSString *)userId
|
||
shopId:(NSString *)shopId
|
||
memberLevel:(NSString *)memberLevel
|
||
userName:(NSString *)userName
|
||
phoneNumber:(NSString *)phoneNumber
|
||
province:(NSString *)province
|
||
city:(NSString *)city
|
||
area:(NSString *)area
|
||
address:(NSString *)address
|
||
remark:(NSString *)remark
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 直播间点赞
|
||
*/
|
||
+(void)liveDianZanRoomId:(NSString *)roomId
|
||
userId:(NSString *)userId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 直播间打赏
|
||
* payUserId 打赏用户ID
|
||
* payeeUserId 被打赏用户ID
|
||
*/
|
||
+(void)liveRoomDaShang:(NSString *)payUserId
|
||
payeeUserId:(NSString *)payeeUserId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 获取有效优惠券 get
|
||
*/
|
||
+(void)getValidatingCouponsSuccess:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 分页查询用户兑换记录
|
||
*/
|
||
+(void)couponRecords:(NSString *)userId
|
||
pageSize:(NSInteger)pageSize
|
||
firstResult:(NSInteger)firstResult
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 兑换优惠券
|
||
*/
|
||
+(void)exchangeCoupon:(NSString *)userId
|
||
couponId:(NSString *)couponId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 分页用户动态
|
||
*/
|
||
+(void)getUserActivity:(NSString *)userId
|
||
pageSize:(NSInteger)pageSize
|
||
firstResult:(NSInteger)firstResult
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 分页店铺商品
|
||
*/
|
||
+(void)getCommodityInfoByPage:(NSString *)shopId
|
||
pageSize:(NSInteger)pageSize
|
||
firstResult:(NSInteger)firstResult
|
||
commodityState:(NSString *)commodityState
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 新增商品
|
||
*/
|
||
|
||
+(void)createCommodity:(NSString *)shopId
|
||
userId:(NSString *)userId
|
||
commodityName:(NSString *)commodityName
|
||
imgpath:(NSString *)imgpath
|
||
mediapath:(NSString *)videopath
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
/**
|
||
* 修改商品 暂时只修改商品名 视频不做处理
|
||
*/
|
||
|
||
+(void)updateCommodity:(NSString *)shopId
|
||
userId:(NSString *)userId
|
||
commodityName:(NSString *)commodityName
|
||
commodityId:(NSString *)commodityId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 增加商品店点击数
|
||
*/
|
||
+(void)updateCommodityClickCount:(NSString *)commodityId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 删除商品
|
||
*/
|
||
|
||
+(void)deleteCommodityById:(NSString *)shopId
|
||
success:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
/**
|
||
* 获取用户动态总数
|
||
*/
|
||
+(void)getIFishUserActivityMaxCountSuccess:(void (^)(id response))success
|
||
failure:(void (^)(NSError* err))failure;
|
||
|
||
@end
|
||
|