修正审核问题,适配后端修改
This commit is contained in:
@@ -252,7 +252,6 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
} else {
|
||||
make.width.height.mas_equalTo(29);
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
UILabel *titleLabel_1 = [UILabel labelInitWithText:YMLocalizedString(@"Combo_0") font:kFontSemibold(14) textColor:[UIColor whiteColor]];
|
||||
@@ -271,7 +270,7 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
UILabel *titleLabel_2 = [UILabel labelInitWithText:YMLocalizedString(@"Combo_4") font:kFontSemibold(14) textColor:[UIColor whiteColor]];
|
||||
[self addSubview:titleLabel_2];
|
||||
[titleLabel_2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.avatarImageView.mas_bottom).offset(3);
|
||||
make.bottom.mas_equalTo(self.avatarImageView.mas_bottom);
|
||||
make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(5);
|
||||
}];
|
||||
|
||||
|
@@ -682,8 +682,10 @@ XPRoomGraffitiGiftAnimationViewDelegate
|
||||
if (flagModel.roomId != roomInfo.roomId || flagModel.uid != [AccountInfoStorage instance].getUid.integerValue) {
|
||||
return;
|
||||
}
|
||||
// 数据同步到 combo
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"receiveLuckGiftWinning" object:[NSString stringByRemovingRedundantZeros:@(flagModel.receiverProfit).stringValue]];
|
||||
if ([flagModel.receiverUidList containsObject:@([AccountInfoStorage instance].getUid.integerValue)]) {
|
||||
// 数据同步到 combo
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"receiveLuckGiftWinning" object:[NSString stringByRemovingRedundantZeros:@(flagModel.receiverProfit).stringValue]];
|
||||
}
|
||||
|
||||
if (!self.hostDelegate.getRoomInfo.hasAnimationEffect) {
|
||||
return;
|
||||
@@ -696,7 +698,7 @@ XPRoomGraffitiGiftAnimationViewDelegate
|
||||
[self loadBroveSVGAVideoItem:level.integerValue];
|
||||
}
|
||||
if (coins) {
|
||||
// [[NSNotificationCenter defaultCenter] postNotificationName:@"receiveLuckGiftWinning" object:[NSString stringByRemovingRedundantZeros:coins.stringValue]];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"receiveLuckGiftWinning" object:[NSString stringByRemovingRedundantZeros:coins.stringValue]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -729,6 +729,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
@(CustomMessageType_Super_Gift):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Super_Gift),
|
||||
@(Custom_Message_Sub_Super_Gift_Room_Message),
|
||||
nil],
|
||||
};
|
||||
}
|
||||
|
@@ -470,24 +470,7 @@
|
||||
self.actionCallback(ComboAction_Error);
|
||||
}
|
||||
[self forceRemove];
|
||||
|
||||
NSMutableDictionary *logDic = [dic mutableCopy];
|
||||
[logDic setObject:@(self.combo) forKey:@"combo_count"];
|
||||
[logDic setObject:[NSThread callStackSymbols] forKey:@"call stack symbols"];
|
||||
BLYLog(BuglyLogLevelWarn, @"%@", [logDic toJSONString]);
|
||||
[Bugly reportError:[NSError errorWithDomain:[NSString stringWithFormat:@"combo 发送礼物异常-%@",
|
||||
@(code)]
|
||||
code:[AccountInfoStorage instance].getUid.integerValue
|
||||
userInfo:logDic]];
|
||||
}
|
||||
// TODO: 聚合到 skill card manager
|
||||
// [Bugly reportExceptionWithCategory:263059
|
||||
// name:[NSString stringWithFormat:@"combo 发送礼物异常-%@",
|
||||
// @(code)]
|
||||
// reason:msg
|
||||
// callStack:[NSThread callStackSymbols]
|
||||
// extraInfo:logDic
|
||||
// terminateApp:NO];
|
||||
}
|
||||
targetUids:allUIDs
|
||||
giftNum:self.giftNumPerTimes
|
||||
|
@@ -125,30 +125,6 @@
|
||||
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
[[self getView] sendGiftFailWithCode:code msg:msg];
|
||||
|
||||
NSMutableDictionary *logDic = [@{
|
||||
@"targetUids":targetUids,
|
||||
@"giftNum":giftNum,
|
||||
@"sendType":@(sendType),
|
||||
@"giftSource":@(giftSource),
|
||||
@"giftId":giftId,
|
||||
@"roomSendType":@(roomSendType),
|
||||
@"roomUid":roomUid,
|
||||
@"msg":msg,
|
||||
@"call stack symbols":[NSThread callStackSymbols]
|
||||
} mutableCopy];
|
||||
BLYLog(BuglyLogLevelWarn, @"%@", [logDic toJSONString]);
|
||||
[Bugly reportError:[NSError errorWithDomain:[NSString stringWithFormat:@"面版 发送礼物异常-%@",
|
||||
@(code)]
|
||||
code:[AccountInfoStorage instance].getUid.integerValue
|
||||
userInfo:logDic]];
|
||||
// [Bugly reportExceptionWithCategory:263059
|
||||
// name:[NSString stringWithFormat:@"combo 发送礼物异常-%@",
|
||||
// @(code)]
|
||||
// reason:msg
|
||||
// callStack:[NSThread callStackSymbols]
|
||||
// extraInfo:logDic
|
||||
// terminateApp:NO];
|
||||
}] targetUids:targetUids giftNum:giftNum sendType:giftSendTypeStr giftId:giftId giftSource:giftSourceStr giftType:giftTypeStr roomUid:roomUid msg:msg uid:uid];
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GiftComboView : UIView
|
||||
- (void)setupCurrentGold:(double)gold;
|
||||
- (void)updateCurrentGold:(double)gold giftPrice:(double)price isFromWinning:(BOOL)isFromWinning isBravo:(BOOL)isBrove;
|
||||
- (void)updateCurrentGold:(double)gold giftPrice:(double)price isFromWinning:(BOOL)isFromWinning isUpdateTotal:(BOOL)isBrove;
|
||||
- (void)updateCount;
|
||||
- (void)stopTimer;
|
||||
- (void)endCombo;
|
||||
|
@@ -108,7 +108,7 @@
|
||||
|
||||
- (void)handleStringNotification:(NSString *)coin {
|
||||
if (![NSString isEmpty:coin]) {
|
||||
[self updateCurrentGold:coin.doubleValue giftPrice:0 isFromWinning:YES isBravo:YES];
|
||||
[self updateCurrentGold:coin.doubleValue giftPrice:0 isFromWinning:YES isUpdateTotal:NO];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
double coin = [[dic objectForKey:@"CurrentGold"] doubleValue];
|
||||
double price = [[dic objectForKey:@"Price"] doubleValue];
|
||||
BOOL isFromWinning = [[dic objectForKey:@"isFromWinning"] boolValue];
|
||||
[self updateCurrentGold:coin giftPrice:price isFromWinning:isFromWinning isBravo:YES];
|
||||
[self updateCurrentGold:coin giftPrice:price isFromWinning:isFromWinning isUpdateTotal:YES];
|
||||
}
|
||||
|
||||
- (void)updateCount {
|
||||
@@ -247,7 +247,6 @@
|
||||
|
||||
#pragma mark -
|
||||
- (void)setupCurrentGold:(double)gold {
|
||||
|
||||
self.comboGoldNum = gold;
|
||||
self.comboGoldLabel.text = @(gold).stringValue;
|
||||
}
|
||||
@@ -275,13 +274,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateCurrentGold:(double)gold giftPrice:(double)price isFromWinning:(BOOL)isFromWinning isBravo:(BOOL)isBrove {
|
||||
- (void)updateCurrentGold:(double)gold giftPrice:(double)price isFromWinning:(BOOL)isFromWinning isUpdateTotal:(BOOL)isUpdateTotal {
|
||||
NSString *goldString = isFromWinning ? [NSString stringWithFormat:@"+ %@", @(gold)] : @(-price).stringValue;
|
||||
if (isFromWinning) {
|
||||
// if (!isBrove) {
|
||||
double updateGold = self.comboGoldNum + gold;
|
||||
[self setupCurrentGold:updateGold];
|
||||
// }
|
||||
double updateGold = isUpdateTotal ? self.comboGoldNum + gold : self.comboGoldNum;
|
||||
[self setupCurrentGold:updateGold];
|
||||
} else {
|
||||
// double updateGold = self.comboGoldNum + gold;
|
||||
[self setupCurrentGold:gold];
|
||||
|
@@ -71,7 +71,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
|
||||
@property (nonatomic, strong) PIGiftBravoGiftBroadcastView *bravoGiftView;
|
||||
///超级礼物
|
||||
@property(nonatomic,strong) PIGiftSuperGiftBroadcastView *superGiftView;
|
||||
//@property(nonatomic,strong) PIGiftSuperGiftBroadcastView *superGiftView;
|
||||
///礼物类型(普通/互动)
|
||||
@property (nonatomic, strong) XPGiftHeadTypeView *headTypeView;
|
||||
///送礼物的人
|
||||
@@ -157,15 +157,18 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
switch (type) {
|
||||
case ComboAction_ShowPanel: {
|
||||
self.contentView.hidden = YES;
|
||||
if (self->_superGiftView) {
|
||||
self.superGiftView.hidden = YES;
|
||||
}
|
||||
// if (self->_superGiftView) {
|
||||
// self.superGiftView.hidden = YES;
|
||||
// }
|
||||
if (self->_constellationBanner) {
|
||||
self.constellationBanner.hidden = YES;
|
||||
}
|
||||
if (self->_luckyBroadcastView) {
|
||||
self.luckyBroadcastView.hidden = YES;
|
||||
}
|
||||
if (self->_bravoGiftView) {
|
||||
self.bravoGiftView.hidden = YES;
|
||||
}
|
||||
[self.view addSubview:self.comboView];
|
||||
[self.comboView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
@@ -174,16 +177,18 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
break;
|
||||
case ComboAction_RemovePanel:{
|
||||
self.contentView.hidden = NO;
|
||||
if (self->_superGiftView) {
|
||||
self.superGiftView.hidden = NO;
|
||||
}
|
||||
// if (self->_superGiftView) {
|
||||
// self.superGiftView.hidden = NO;
|
||||
// }
|
||||
if (self->_constellationBanner) {
|
||||
self.constellationBanner.hidden = NO;
|
||||
}
|
||||
if (self->_luckyBroadcastView) {
|
||||
self.luckyBroadcastView.hidden = NO;
|
||||
}
|
||||
|
||||
if (self->_bravoGiftView) {
|
||||
self.bravoGiftView.hidden = NO;
|
||||
}
|
||||
[self.presenter getUserWalletInfo];
|
||||
|
||||
[self.comboView stopTimer];
|
||||
@@ -474,9 +479,9 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
//构造会话
|
||||
NIMSession *session = [NIMSession session:sessionID type:sessionType];
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session completion:^(NSError * _Nullable error) {
|
||||
// if (error) {
|
||||
// NSLog(@"%@",error);
|
||||
// }
|
||||
if (error) {
|
||||
NSLog(@"%@",error);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -748,7 +753,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
///点击了礼物
|
||||
- (void)xPGiftHeadTypeViewDidClickGift:(XPGiftHeadTypeView *)view {
|
||||
[self.luckyBroadcastView removeFromSuperview];
|
||||
[self.superGiftView removeFromSuperview];
|
||||
// [self.superGiftView removeFromSuperview];
|
||||
[self.bravoGiftView removeFromSuperview];
|
||||
// [self.giftInfoView giftHeadTypeHadChange:1];
|
||||
if (!self.graffitiView.hidden) {//清空涂鸦礼物
|
||||
@@ -763,7 +768,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
///点击了互动
|
||||
- (void)xPGiftHeadTypeViewDidClickInteraction:(XPGiftHeadTypeView *)view {
|
||||
[self.luckyBroadcastView removeFromSuperview];
|
||||
[self.superGiftView removeFromSuperview];
|
||||
// [self.superGiftView removeFromSuperview];
|
||||
[self.bravoGiftView removeFromSuperview];
|
||||
// [self.giftInfoView giftHeadTypeHadChange:2];
|
||||
}
|
||||
@@ -775,7 +780,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
self.giftBarView.userInfo = [self.delegate getUserInfo];
|
||||
self.giftBarView.type = type;
|
||||
self.giftBarView.drawGiftCount = 10;
|
||||
[self.superGiftView removeFromSuperview];
|
||||
// [self.superGiftView removeFromSuperview];
|
||||
[self.luckyBroadcastView removeFromSuperview];
|
||||
[self.bravoGiftView removeFromSuperview];
|
||||
[self.constellationBanner removeFromSuperview];
|
||||
@@ -804,15 +809,15 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
}
|
||||
break;
|
||||
case GiftSegmentType_SuperLucky: {
|
||||
if (!self.superGiftView.superview) {
|
||||
self.superGiftView.giftModel = self.giftInfoView.lastSelectGift;
|
||||
[self.view addSubview:self.superGiftView];
|
||||
[self.superGiftView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.contentView.mas_top);
|
||||
make.leading.trailing.mas_equalTo(0);
|
||||
make.height.mas_equalTo(kGetScaleWidth(90));
|
||||
}];
|
||||
}
|
||||
// if (!self.superGiftView.superview) {
|
||||
// self.superGiftView.giftModel = self.giftInfoView.lastSelectGift;
|
||||
// [self.view addSubview:self.superGiftView];
|
||||
// [self.superGiftView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.bottom.mas_equalTo(self.contentView.mas_top);
|
||||
// make.leading.trailing.mas_equalTo(0);
|
||||
// make.height.mas_equalTo(kGetScaleWidth(90));
|
||||
// }];
|
||||
// }
|
||||
}
|
||||
break;
|
||||
case GiftSegmentType_WeekStar: {
|
||||
@@ -846,7 +851,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
switch (type) {
|
||||
case GiftSegmentType_Bravo:
|
||||
[self.constellationBanner removeFromSuperview];
|
||||
[self.superGiftView removeFromSuperview];
|
||||
// [self.superGiftView removeFromSuperview];
|
||||
[self.luckyBroadcastView removeFromSuperview];
|
||||
if (!self.bravoGiftView.superview) {
|
||||
[self.view addSubview:self.bravoGiftView];
|
||||
@@ -860,7 +865,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
case GiftSegmentType_Lucky:{
|
||||
[self.bravoGiftView removeFromSuperview];
|
||||
[self.constellationBanner removeFromSuperview];
|
||||
[self.superGiftView removeFromSuperview];
|
||||
// [self.superGiftView removeFromSuperview];
|
||||
if (!self.luckyBroadcastView.superview) {
|
||||
[self.view addSubview:self.luckyBroadcastView];
|
||||
[self.luckyBroadcastView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -875,15 +880,15 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
[self.bravoGiftView removeFromSuperview];
|
||||
[self.constellationBanner removeFromSuperview];
|
||||
[self.luckyBroadcastView removeFromSuperview];
|
||||
self.superGiftView.giftModel = info;
|
||||
if (!self.superGiftView.superview) {
|
||||
[self.view addSubview:self.superGiftView];
|
||||
[self.superGiftView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.contentView.mas_top);
|
||||
make.leading.trailing.mas_equalTo(0);
|
||||
make.height.mas_equalTo(kGetScaleWidth(90));
|
||||
}];
|
||||
}
|
||||
// self.superGiftView.giftModel = info;
|
||||
// if (!self.superGiftView.superview) {
|
||||
// [self.view addSubview:self.superGiftView];
|
||||
// [self.superGiftView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.bottom.mas_equalTo(self.contentView.mas_top);
|
||||
// make.leading.trailing.mas_equalTo(0);
|
||||
// make.height.mas_equalTo(kGetScaleWidth(90));
|
||||
// }];
|
||||
// }
|
||||
}
|
||||
break;
|
||||
case GiftSegmentType_Graffiti: {
|
||||
@@ -1236,13 +1241,13 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
}
|
||||
return _effectView;
|
||||
}
|
||||
- (PIGiftSuperGiftBroadcastView *)superGiftView{
|
||||
if(!_superGiftView){
|
||||
_superGiftView = [[PIGiftSuperGiftBroadcastView alloc]initWithFrame:CGRectZero];
|
||||
_superGiftView.delegate = self;
|
||||
}
|
||||
return _superGiftView;
|
||||
}
|
||||
//- (PIGiftSuperGiftBroadcastView *)superGiftView{
|
||||
// if(!_superGiftView){
|
||||
// _superGiftView = [[PIGiftSuperGiftBroadcastView alloc]initWithFrame:CGRectZero];
|
||||
// _superGiftView.delegate = self;
|
||||
// }
|
||||
// return _superGiftView;
|
||||
//}
|
||||
|
||||
- (PIGiftBravoGiftBroadcastView *)bravoGiftView {
|
||||
if (!_bravoGiftView) {
|
||||
|
Reference in New Issue
Block a user