福袋送礼物优化
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#import "RoomPKChooseUserModel.h"
|
||||
#import "RoomPKInfoModel.h"
|
||||
#import "CandyTreeResultModel.h"
|
||||
#import "XPGiftBigPrizeModel.h"
|
||||
|
||||
#import "NetImageView.h"
|
||||
|
||||
@@ -105,6 +106,8 @@
|
||||
return [self createKickUserAttribute:attachment info:kickModel];
|
||||
} else if (first == CustomMessageType_Room_PK) {///房内PK
|
||||
return [self createRoomPKAttribute:attachment];
|
||||
} else if (first == CustomMessageType_LuckyBag) {///幸运礼物
|
||||
return [self createRoomLuckyBigPrizeAttribute:attachment];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
@@ -261,6 +264,19 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
#pragma mark - 房间内幸运礼物 大价值
|
||||
- (NSAttributedString *)createRoomLuckyBigPrizeAttribute:(AttachmentModel *)attachment {
|
||||
XPGiftBigPrizeModel * info= [XPGiftBigPrizeModel modelWithDictionary:attachment.data];
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"恭喜" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.nick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"在" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.roomTitle color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"通过%@", info.luckyBagName] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@",开出%@", info.giftName] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
return attribute;
|
||||
}
|
||||
|
||||
#pragma mark - 房间内PK
|
||||
- (NSAttributedString *)createRoomPKAttribute:(AttachmentModel *)attachment {
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
|
Reference in New Issue
Block a user