暂时提交
This commit is contained in:
@@ -364,14 +364,15 @@
|
||||
[[QXGlobal shareGlobal] finishTask];
|
||||
[[QXRoomMessageManager shared] sendChatMessage:text messageType:(QXRoomMessageTypeText) needInsertMessage:YES];
|
||||
self.commentView.textField.text = @"";
|
||||
[self.vc.view endEditing:YES];
|
||||
|
||||
if (self.redpacketModel == nil) {
|
||||
[self.vc.view endEditing:YES];
|
||||
return;
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didSendMessage:redpacketModel:)]) {
|
||||
[self.delegate didSendMessage:text redpacketModel:self.redpacketModel];
|
||||
}
|
||||
self.redpacketModel = nil;
|
||||
[self.vc.view endEditing:YES];
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notification {
|
||||
@@ -395,7 +396,9 @@
|
||||
self.commentView.y = keyboardFrame.origin.y-TabbarContentHeight;
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)didResignFirstResponder{
|
||||
self.redpacketModel = nil;
|
||||
}
|
||||
-(QXDynamicCommentInputView *)commentView{
|
||||
if (!_commentView) {
|
||||
_commentView = [[QXDynamicCommentInputView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, TabbarContentHeight)];
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRedBagSendView : UIView
|
||||
@property (nonatomic,strong)NSString *room_id;
|
||||
-(void)showInView:(UIView*)view;
|
||||
-(void)hide;
|
||||
@end
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "QXRedBagSendView.h"
|
||||
#import <WebKit/WebKit.h>
|
||||
#import "QXMineNetwork.h"
|
||||
@interface QXRedBagSendView()<UITextFieldDelegate>
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||
@@ -36,7 +37,8 @@
|
||||
@property (nonatomic,strong)NSString *redBagContentType;
|
||||
/// 红包倒计时
|
||||
@property (nonatomic,strong)NSString *redBagTime;
|
||||
|
||||
/// 条件 0 无 1 收藏房间 2 仅麦上用户 多条件时用,隔开
|
||||
@property (nonatomic,strong)NSString *conditions;
|
||||
|
||||
|
||||
@property (nonatomic,strong)UIView* nextContentView;
|
||||
@@ -82,9 +84,14 @@
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
/// 默认普通红包
|
||||
self.redBagType = @"1";
|
||||
/// 默认金币红包
|
||||
self.redBagContentType = @"1";
|
||||
/// 默认立刻
|
||||
self.redBagTime = @"0";
|
||||
/// 无限制条件
|
||||
self.conditions = @"0";
|
||||
self.timeArray = @[@0,@1,@2,@5,@10];
|
||||
|
||||
self.bgView = [[UIView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-345)/2, (SCREEN_HEIGHT-454)/2, 345, 454)];
|
||||
@@ -680,6 +687,12 @@
|
||||
|
||||
#pragma mark - action
|
||||
-(void)nextAction{
|
||||
if (self.redBagType.intValue == 2) {
|
||||
if (![self.pwdTextField.text isExist]) {
|
||||
showToast(@"请输入口令");
|
||||
return;
|
||||
}
|
||||
}
|
||||
self.currentPage = 1;
|
||||
if (self.redBagContentType.intValue == 1) {
|
||||
self.moneyUnitLabel.text = @"金币";
|
||||
@@ -703,7 +716,32 @@
|
||||
}];
|
||||
}
|
||||
-(void)commitAction{
|
||||
|
||||
if (![self.moneyTextField.text isExist]) {
|
||||
showToast(@"请输入红包金额");
|
||||
return;
|
||||
}
|
||||
if (![self.countTextField.text isExist]) {
|
||||
showToast(@"请输入红包数量");
|
||||
return;
|
||||
}
|
||||
if (self.countTextField.text.longLongValue > self.moneyTextField.text.longLongValue) {
|
||||
showToast(@"红包数量不能大于红包金额");
|
||||
return;
|
||||
}
|
||||
self.conditions = @"1";
|
||||
[QXMineNetwork createRedpacketWithType:self.redBagType
|
||||
password:self.pwdTextField.text
|
||||
coin_type:self.redBagContentType
|
||||
total_amount:self.moneyTextField.text
|
||||
total_count:self.countTextField.text
|
||||
conditions:self.conditions
|
||||
countdown:self.redBagTime
|
||||
room_id:self.room_id
|
||||
successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)helpAction{
|
||||
@@ -761,6 +799,7 @@
|
||||
make.top.equalTo(self.firstTopView.mas_bottom).offset(12);
|
||||
}];
|
||||
self.redBagType = @"1";
|
||||
self.pwdTextField.text = @"";
|
||||
}else{
|
||||
self.pwdRedBagBtn.selected = YES;
|
||||
self.normalRedBagBtn.selected = NO;
|
||||
@@ -799,12 +838,14 @@
|
||||
self.noDrawAuthBtn.selected = YES;
|
||||
self.collectDrawAuthBtn.selected = NO;
|
||||
self.upSeatDrawAuthBtn.selected = NO;
|
||||
self.conditions = @"0";
|
||||
}else if (sender == self.collectDrawAuthBtn) {
|
||||
self.collectDrawAuthBtn.selected = !self.collectDrawAuthBtn.selected;
|
||||
if (self.upSeatDrawAuthBtn.selected || self.collectDrawAuthBtn.selected) {
|
||||
self.noDrawAuthBtn.selected = NO;
|
||||
}else{
|
||||
self.noDrawAuthBtn.selected = YES;
|
||||
self.conditions = @"0";
|
||||
}
|
||||
}else if (sender == self.upSeatDrawAuthBtn) {
|
||||
self.noDrawAuthBtn.selected = NO;
|
||||
@@ -813,6 +854,7 @@
|
||||
self.noDrawAuthBtn.selected = NO;
|
||||
}else{
|
||||
self.noDrawAuthBtn.selected = YES;
|
||||
self.conditions = @"0";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,19 +178,13 @@
|
||||
/// 暂时不需要房间补贴
|
||||
toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
}else{
|
||||
// toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
|
||||
/// 暂时不需要房间补贴
|
||||
toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
}
|
||||
|
||||
self.titles = @[QXText(@"房间类型"),QXText(@"常用工具"),QXText(@"更多操作")];
|
||||
@@ -200,8 +194,7 @@
|
||||
// 观众 更多操作 不区分麦上麦下
|
||||
roomTypeArr = @[];
|
||||
toolsArr = @[];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.redBag,self.roomVoiceSet,self.roomEffects,self.drifPop,self.roomReport];
|
||||
self.titles = @[QXText(@"更多操作")];
|
||||
}
|
||||
break;
|
||||
@@ -223,9 +216,7 @@
|
||||
toolsArr = @[self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
}
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
self.titles = @[QXText(@"房间类型"),QXText(@"常用工具"),QXText(@"更多操作")];
|
||||
}
|
||||
@@ -249,9 +240,7 @@
|
||||
}
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
self.titles = @[QXText(@"房间类型"),QXText(@"常用工具"),QXText(@"更多操作")];
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user