Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e2edef2f
authored
Jul 10, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除没用的网络请求和URL宏定义
parent
f89dccdf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
5 additions
and
798 deletions
FuSiLive/AppDelegate.m
FuSiLive/Classes/BaoFang/Main/Other/FUSBaoFangHttpHelper.h
FuSiLive/Classes/BaoFang/Main/Other/FUSBaoFangHttpHelper.m
FuSiLive/Classes/Common/Other/FUSCommonCacheOperate.m
FuSiLive/Classes/Common/Other/FUSCommonHttpRequest.h
FuSiLive/Classes/Common/Other/FUSCommonHttpRequest.m
FuSiLive/Classes/Foundation/DataStores/FUSUserDefaultsStore.h
FuSiLive/Classes/Foundation/Http/FUSURLDictionary.h
FuSiLive/Classes/InstantMessaging/Controller/FUSChatDetailViewController.m
FuSiLive/Classes/Login/Other/FUSLoginHelper.m
FuSiLive/Classes/Login/Other/FUSLoginHttpHelper.h
FuSiLive/Classes/Login/Other/FUSLoginHttpHelper.m
FuSiLive/Classes/NewLive/Main/Other/FUSLiveHttpHelper.h
FuSiLive/Classes/NewLive/Main/Other/FUSLiveHttpHelper.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputHelper.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftView.m
FuSiLive/Classes/NewsFeed/Other/FUSNewsFeedHttpHelper.h
FuSiLive/Classes/NewsFeed/Other/FUSNewsFeedHttpHelper.m
FuSiLive/Classes/Test/Controller/FUSDebugEnvViewController.m
FuSiLive/Classes/ZhaiXin/Main/Other/FUSZhaiXinDBCacheOperate.m
FuSiLive/Classes/ZhaiXin/Main/Other/FUSZhaiXinDBOperate.h
FuSiLive/Classes/ZhaiXin/Main/Other/FUSZhaiXinHttpHelper.h
FuSiLive/Classes/ZhaiXin/Main/Other/FUSZhaiXinHttpHelper.m
FuSiLive/Classes/Zone/Other/FUSZoneHttpRequest.h
FuSiLive/Classes/Zone/Other/FUSZoneHttpRequest.m
FuSiLive/AppDelegate.m
View file @
e2edef2f
...
...
@@ -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
];
}
...
...
FuSiLive/Classes/BaoFang/Main/Other/FUSBaoFangHttpHelper.h
View file @
e2edef2f
...
...
@@ -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
...
...
FuSiLive/Classes/BaoFang/Main/Other/FUSBaoFangHttpHelper.m
View file @
e2edef2f
...
...
@@ -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
);
}
}];
}
/**
请求开屏推送的数据
...
...
FuSiLive/Classes/Common/Other/FUSCommonCacheOperate.m
View file @
e2edef2f
...
...
@@ -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);
// }];
// }
//}
/**
* 更新横幅广告数据
*
...
...
FuSiLive/Classes/Common/Other/FUSCommonHttpRequest.h
View file @
e2edef2f
...
...
@@ -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 成功回调
...
...
FuSiLive/Classes/Common/Other/FUSCommonHttpRequest.m
View file @
e2edef2f
...
...
@@ -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
);
}];
}
/**
* 更新包房提示信息
*
...
...
FuSiLive/Classes/Foundation/DataStores/FUSUserDefaultsStore.h
View file @
e2edef2f
...
...
@@ -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 值
...
...
FuSiLive/Classes/Foundation/Http/FUSURLDictionary.h
View file @
e2edef2f
This diff is collapsed.
Click to expand it.
FuSiLive/Classes/InstantMessaging/Controller/FUSChatDetailViewController.m
View file @
e2edef2f
...
...
@@ -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
];
...
...
FuSiLive/Classes/Login/Other/FUSLoginHelper.m
View file @
e2edef2f
...
...
@@ -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:从服务器开始: 服务器
...
...
FuSiLive/Classes/Login/Other/FUSLoginHttpHelper.h
View file @
e2edef2f
...
...
@@ -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 成功回调
...
...
FuSiLive/Classes/Login/Other/FUSLoginHttpHelper.m
View file @
e2edef2f
...
...
@@ -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);
//
// }];
}
/**
获取验证密码
...
...
FuSiLive/Classes/NewLive/Main/Other/FUSLiveHttpHelper.h
View file @
e2edef2f
...
...
@@ -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 成功回调
...
...
FuSiLive/Classes/NewLive/Main/Other/FUSLiveHttpHelper.m
View file @
e2edef2f
...
...
@@ -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 成功回调
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputHelper.m
View file @
e2edef2f
...
...
@@ -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
);
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputView.m
View file @
e2edef2f
...
...
@@ -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
;
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftView.m
View file @
e2edef2f
...
...
@@ -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
(
@"--->兑换露水"
);
...
...
FuSiLive/Classes/NewsFeed/Other/FUSNewsFeedHttpHelper.h
View file @
e2edef2f
...
...
@@ -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
FuSiLive/Classes/NewsFeed/Other/FUSNewsFeedHttpHelper.m
View file @
e2edef2f
...
...
@@ -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
FuSiLive/Classes/Test/Controller/FUSDebugEnvViewController.m
View file @
e2edef2f
...
...
@@ -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
];
...
...
FuSiLive/Classes/ZhaiXin/Main/Other/FUSZhaiXinDBCacheOperate.m
View file @
e2edef2f
...
...
@@ -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
...
...
FuSiLive/Classes/ZhaiXin/Main/Other/FUSZhaiXinDBOperate.h
View file @
e2edef2f
...
...
@@ -7,7 +7,6 @@
//
#define SINGLE_CHAT @"singleChat"
#define BAOFANG_CHAT @"baofangChat"
#define OFFICIAL_MESSAGE @"OfficialMessage"
#define FUSBO_ACCOMPANY @"YaboAccompany"
#define NOTIFICATION_MESSAGE @"NotificationMessage"
...
...
FuSiLive/Classes/ZhaiXin/Main/Other/FUSZhaiXinHttpHelper.h
View file @
e2edef2f
...
...
@@ -13,15 +13,6 @@
@interface
FUSZhaiXinHttpHelper
:
NSObject
/**
* 拉取追踪包房的最新信息
*
* @param success 成功回调
* @param failure 失败回调
*/
+
(
void
)
fus_getRoomNewMessageWithSuccess
:(
void
(
^
)(
NSArray
*
roomModelArray
))
success
failure
:(
void
(
^
)(
NSString
*
msg
))
failure
;
/**
拉取视讯历史记录列表
...
...
FuSiLive/Classes/ZhaiXin/Main/Other/FUSZhaiXinHttpHelper.m
View file @
e2edef2f
...
...
@@ -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
);
}];
}
/**
拉取视讯历史记录列表
...
...
FuSiLive/Classes/Zone/Other/FUSZoneHttpRequest.h
View file @
e2edef2f
...
...
@@ -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
;
/**
* 获取用户的粉丝列表
...
...
FuSiLive/Classes/Zone/Other/FUSZoneHttpRequest.m
View file @
e2edef2f
...
...
@@ -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请求
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment