送礼余额不足弹首充弹窗或toast,未达到贵族等级时弹窗提示

This commit is contained in:
chenguilong
2022-01-18 16:07:30 +08:00
committed by fengshuo
parent a1e35aede2
commit 97fba11428
7 changed files with 154 additions and 5 deletions

View File

@@ -27,6 +27,7 @@
#import "XPGiftUsersView.h"
#import "XPGiftInfoView.h"
#import "XPGiftBarView.h"
#import "XPSendNobleGiftTipView.h"
///P
#import "XPGiftProtocol.h"
///VC
@@ -346,6 +347,31 @@
[self sendCustomMessage:receiveInfo oringinDic:originDic];
}
///
- (void)sendGiftFailWithCode:(NSInteger)code msg:(NSString *)msg {
if (code == 31005) {//
[self showNotSufficientFundsWithToast:msg];
} else if (code == 8535) {//
[TTPopup dismiss];
GiftInfoModel * giftInfo = self.giftInfoView.lastSelectGift;
XPSendNobleGiftTipView *view = [[XPSendNobleGiftTipView alloc] initWithFrame:CGRectMake(0, 0, 330, 150)];
view.giftName = giftInfo.giftName;
view.nobleName = giftInfo.giftVipInfo.vipName;
[TTPopup popupView:view style:TTPopupStyleAlert];
} else {
[XCHUDTool showErrorWithMessage:msg];
}
}
///
- (void)showNotSufficientFundsWithToast:(NSString *)msg {
if (self.delegate.getUserInfo.isFirstCharge) {
[TTPopup dismiss];
} else {
[XCHUDTool showErrorWithMessage:msg];
}
}
#pragma mark - Getters And Setters
- (void)setDelegate:(id<RoomHostDelegate>)delegate {
_delegate = delegate;