Commit bf1e61e0 by suolong

Merge branch 'feature/7840付费房' of http://git.yabolive.net:88/pidan/FuSiLive into feature/7840付费房

parents 96373ac8 131a2c3a
......@@ -380,11 +380,18 @@ typedef NS_ENUM(NSInteger, FFOutsideJumpAPPType) {
// 准备上报的材料
NSMutableDictionary *reqDataJSON = [[NSMutableDictionary alloc] initWithDictionary:[transmissionContent copy]];
reqDataJSON[@"data"][@"title"] = notificontent.title ?: @"";
if ([reqDataJSON[@"data"][@"text"] stringValue].length <= 0) {
reqDataJSON[@"data"][@"text"] = notificontent.body;
id dataValue = reqDataJSON[@"data"];
NSMutableDictionary *dataDict = nil;
if (dataValue != nil && [dataValue isKindOfClass:[NSDictionary class]]) {
dataDict = [[NSMutableDictionary alloc] initWithDictionary:(NSDictionary *)dataValue];
} else {
dataDict = [[NSMutableDictionary alloc] init];
}
reqDataJSON[@"data"] = dataDict;
dataDict[@"title"] = notificontent.title ?: @"";
dataDict[@"text"] = notificontent.body ?: @"";
if (isChatNotification == NO) {
// 个推打开的,增加一个media
......@@ -393,7 +400,9 @@ typedef NS_ENUM(NSInteger, FFOutsideJumpAPPType) {
if (grinfo != nil && [grinfo isKindOfClass:[NSArray class]] && [grinfo count] > 0) {
NSDictionary *grinfoFirst = [grinfo firstObject];
NSString *grinfoUrl = [grinfoFirst[@"url"] stringValue];
reqDataJSON[@"data"][@"media"] = grinfoUrl;
if (grinfoUrl.length > 0) {
dataDict[@"media"] = grinfoUrl;
}
}
}
// 2. 转换为 JSON Data
......
......@@ -35,8 +35,9 @@
- (void)fus_loadDataSucceed:(void(^)(FUSContributeListModel *listModel, NSArray *ranklist))succeed
failedHandle:(void(^)(NSString *msg, NSInteger code))failedHandler {
NSString *roomId = FUSLiveHelper.shareInstance.roomInfoModel.roomId ?: @"";
NSDictionary *params = @{
@"roomId":FUSLiveHelper.shareInstance.roomInfoModel.roomId,
@"roomId": roomId,
@"type":@(self.type),
@"page":@(self.page)
};
......@@ -44,9 +45,14 @@
self.page = [dataDict[@"page"] integerValue];
NSMutableArray *rankList = [NSMutableArray array];
for (NSDictionary *user in dataDict[@"ranklist"]) {
FUSContributeModel *model = [FUSContributeModel fus_modelWithDict:user];
[rankList addObject:model];
NSArray *ranklistArray = [dataDict[@"ranklist"] isKindOfClass:NSArray.class] ? dataDict[@"ranklist"] : @[];
for (NSDictionary *user in ranklistArray) {
if ([user isKindOfClass:NSDictionary.class]) {
FUSContributeModel *model = [FUSContributeModel fus_modelWithDict:user];
if (model) {
[rankList addObject:model];
}
}
}
if (self.page == 1) {
......
......@@ -193,13 +193,17 @@ import RxCocoa
// 或者数据等于0之外的,都是true
if type == .chatScreenButton {
// 公屏按钮有次数
let speechGuidance = FUSCacheDataShare.shareStore().settingInitDataModel.fus_speechGuidance
if speechGuidance != -1 {
let showTime = fus_getShowTimes(type: type)
if showTime >= speechGuidance{
return false
if let speechGuidance = FUSCacheDataShare.shareStore().settingInitDataModel?.fus_speechGuidance {
if speechGuidance != -1 {
let showTime = fus_getShowTimes(type: type)
if showTime >= speechGuidance{
return false
}
}
}
else {
return false
}
}
return true
}
......
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