Commit e2edef2f by pierce

删除没用的网络请求和URL宏定义

parent f89dccdf
Showing with 5 additions and 798 deletions
......@@ -598,7 +598,6 @@ static dispatch_queue_t get_status_queue() {
[[NSUserDefaults standardUserDefaults] setObject:@(NO) forKey:kFUSConfigAppzfStatusUDKey];
[[NSUserDefaults standardUserDefaults] setObject:@(0) forKey:TABBAR_ITEM_SOUND];
[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:SHOULD_REMOTE_NOTIFICATION_TIP];
[[NSUserDefaults standardUserDefaults] setObject:URL_WEB_BAOFANG_ACTIVE_URL forKey:UDKEY_BAOFANG_ACTIVE_PAGE_WEB_URL];
[[NSUserDefaults standardUserDefaults] setObject:@([NSDate date].timeIntervalSince1970) forKey:FirstLaunchTimeUDKey];
}
......
......@@ -62,22 +62,7 @@ typedef enum : NSUInteger {
NSInteger totalLikes,
NSArray *recommands))success
failure:(void (^)(NSString *msg,
int code))failure ;
/**
* 首页获取附近的包房
*
* @param page 页数
* @param pageSize每页大小
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_requestNearbyBaoFangWithPage:(NSInteger)page
pageSize:(NSInteger)pageSize
sex:(NSInteger)sex
withDataKey:(NSString *)dataKey
success:(void (^)(NSArray *likeBaoFangModelArray, NSInteger code,NSInteger pageSize, NSString *newDataKey))success
failure:(void (^)(NSString *msg, int code))failure;
int code))failure;
/**
* 空间获取指定用户追踪的包房
......@@ -133,24 +118,6 @@ typedef enum : NSUInteger {
NSInteger code))success
failure:(void (^)(NSString *msg, int code))failure;
/**
* 获取视讯、声优聊天主播首页信息
*
* @param vcType 视讯、声优聊天
* @param type 数据源类型
* @param page 页码
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_requestAccompanyingAnchorsInfosWithControllerType:(FUSBaoFangControllerType)vcType
withType:(FUSDataSourceType)type
page:(NSInteger)page
sex:(NSInteger)sex
size:(NSInteger)size
success:(void (^)(NSMutableArray *userInfos,BOOL isLastPage, int code))success
failure:(void (^)(NSString *msg, int code))failure;
/**
* 结束直播间推荐热门列表
*
......@@ -159,17 +126,6 @@ typedef enum : NSUInteger {
*/
+(void)fus_requestEndRecommendRoomsSuccess:(void (^)(NSMutableArray *userInfos, int code))success failure:(void (^)(NSString *msg, int code))failure;
/**
* 获取用户相册
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getUserPhotosWithSuccess:(void (^)(NSArray *imageArray))success
failure:(void (^)(NSString *msg))failure;
/**
获取循环广播
......@@ -203,18 +159,6 @@ typedef enum : NSUInteger {
/**
请求主题包房的数据
@param success
@param failure
*/
+ (void)fus_requestThemeRoomDataWithThemeId:(NSString *)themeId
pageSize:(NSInteger)pageSize
page:(NSInteger)page
success:(void(^)(NSArray *models))success
failure:(void(^)(NSString *msg, int code))failure;
/**
请求开屏推送的数据
@param success
......
......@@ -83,72 +83,6 @@
}
/**
* 获取附近的包房
*
* @param page 页数
* @param pageSize每页大小
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_requestNearbyBaoFangWithPage:(NSInteger)page pageSize:(NSInteger)pageSize sex:(NSInteger)sex withDataKey:(NSString *)dataKey success:(void (^)(NSArray *, NSInteger,NSInteger,NSString *))success failure:(void (^)(NSString *, int))failure{
NSString *location = [[NSUserDefaults standardUserDefaults] objectForKey:@"location"];
// 空值判断
if (page == 0 || pageSize == 0) {
FUSLogInfo(@"--->获取追踪的包房失败, page或pageSize为0,或者uid为零");
return;
}
if ([NSString isNull:location]) {
FUSLogInfo(@"位置信息为空");
}
// 构建请求参数
if ([NSString isNull:dataKey]) {
dataKey = @"";
}
NSMutableDictionary *params = [NSMutableDictionary dictionary];
params[@"pageSize"] = @(pageSize);
params[@"page"] = @(page);
params[@"location"] = location;
params[@"dataKey"] = dataKey;
params[@"cityCode"] = 0;
params[@"sex"] = @(sex);
if ([FUSConfig sharedInstanced].devConfigs.enableHttpDebug) {
FUSLogInfo(@"请求参数%@",params);
}
[FUSHttpHelper postRequestBinaryWithUrl:URL_BAOFANG_NEARBY params:params success:^(NSDictionary *dataDict, int code) {
NSArray *modelDics = dataDict[@"rooms"];
NSString *dataKey = dataDict[@"dataKey"];
NSInteger pageSize = [[dataDict[@"pageSize"] description] integerValue];
NSMutableArray *models = [NSMutableArray array];
if (![NSArray isNull:modelDics]) {
for (NSDictionary *dic in modelDics) {
FUSBaoFangAnchorModel *model = [FUSBaoFangAnchorModel fus_modelWithDict:dic];
[models addObject:model];
}
}
if (success) {
success(models,code,pageSize,dataKey);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE,code);
}
}];
}
/**
* 获取追踪的包房
*
......@@ -234,9 +168,6 @@
}
NSString *url = URL_BAOFANG_TYPEPAGE;
if (vcType == FUSBaoFangControllerTypeChatRoom) {
url = URL_BAOFANG_ChatRoom;
}
// Http网络请求
[FUSHttpHelper postRequestBinaryWithUrl:url params:params success:^(NSDictionary *dataDict, int code) {
......@@ -377,75 +308,6 @@
}
/**
* 获取视讯、声优聊天主播首页信息
*
* @param vcType 视讯、声优聊天
* @param type 数据源类型
* @param page 页码
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_requestAccompanyingAnchorsInfosWithControllerType:(FUSBaoFangControllerType)vcType
withType:(FUSDataSourceType)type
page:(NSInteger)page
sex:(NSInteger)sex
size:(NSInteger)size
success:(void (^)(NSMutableArray *, BOOL, int))success
failure:(void (^)(NSString *, int))failure
{
NSString *location = [[NSUserDefaults standardUserDefaults] objectForKey:@"location"];
//请求参数
NSMutableDictionary *params = [NSMutableDictionary dictionary];
params[@"page"] = @(page);
params[@"pageSize"] = @(size);
params[@"category"] = @(vcType);
params[@"type"] = @(type);
params[@"locat"] = location;
params[@"filterSex"] = @(sex);
if ([FUSConfig sharedInstanced].devConfigs.enableHttpDebug) {
FUSLogInfo(@"=====>>>请求参数:%@",params);
}
// 视讯、声优聊天Http网络请求
[FUSHttpHelper postRequestBinaryWithUrl:URL_BAOFANG_ACCOMPAY params:params success:^(NSDictionary *dataDict, int code) {
NSString *uid = [[[FUSCacheDataShare shareStore]userDetailInfo]uid];
BOOL isCheckCountLogined = [[[NSUserDefaults standardUserDefaults] objectForKey:CHECKCOUNT_LOGINED] boolValue];
if (([FUSConfig.sharedInstanced.devConfigs.blackUserDict objectForKey:uid] && !FUSConfig.sharedInstanced.devConfigs.appStatus && !TEST_CODE) || (isCheckCountLogined && !FUSConfig.sharedInstanced.devConfigs.appStatus)) {
dataDict = @{};
}
NSArray *userJsons = dataDict[@"results"];
NSInteger page = [dataDict[@"page"] integerValue];
NSInteger pageTotal = [dataDict[@"pageTotal"] integerValue];
BOOL isLastPage = page >= pageTotal;
NSMutableArray *anchors = [NSMutableArray array];
if (![NSArray isNull:userJsons]) {
for (NSDictionary *dic in userJsons) {
FUSBaoFangSingleModel *anchor = [FUSBaoFangSingleModel fus_modelWithDict:dic];
anchor.videoModel = [FUSHomeVideoChatModel fus_modelWithDict:anchor.chatWith];
if ([anchor.chatWith[@"videoPrice"] integerValue] <= 0
&& [anchor.chatWith[@"audioPrice"] integerValue] <= 0) {
[anchors addObject:anchor];
}
}
}
if (success) success(anchors, isLastPage, code);
} failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code);
}];
}
/**
* 结束直播间推荐热门列表
*
* @param success 成功回调
......@@ -476,27 +338,6 @@
}];
}
/**
* 获取用户相册
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getUserPhotosWithSuccess:(void (^)(NSArray *imageArray))success failure:(void (^)(NSString *msg))failure {
[FUSHttpHelper postRequestBinaryWithUrl:URL_GET_USER_PHOTOS params:nil success:^(NSDictionary *dataDict, int code) {
NSMutableArray *mutArray = [NSMutableArray array];
for (NSInteger i = 0; i < [dataDict[@"photos"] count]; i++) {
[mutArray addObject:dataDict[@"photos"][i]];
}
if (success) success(mutArray);
} failure:^(NSDictionary *dataDict, int code) {
if (failure) failure([FUSHttpErrorMessage fus_getErrorMessageWithDict:dataDict]);
}];
}
/**
获取循环广播
......@@ -588,37 +429,6 @@
}];
}
/**
请求主题包房的数据
@param success
@param failure
*/
+ (void)fus_requestThemeRoomDataWithThemeId:(NSString *)themeId pageSize:(NSInteger)pageSize page:(NSInteger)page success:(void (^)(NSArray *))success failure:(void (^)(NSString *, int))failure{
NSMutableDictionary *param = [NSMutableDictionary dictionary];
param[@"themeId"] = themeId;
param[@"page"] = @(page);
param[@"pageSize"] = @(pageSize);
[FUSHttpHelper postRequestBinaryWithUrl:URL_THEME_ROOM params:param success:^(NSDictionary *dataDict, int code) {
NSArray *rooms = dataDict[@"rooms"];
NSMutableArray *roomArr = [NSMutableArray array];
for (NSDictionary *dict in rooms) {
FUSBaoFangAnchorModel *model = [FUSBaoFangAnchorModel fus_modelWithDict:dict];
[roomArr addObject:model];
}
if (success) {
success(roomArr);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE, code);
}
}];
}
/**
请求开屏推送的数据
......
......@@ -376,99 +376,6 @@
}
///**
// * 更新等级信息数据
// *
// * @param type 类型:1-内存->本地->服务器,2-本地->服务器,3-服务器
// * @param success 成功回调
// * @param failure 失败回调
// */
//+ (void)fus_getUpdateLevelWithType:(ReadCacheOrder)type success:(void (^)(NSArray *levelArray))success failure:(void (^)(NSString *msg))failure
//{
// // 从内存获取数据
// if (type <= 1) {
// NSArray *levelModelArray = [[FUSCacheDataShare shareStore] levelModelArray];
// if (![NSArray isNull:levelModelArray]) {
// if (success) success(levelModelArray);
// return;
// }
// }
//
// // 从本地获取数据
// if (type <= 2) {
// // 获取本地数据
// NSArray *levelDictArray = [FUSCustomizedInfosStore fus_readCommonInfosWithKey:HOT_LEVEL_DICT_ARRAY];
// // 解析字典数组为Model数组
// NSMutableArray *levelModelArray = [NSMutableArray array];
// for (NSDictionary *levelDict in levelDictArray) {
// FUSLevelDataModel *levelModel = [FUSLevelDataModel fus_modelWithDict:levelDict];
// // 容错
// if ([FUSBaseModel fus_isNullWithModel:levelModel] || [NSString isNull:levelModel.lid]) continue;
//
// [levelModelArray addObject:levelModel];
//
// // 预下载图片
// [[YYWebImageManager sharedManager] requestImageWithURL:[NSURL URLWithString:[FUSConfig.sharedInstanced.pathConfigs downloadPath:levelModel.icon]] options:0 progress:nil transform:nil completion:nil];
// }
// // 更新内存, 回调数据
// if (![NSArray isNull:levelModelArray]) {
// // 更新内存数据
// [[FUSCacheDataShare shareStore] setLevelModelArray:levelModelArray];
// // 回调数据
// if (success) success(levelModelArray);
// return;
// }
// }
//
// // 从服务器获取数据
// if (type <= 3) {
// [FUSCommonHttpRequest fus_updateLevelWithSuccess:^(NSDictionary *dataDict, int code){
// // 解析数据
// NSString *levelMd5 = [dataDict objectForKey:@"levelMd5"];
// NSArray *levelDictArray = [dataDict objectForKey:@"data"];
// // 将字典数组转为Model数组
// NSMutableArray *levelModelArray = [NSMutableArray array];
//
// NSMutableDictionary *liveUserInfoLevelBgDict = [NSMutableDictionary dictionary];
// NSMutableDictionary *liveChatLevelBgDict = [NSMutableDictionary dictionary];
// NSMutableDictionary *liveEnterRoomLevelBgDict = [NSMutableDictionary dictionary];
//
// for (NSDictionary *dataDict in levelDictArray) {
// FUSLevelDataModel *levelModel = [FUSLevelDataModel fus_modelWithDict:dataDict];
//
// // 容错
// if ([FUSBaseModel fus_isNullWithModel:levelModel] || [NSString isNull:levelModel.lid]) continue;
//
// [levelModelArray addObject:levelModel];
//
// //vip等级图片
// liveUserInfoLevelBgDict[levelModel.level] = levelModel.power;
// liveChatLevelBgDict[levelModel.level] = levelModel.chatPower;
// liveEnterRoomLevelBgDict[levelModel.level] = levelModel.carPower;
//
// // 预下载图片
// [[YYWebImageManager sharedManager] requestImageWithURL:[NSURL URLWithString:[FUSConfig.sharedInstanced.pathConfigs downloadPath:levelModel.icon]] options:0 progress:nil transform:nil completion:nil];
// }
// // 更新内存数据
// FUSHotDataMD5Model *hotDataMD5Model = [[FUSCacheDataShare shareStore] hotDataMD5Model];
// hotDataMD5Model.levelMd5 = levelMd5;
// [[FUSCacheDataShare shareStore] setLevelModelArray:levelModelArray];
// // 更新本地数据
// [FUSCustomizedInfosStore fus_addCommonInfosWithKey:HOT_UPDATE_CHECK_MD5_DICT value:[hotDataMD5Model fus_getDictionary]];
// [FUSCustomizedInfosStore fus_addCommonInfosWithKey:HOT_LEVEL_DICT_ARRAY value:levelDictArray];
// [FUSCustomizedInfosStore fus_addCommonInfosWithKey:VIP_LEVEL_BGVIEW_DICT value:liveUserInfoLevelBgDict];
// [FUSCustomizedInfosStore fus_addCommonInfosWithKey:VIP_CHAT_LEVEL_BGVIEW_DICT value:liveChatLevelBgDict];
// [FUSCustomizedInfosStore fus_addCommonInfosWithKey:VIP_ENTERROOM_LEVEL_BGVIEW_DICT value:liveEnterRoomLevelBgDict];
// // 回调数据
// if (success) success(levelModelArray);
//
// } failure:^(NSString *msg, int code) {
// if (failure) failure(msg);
// }];
// }
//}
/**
* 更新横幅广告数据
*
......
......@@ -131,14 +131,6 @@ typedef enum : NSUInteger {
+ (void)fus_updateChatGiftWithSuccess:(void(^)(NSDictionary *dataDict, int code))success failure:(void(^)(NSString *msg, int code))failure;
/**
* 更新等级信息数据
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_updateLevelWithSuccess:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure;
/**
* 更新横幅广告数据
*
* @param success 成功回调
......@@ -147,18 +139,6 @@ typedef enum : NSUInteger {
+ (void)fus_updateBannerWithSuccess:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure;
/**
* 获取国家列表
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getCountryShowList:(NSInteger)page
pageSize:(NSInteger)pageSize
type:(NSInteger)type
success:(void (^)(NSArray<FUSCountryModel *> *countryList, int code))success
failure:(void (^)(NSString *msg, int code))failure;
/**
* 更新座驾数据
*
* @param success 成功回调
......
......@@ -275,20 +275,6 @@
/**
* 更新等级信息数据
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_updateLevelWithSuccess:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure
{
[FUSHttpHelper postRequestBinaryWithUrl:URL_UPDATE_LEVEL params:nil retryTimes:3 success:success failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code);
}];
}
/**
* 更新横幅广告数据
*
* @param success 成功回调
......@@ -314,42 +300,6 @@
}];
}
// 已废除
/**
* 获取国家列表
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getCountryShowList:(NSInteger)page
pageSize:(NSInteger)pageSize
type:(NSInteger)type
success:(void (^)(NSArray<FUSCountryModel *> *countryList, int code))success
failure:(void (^)(NSString *msg, int code))failure
{
[FUSHttpHelper postRequestBinaryWithUrl:URL_GET_COUNTRY_SHOW params:@{@"type":@(type),@"page":@(page),@"pageSize":@(pageSize)} retryTimes:3 success:^(NSDictionary *dataDict, int code) {
BOOL isShow = [dataDict[@"isShow"] boolValue];
NSArray *list = dataDict[@"list"];
if (!isShow || [NSArray isNull:list]) {
if (success) {
success(nil,code);
}
return;
}
NSMutableArray *countryList = [NSMutableArray arrayWithCapacity:list.count];
if (success) {
success(countryList,code);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code);
}];
}
/**
* 更新包房提示信息
*
......
......@@ -407,9 +407,6 @@
// 语音签名文字链数据列表
#define UDKEY_COMMON_VOICE_SIGN_DEMO_LIST @"UDKEY_COMMON_VOICE_SIGN_DEMO_LIST"
// 首页包房活动页的地址
#define UDKEY_BAOFANG_ACTIVE_PAGE_WEB_URL @"UDKEY_BAOFANG_ACTIVE_PAGE_WEB_URL"
// TTSDK初始化的信息
#define UDKEY_TTSDK_INFOS @"UDKEY_TTSDK_INIT_INFOS"
// LIVE_PUSH_CONFIG 数据 Key 值
......
......@@ -1611,15 +1611,12 @@
} msgFailure:^(NSInteger refreshIndex, NSString *msgID) {
[self fus_refrshMessgaeCellWithSendState:FUSMsgStateFail refreshIndex:refreshIndex serverMsgID:msgID sendMsgInfo:nil];
} yaServerFailure:^(NSInteger errorCode) {
if (errorCode == -100 || errorCode == -101) {
if (errorCode == -100) {
NSString *alertTitle = @"";
NSString *alertRightOption = @"";
if (errorCode == -100) {
alertTitle = [NSString fus_localString:@"宝石不足"];
alertRightOption = [NSString fus_localString:@"前往储值"];
}else if (errorCode == -101){
alertTitle = [NSString fus_localString:@"银币不足"];
alertRightOption = [NSString fus_localString:@"宝石兑换"];
}
[self fus_endEditState];
......
......@@ -394,9 +394,7 @@
// 标记自动登录
[[NSUserDefaults standardUserDefaults] setObject:@(1) forKey:AUTO_LOGIN_MARK_BOOL];
// 检测版本更新!
[self checkVersionUpdate];
// 调用日常统计日志
[FUSIntervalTaskHelper fus_doEverydayStatLog];
......@@ -575,38 +573,6 @@
}
/**
检查版本更新
*/
- (void)checkVersionUpdate
{
[FUSLoginHttpHelper fus_checkVersionUpdateWithSuccess:^(FUSUpdateModel *updateModel) {
if ([updateModel.enforce intValue] == 1) { // 强制更新
[FUSAlertView showAlertWithTitle:updateModel.title message:updateModel.text cancelButtonTitle:nil otherButtonTitles:@[[NSString fus_localString:@"去更新"]] clickBlock:^(NSInteger buttonIndex) {
// 注销登录
[[FUSIMUserService shareInstance] fus_logOffWithSuccess:nil failure:nil];
[self logOut];
// 转跳到启动页
FUSStartPageViewController *startPageVC = [[FUSStartPageViewController alloc] initNeedWaitTime:NO];
UINavigationController *navGuide = [[UINavigationController alloc] initWithRootViewController:startPageVC];
[[[[UIApplication sharedApplication] delegate] window] setRootViewController:navGuide];
[navGuide.navigationController popToRootViewControllerAnimated:YES];
// 跳转链接
UIApplication *application = [UIApplication sharedApplication];
[application openURL:[NSURL URLWithString:URL_WEB_APPSTORE]];
}];
}else if([updateModel.enforce intValue] == 0){ // 建议更新(可以跳过)
[FUSAlertView showAlertWithTitle:updateModel.title message:updateModel.text cancelButtonTitle:[NSString fus_localString:@"取消"] otherButtonTitles:@[[NSString fus_localString:@"去更新"]] clickBlock:^(NSInteger buttonIndex) {
if (buttonIndex == 1) {
UIApplication *application = [UIApplication sharedApplication];
[application openURL:[NSURL URLWithString:URL_WEB_APPSTORE]];
}
}];
}
} failure:nil];
}
/**
获取用户信息
@param type 读取数据策略, ReadMemoryBegin:从内存开始: 内存 -> 数据库 -> 服务器 / ReadDatabaseBegin:从数据库开始: 数据库 -> 服务器 / ReadServerBegin:从服务器开始: 服务器
......
......@@ -49,15 +49,6 @@ typedef NS_ENUM(NSInteger, Platform) {
failure:(void (^)(NSString *msg, int code))failure;
/**
检查版本更新
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_checkVersionUpdateWithSuccess:(void (^)(FUSUpdateModel *updateModel))success
failure:(void (^)(NSString *msg, int code))failure;
/**
同步用户相关数据
@param success 成功回调
......
......@@ -189,27 +189,6 @@
}];
}
/**
检查版本更新
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_checkVersionUpdateWithSuccess:(void (^)(FUSUpdateModel *updateModel))success
failure:(void (^)(NSString *msg, int code))failure
{
// 请求服务器
// [FUSHttpHelper getRequestBinaryWithUrl:URL_CHECK_VERSION_UPDATE params:nil success:^(NSDictionary *dataDict, int code) {
//
// FUSUpdateModel *updateModel = [FUSUpdateModel fus_modelWithDict:[dataDict objectForKey:@"result"]];
// if (success) success(updateModel);
//
// } failure:^(NSDictionary *dataDict, int code) {
//
// if (failure) failure(FAILURE_MESSAGE, code);
//
// }];
}
/**
获取验证密码
......
......@@ -179,17 +179,6 @@
success:(void (^)(int code, NSDictionary *infoDict))success
failure:(void (^)(NSString *msg, int code, NSDictionary *errorDict))failure;
/**
创建视讯room
@param cityCode 城市code
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_createPrivateLiveWithFid:(NSString *)fid
introduce:(NSString *)introduce
success:(void (^)(FUSStreamModel *streamModel))success
failure:(void (^)(NSString *msg, int code, NSDictionary *errorDict))failure;
/// 切换直播范围
/// @param fid 当前主播的id
......@@ -721,12 +710,6 @@
*/
+ (void)fus_requestLiveTaskParcelListSuccess:(void(^)(NSArray *taskDataArr, NSString *dailyWaitReceiveTotal))success failure:(void(^)(NSString *msg,int code))failure;
/// 获取与主播的历史过往
/// @param fid 当前主播的id
/// @param success 成功回调
/// @param failure 失败回调
+ (void)fus_requestLiveversusUserHistory:(NSInteger)fid success:(void (^)(NSDictionary *dataDict))success failure:(void (^)(NSString *msg, int code))failure;
/// 贴纸列表
/// @param roomId 房间id
/// @param success 成功回调
......
......@@ -624,34 +624,6 @@
}];
}
/**
创建视讯room
@param cityCode 城市code
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_createPrivateLiveWithFid:(NSString *)fid introduce:(NSString *)introduce success:(void (^)(FUSStreamModel *streamModel))success failure:(void (^)(NSString *msg, int code, NSDictionary *errorDict))failure {
if ([NSString isNull:fid]) return;
NSString *cityCode = [[NSUserDefaults standardUserDefaults] objectForKey:LOCATION_CITY_CODE];
if ([NSString isNull:cityCode]) cityCode = @"0";
if ([NSString isNull:introduce]) introduce = @"";
[FUSHttpHelper postRequestBinaryWithUrl:URL_CREATE_PRIVATE_LIVE params:@{@"cityCode":cityCode, @"fid":fid, @"introduce":introduce} success:^(NSDictionary *dataDict, int code) {
FUSStreamModel *streamModel = [FUSStreamModel fus_modelWithDict:dataDict];
if (success) success(streamModel);
} failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code,dataDict);
}];
}
+ (void)fus_requestChangeRoomType:(NSString *)roomType
fid:(NSString *)fid
success:(void (^)(NSDictionary *dataDict))success
......@@ -1161,58 +1133,6 @@
}];
}
///**
// 根据数量送礼
//
// @param fid 接收方 uid
// @param gid 礼物 id
// @param num 礼物数量
// @param success 成功回调
// @param failure 失败回调
// */
//+ (void)fus_sendGiftToFid:(NSString *)fid
// giftId:(NSString *)gid
// num:(NSInteger)num
// md5:(NSString *)md5
// success:(void(^)(NSDictionary *changed))success
// failure:(void(^)(NSString *msg, int code))failure
//{
// if ([NSString isNull:fid] ||
// [NSString isNull:gid] ||
// num == 0) {
// FUSLogInfo(@"---> 发送礼物失败,数据为空");
// if (failure) {
// failure(@"数据为空", ERROR_CODE);
// }
// return;
// }
//
// if ([NSString isNull:md5]) {
// md5 = @"";
// }
//
// NSDictionary *params = @{@"fid":fid,
// @"gid":gid,
// @"num":[NSString stringWithFormat:@"%ld", num],
// @"md5":md5
// };
//
// [FUSHttpHelper postRequestBinaryWithUrl:URL_LIVE_SEND_GIFT_NUM params:params success:^(NSDictionary *dataDict, int code) {
//
// NSDictionary *changed = [dataDict objectForKey:@"cv"];
// if (success) {
// success(changed);
// }
//
// } failure:^(NSDictionary *dataDict, int code) {
//
// if (failure) {
// failure(FAILURE_MESSAGE, code);
// }
//
// }];
//}
/**
发送消息
......@@ -2302,26 +2222,6 @@
}];
}
/// 获取与主播的历史过往
/// @param fid 当前主播的id
/// @param success 成功回调
/// @param failure 失败回调
+ (void)fus_requestLiveversusUserHistory:(NSInteger)fid success:(void (^)(NSDictionary *dataDict))success failure:(void (^)(NSString *msg, int code))failure {
NSDictionary *params = @{@"fid":@(fid)};
[FUSHttpHelper postRequestBinaryWithUrl:URL_LIVE_VERSUS_USER_HISTORY params:params success:^(NSDictionary *dataDict, int code) {
if (success) {
success(dataDict);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE,code);
}
}];
}
/// 直播间同步用户权益信息
/// @param fid 当前主播的id
/// @param success 成功回调
......
......@@ -566,7 +566,6 @@
- (void)dealSendGiftFailureWithMessage:(NSString *)msg code:(int)code gid:(NSString *)gid
{
if (code != -100 &&
code != -101 &&
code != -201) {
[FUSDialogView fus_showDialog:msg];
FUSLogInfo(@"送礼失败:%@ code:%d", msg, code);
......
......@@ -983,27 +983,6 @@
}];
}
break;
case -101:
{
[FUSAlertView showAlertWithTitle:@""
message:[NSString fus_localString:@"银币不足"]
cancelButtonTitle:[NSString fus_localString:@"取消"]
otherButtonTitles:@[/*@"赚取银币", */[NSString fus_localString:@"宝石兑换"]]
clickBlock:^(NSInteger buttonIndex) {
if (buttonIndex == 1) {
if (self.delegate && [self.delegate respondsToSelector:@selector(fus_chatInputView:pushViewController:)]) {
FUSUserVerifyModel *userVerifyInfo = [[FUSCacheDataShare shareStore] userVerifyInfo];
FUSWKWebViewController *webViewCtrl = [[FUSWKWebViewController alloc] init];
webViewCtrl.webUrlString = [NSString stringWithFormat:@"%@?uid=%@&token=%@", URL_EXCHANGE_GOLD_PAGE, userVerifyInfo.uid, userVerifyInfo.token];
[self.delegate fus_chatInputView:self pushViewController:webViewCtrl];
}
}
}];
}
break;
default:
[FUSDialogView fus_showDialog:msg];
break;
......
......@@ -2097,7 +2097,6 @@ static FUSLiveGiftView *giftView = nil;
weakSelf.bgView.userInteractionEnabled = YES;
if (code != -100 &&
code != -101 &&
code != -201 &&
code != -116) {
// 点击连胜按钮的不弹toast
......@@ -2132,14 +2131,6 @@ static FUSLiveGiftView *giftView = nil;
if (!weakSelf.diamondAlertTimer) {
weakSelf.diamondAlertTimer = [NSTimer scheduledTimerWithTimeInterval:.2 target:[YYWeakProxy proxyWithTarget:self] selector:@selector(showAlertViewWithDelay:) userInfo:@{@"msg":msg, @"code":@(code), @"btnArr":btnArr} repeats:NO];
}
}else if (code == -101){
// 银币不足
btnArr = @[/*[NSString fus_localString:@"赚取银币"],*/[NSString fus_localString:@"兑换宝石"], [NSString fus_localString:@"取消"]];
msg = [NSString fus_localString:@"银币不足"];
if (!weakSelf.coinAlertTimer) {
weakSelf.coinAlertTimer = [NSTimer scheduledTimerWithTimeInterval:.2 target:[YYWeakProxy proxyWithTarget:self] selector:@selector(showAlertViewWithDelay:) userInfo:@{@"msg":msg, @"code":@(code), @"btnArr":btnArr} repeats:NO];
}
} else if (code == -201) {
if (weakSelf.isUpdating) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"正在更新礼物..."]];
......@@ -2536,11 +2527,7 @@ static FUSLiveGiftView *giftView = nil;
[[FUSLiveHelper shareInstance].currentFunctionView fus_autoShowFirstChargeViewWhenBackFromRechargeIfNeeded];
}];
return;
}else if (code == -101){
// 银币不足
message = [NSString fus_localString:@"银币不足"];
title = [NSString fus_localString:@"银币不足"];
}else if (code == -116) {
} else if (code == -116) {
// 露水不足
message = [NSString fus_localString:@"您的露水不足,无法送礼"];
title = [NSString fus_localString:@"露水不足"];
......@@ -2595,27 +2582,7 @@ static FUSLiveGiftView *giftView = nil;
[self fus_dismissWithAnimate:YES needUpload:NO];
}
}else if (code == -101){
[_coinAlertTimer invalidate];
_coinAlertTimer = nil;
if (buttonIndex == 1) {
return ;
}
if (buttonIndex == 0) {
if (self.currentVC) {
FUSLogInfo(@"--->兑换银币");
FUSUserVerifyModel *userVerifyInfo = [[FUSCacheDataShare shareStore] userVerifyInfo];
FUSWKWebViewController *webViewCtrl = [[FUSWKWebViewController alloc] init];
webViewCtrl.webUrlString = [NSString stringWithFormat:@"%@?uid=%@&token=%@", URL_EXCHANGE_GOLD_PAGE, userVerifyInfo.uid, userVerifyInfo.token];
[self.currentVC.navigationController pushViewController:webViewCtrl animated:YES];
[self fus_dismissWithAnimate:NO needUpload:NO];
FUSLogInfo(@"。。。。。No11");
}
}
}else if (code == -116){
} else if (code == -116){
if (buttonIndex == 1) {
FUSLogInfo(@"--->兑换露水");
......
......@@ -165,14 +165,6 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)fus_requestRecommentTopicIdsWithSuccess:(void(^)(NSDictionary *dataDict))success
failure:(void(^)(NSString *msg, int code))failure;
/// 查看动态详细
/// @param topicId 动态主题ID
/// @param success 成功回调
/// @param failure 失败回调
+ (void)fus_setupDateVideoWith:(NSString *)topicId
success:(void(^)(void))success
failure:(void(^)(NSString *msg, int code))failure;
@end
NS_ASSUME_NONNULL_END
......@@ -580,26 +580,4 @@
}
}
/// 查看动态详细
/// @param topicId 动态主题ID
/// @param success 成功回调
/// @param failure 失败回调
+ (void)fus_setupDateVideoWith:(NSString *)topicId
success:(void(^)(void))success
failure:(void(^)(NSString *msg, int code))failure {
if ([NSString isNull:topicId] || topicId.intValue == 0) {
return;
}
NSMutableDictionary *param = [NSMutableDictionary dictionaryWithDictionary:@{@"topicId":topicId}];
[FUSHttpHelper postRequestBinaryWithUrl:URL_ZONE_DYNAMIC_SETUP_VIDEO params:param success:^(NSDictionary *dataDict, int code) {
if (success) success();
} failure:^(NSDictionary *dataDict, int code) {
[self fus_handlerNewsFeedHasDeletedWithCode:code];
if (failure) failure(dataDict[@"msg"], code);
}];
}
@end
......@@ -75,7 +75,6 @@ typedef NS_ENUM(NSInteger, DebugEnv){
- (IBAction)onClickEnvChoseButton:(UIButton *)sender {
[[NSUserDefaults standardUserDefaults] setObject:URL_WEB_BAOFANG_ACTIVE_URL forKey:UDKEY_BAOFANG_ACTIVE_PAGE_WEB_URL];
switch (sender.tag) {
case DebugEnvProduct:
{
......@@ -99,7 +98,6 @@ typedef NS_ENUM(NSInteger, DebugEnv){
case DebugEnvTest:
{
[[NSUserDefaults standardUserDefaults] setObject:@"http://apitest.yabolive.co" forKey:CUSTOM_API_ADDRESS];
[[NSUserDefaults standardUserDefaults] setObject:URL_WEB_TEST_BAOFANG_ACTIVE_URL forKey:UDKEY_BAOFANG_ACTIVE_PAGE_WEB_URL];
[FUSAPIDNSManager fus_checkCurrentDNSAddress];
......
......@@ -141,25 +141,6 @@
}
/**
* 拉取追踪包房的最新信息
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getRoomNewMessageWithSuccess:(void (^)(NSArray *roomModelArray))success failure:(void (^)(NSString *msg))failure
{
[FUSZhaiXinHttpHelper fus_getRoomNewMessageWithSuccess:^(NSArray *roomModelArray) {
BOOL result = [FUSZhaiXinDBOperate fus_writeMultiBaoFangDataToZhaiXinInfosTableWithModelArray:roomModelArray];
if (result) {
if (success) success(roomModelArray);
}else{
if (failure) failure(@"写入追踪包房的最新信息失败");
}
} failure:failure];
}
/**
* 写入单人聊天数据到寨信表
*
* @param socketModel 单聊SocketModel
......
......@@ -7,7 +7,6 @@
//
#define SINGLE_CHAT @"singleChat"
#define BAOFANG_CHAT @"baofangChat"
#define OFFICIAL_MESSAGE @"OfficialMessage"
#define FUSBO_ACCOMPANY @"YaboAccompany"
#define NOTIFICATION_MESSAGE @"NotificationMessage"
......
......@@ -13,15 +13,6 @@
@interface FUSZhaiXinHttpHelper : NSObject
/**
* 拉取追踪包房的最新信息
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getRoomNewMessageWithSuccess:(void (^)(NSArray *roomModelArray))success failure:(void (^)(NSString *msg))failure ;
/**
拉取视讯历史记录列表
......
......@@ -13,50 +13,6 @@
@implementation FUSZhaiXinHttpHelper
/**
* 拉取追踪包房的最新信息
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getRoomNewMessageWithSuccess:(void (^)(NSArray *roomModelArray))success failure:(void (^)(NSString *msg))failure {
[FUSHttpHelper postRequestBinaryWithUrl:URL_ROOM_LIKED_NEW_MESSAGE params:nil success:^(NSDictionary *dataDict, int code) {
NSMutableArray *roomModelArray = [NSMutableArray array];
// 解析自己的房间
NSDictionary *myRoomDict = dataDict[@"myRoom"];
if (![NSDictionary isNull:myRoomDict]) {
FUSZhaiXinModel *myRoomModel = [FUSZhaiXinModel fus_modelWithDict:myRoomDict];
myRoomModel.unread = @"1";
myRoomModel.typeId = [NSString stringWithFormat:@"%@%@",BAOFANG_CHAT,myRoomModel.roomId];
[roomModelArray addObject:myRoomModel];
}
// 解析追踪的包房
NSArray *likeRoomArray = dataDict[@"likeRoom"];
if (![NSArray isNull:likeRoomArray]) {
for (NSDictionary *likeRoomDict in likeRoomArray) {
FUSZhaiXinModel *likeRoomModel = [FUSZhaiXinModel fus_modelWithDict:likeRoomDict];
likeRoomModel.unread = @"1";
likeRoomModel.typeId = [NSString stringWithFormat:@"%@%@",BAOFANG_CHAT,likeRoomModel.roomId];
if ([likeRoomModel.type integerValue] == 7) {
likeRoomModel.content = @"[红包消息]";
}
[roomModelArray addObject:likeRoomModel];
}
}
if (success) success(roomModelArray);
} failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE);
}];
}
/**
拉取视讯历史记录列表
......
......@@ -188,13 +188,6 @@ typedef NS_ENUM(NSInteger, FUSZoneHttpUploadImageType)
success:(void (^)(NSString *path, int code))success
failure:(void (^)(NSString *msg, int code))failure;
/**
* 获取自己空间信息
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getMyZoneInfosSuccess:(void (^)(FUSZoneInfosModel *zoneModel, int code))success failure:(void (^)(NSString *msg, int code))failure;
/**
* 获取用户的粉丝列表
......
......@@ -471,35 +471,6 @@
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getMyZoneInfosSuccess:(void (^)(FUSZoneInfosModel *zoneModel, int code))success failure:(void (^)(NSString *msg, int code))failure
{
// HTTP请求
[FUSHttpHelper postRequestBinaryWithUrl:URL_ZONE_HOME_OWN params:nil success:^(NSDictionary *dataDict, int code) {
NSDictionary *zoneInfo = [dataDict objectForKey:@"data"];
FUSZoneInfosModel *zoneModel = [FUSZoneInfosModel fus_modelWithDict:zoneInfo];
//获取最新的model
FUSZoneInfosModel *zoneAddInfoModel = [[[FUSCacheDataShare shareStore] zoneInfosDict] objectForKey:zoneModel.uid];
//model为空创建
if ([FUSBaseModel fus_isNullWithModel:zoneAddInfoModel]) zoneAddInfoModel = [[FUSZoneInfosModel alloc] init];
if (![FUSBaseModel fus_isNullWithModel:zoneModel]) {
//将更新的信息写入最新的model
[zoneAddInfoModel fus_setValueWithModel:zoneModel];
if(success) success(zoneAddInfoModel, code);
}else{
if (failure) failure(@"获取空间信息为空", ERROR_CODE);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code);
}];
}
/**
* 获取自己空间信息
*
* @param success 成功回调
* @param failure 失败回调
*/
+ (void)fus_getNewMyZoneInfosSuccess:(void (^)(FUSZoneInfosModel *zoneModel, int code))success failure:(void (^)(NSString *msg, int code))failure
{
// HTTP请求
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment