送礼余额不足弹首充弹窗或toast,未达到贵族等级时弹窗提示
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user