修复了糖果树开出多个礼物的话不显示个数的问题
This commit is contained in:
@@ -33,6 +33,12 @@ typedef NS_ENUM(NSUInteger, KeyType) {
|
||||
KeyType_FacePwdEncode, ///表情包解密key
|
||||
KeyType_SudGameAppID,///小游戏APPID
|
||||
KeyType_SudGameAppKey,///小游戏APPKey
|
||||
///家族公会key
|
||||
KeyType_GuildUidKey,
|
||||
///系统通知
|
||||
KeyType_SystemNotifiUidKey,
|
||||
///小秘书
|
||||
KeyType_SecretaryUidKey,
|
||||
};
|
||||
|
||||
/// 获取当前项目中所用到的 type 所对应的 value 的值 type 类型
|
||||
|
@@ -45,9 +45,12 @@ NSString * const KeyWithType(KeyType type) {
|
||||
@(keyType_YiDunBussinessId) : @"244721766ba607056a32c8824a85c253",
|
||||
@(keyType_UMengAppKey) : @"61b065e8e014255fcba606d1",
|
||||
@(keyType_UMengAppChannel) : @"App Store",
|
||||
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_SudGameAppID) : @"1467745235064848385",
|
||||
@(KeyType_SudGameAppKey) : @"BvjLDpWol7OihaYeFebuepx1bZu6cxU5"
|
||||
@(KeyType_SudGameAppKey) : @"BvjLDpWol7OihaYeFebuepx1bZu6cxU5",
|
||||
@(KeyType_GuildUidKey) : @"904771",
|
||||
@(KeyType_SystemNotifiUidKey) : @"904770",
|
||||
@(KeyType_SecretaryUidKey) : @"904769"
|
||||
},
|
||||
///测试环境
|
||||
@(NO):@{
|
||||
@@ -64,9 +67,12 @@ NSString * const KeyWithType(KeyType type) {
|
||||
@(keyType_YiDunBussinessId) : @"be58dfa4a664540006f0ed1f752d604a",
|
||||
@(keyType_UMengAppKey) : @"5ff6bc6dadb42d5826a1cbc4",
|
||||
@(keyType_UMengAppChannel) : @"App Store",
|
||||
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_SudGameAppID) : @"1467745235064848385",
|
||||
@(KeyType_SudGameAppKey) : @"BvjLDpWol7OihaYeFebuepx1bZu6cxU5"
|
||||
@(KeyType_SudGameAppKey) : @"BvjLDpWol7OihaYeFebuepx1bZu6cxU5",
|
||||
@(KeyType_GuildUidKey) : @"938284",
|
||||
@(KeyType_SystemNotifiUidKey) : @"938283",
|
||||
@(KeyType_SecretaryUidKey) : @"938282"
|
||||
}
|
||||
};
|
||||
NSDictionary * enviroDic = [dic objectForKey:@(isRelase)];
|
||||
|
@@ -12,6 +12,7 @@
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XPConstant.h"
|
||||
|
||||
@interface SessionNavView ()
|
||||
|
||||
@@ -79,6 +80,10 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (BOOL)isSystemAccount {
|
||||
return [KeyWithType(KeyType_SecretaryUidKey) isEqualToString:self.userId] || [KeyWithType(KeyType_SystemNotifiUidKey) isEqualToString:self.userId] || [KeyWithType(KeyType_GuildUidKey) isEqualToString:self.userId];
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)reportButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(sessionNavView:didClickReport:)]) {
|
||||
@@ -108,6 +113,8 @@
|
||||
}
|
||||
}];
|
||||
self.subTitleLabel.hidden = ![[NIMSDK sharedSDK].userManager isUserInBlackList:self.userId];
|
||||
|
||||
self.reportButton.hidden = [self isSystemAccount];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#import "XPHtmlUrl.h"
|
||||
#import "XPSkillCardPlayerManager.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "XPConstant.h"
|
||||
///Model
|
||||
#import "MineSkillCardListInfoModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
@@ -145,6 +146,11 @@
|
||||
}
|
||||
|
||||
#pragma mark - 拉黑 移除黑名单
|
||||
- (BOOL)isSystemAccount {
|
||||
return [KeyWithType(KeyType_SecretaryUidKey) isEqualToString:[NSString stringWithFormat:@"%ld", self.uid]] || [KeyWithType(KeyType_SystemNotifiUidKey) isEqualToString:[NSString stringWithFormat:@"%ld", self.uid]] || [KeyWithType(KeyType_GuildUidKey) isEqualToString:[NSString stringWithFormat:@"%ld", self.uid]];
|
||||
}
|
||||
|
||||
|
||||
- (void)showRightNavHandle {
|
||||
NSMutableArray<TTActionSheetConfig *> *array = [NSMutableArray array];
|
||||
NSString *uid = [NSString stringWithFormat:@"%ld",self.uid];
|
||||
@@ -161,7 +167,7 @@
|
||||
|
||||
[array addObjectsFromArray:@[report, black]];
|
||||
|
||||
BOOL isInBlackList = [[NIMSDK sharedSDK].userManager isUserInBlackList:uid];
|
||||
BOOL isInBlackList = [[NIMSDK sharedSDK].userManager isUserInBlackList:uid] || [self isSystemAccount];
|
||||
if (isInBlackList) {
|
||||
[array removeObject:black];
|
||||
}
|
||||
|
@@ -11,6 +11,8 @@
|
||||
#import <SVGA.h>
|
||||
#import "XPMacro.h"
|
||||
#import "ThemeColor+Room.h"
|
||||
#import "CandyTreeResultModel.h"
|
||||
#import "NSObject+MJExtension.h"
|
||||
@interface XPRoomCandyGiftView ()
|
||||
///动画管理类
|
||||
@property (strong, nonatomic) SVGAParser *parser;
|
||||
@@ -65,12 +67,17 @@
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setCandyInfo:(NSDictionary *)candyInfo {
|
||||
if (candyInfo) {
|
||||
CandyTreeGiftInfoModel * giftInfo = [CandyTreeGiftInfoModel modelWithDictionary:candyInfo];
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
CGFloat fontSize = self.isMaxLargeGift ? 22 : 12;
|
||||
[attribute appendAttributedString:[self createAttribute:@"厉害了! " color:[UIColor whiteColor] fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:candyInfo[@"nick"] color:[ThemeColor messageNickColor] fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.nick color:[ThemeColor messageNickColor] fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:@"摘下糖果得 " color:[UIColor whiteColor] fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:candyInfo[@"prizeName"] color:[ThemeColor appEmphasizeColor] fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.prizeName color:[ThemeColor appEmphasizeColor] fontSize:fontSize]];
|
||||
if (giftInfo.prizeNum > 1) {
|
||||
[attribute appendAttributedString:[self createAttribute:[NSString stringWithFormat:@" X%d", giftInfo.prizeNum] color:[UIColor whiteColor] fontSize:fontSize]];
|
||||
}
|
||||
|
||||
if (self.isMaxLargeGift) {
|
||||
self.backImageView.hidden = YES;
|
||||
self.candyTreeView.hidden = NO;
|
||||
|
@@ -32,6 +32,12 @@ typedef NS_ENUM(NSInteger, CandyTreeGiftLevel) {
|
||||
@property (nonatomic, assign) NSInteger prizeId;
|
||||
///价格
|
||||
@property (nonatomic, assign) CGFloat platformValue;
|
||||
///送礼物的人
|
||||
@property (nonatomic,copy) NSString *uid;
|
||||
//送礼物的人所在的房间
|
||||
@property (nonatomic,copy) NSString *roomUid;
|
||||
///送礼物人的名称
|
||||
@property (nonatomic,copy) NSString *nick;
|
||||
@end
|
||||
|
||||
@interface CandyTreeResultModel : NSObject
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#import "GuildSuperAdminInfoModel.h"
|
||||
#import "RoomPKChooseUserModel.h"
|
||||
#import "RoomPKInfoModel.h"
|
||||
#import "CandyTreeResultModel.h"
|
||||
|
||||
#import "NetImageView.h"
|
||||
|
||||
@@ -558,17 +559,12 @@
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
//action
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"厉害了 " color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
NSInteger uid = 0;
|
||||
if ([attachment.data[@"uid"] isKindOfClass:[NSNumber class]]) {
|
||||
uid = ((NSNumber *)attachment.data[@"uid"]).integerValue;
|
||||
} else if ([attachment.data[@"uid"] isKindOfClass:[NSString class]]) {
|
||||
uid = ((NSString *)attachment.data[@"uid"]).integerValue;
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:attachment.data[@"nick"] color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
CandyTreeGiftInfoModel * giftInfo = [CandyTreeGiftInfoModel modelWithDictionary:attachment.data];
|
||||
[attribute appendAttributedString:[self createTextAttribute:giftInfo.nick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"摘下糖果获得" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:attachment.data[@"prizeName"] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@" x %@", attachment.data[@"prizeNum"]] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[self attributeAddHihtLight:attribute uid:uid];
|
||||
[attribute appendAttributedString:[self createTextAttribute:giftInfo.prizeName color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@" X %d", giftInfo.prizeNum] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
[self attributeAddHihtLight:attribute uid:giftInfo.uid.integerValue];
|
||||
return attribute;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user