提交
This commit is contained in:
@@ -32,6 +32,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)UILabel *statusLabel;
|
||||
|
||||
|
||||
@property (nonatomic,strong)UIImageView *redpacketImageView;
|
||||
|
||||
|
||||
@property (nonatomic,assign)NSInteger rankNumber;
|
||||
@property (nonatomic,strong)QXRoomHourRankSubModel *model;
|
||||
@end
|
||||
|
||||
@@ -246,7 +246,18 @@
|
||||
make.width.height.mas_equalTo(12);
|
||||
}];
|
||||
|
||||
self.redpacketImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"redbag_tag_icon"]];
|
||||
[self.contentView addSubview:self.redpacketImageView];
|
||||
[self.redpacketImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.right.mas_equalTo(-5);
|
||||
make.centerY.equalTo(self.contentView);
|
||||
make.width.mas_equalTo(60);
|
||||
make.height.mas_equalTo(60);
|
||||
}];
|
||||
|
||||
|
||||
self.activityBgView = [[UIView alloc] init];
|
||||
self.activityBgView.hidden = YES;
|
||||
[self.contentView addSubview:self.activityBgView];
|
||||
[self.activityBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.right.mas_equalTo(-5);
|
||||
@@ -353,17 +364,22 @@
|
||||
self.nameLabel.text = model.room_name;
|
||||
[self.labelImageView sd_setImageWithURL:[NSURL URLWithString:model.label_icon]];
|
||||
self.hotLabel.text = [NSString qx_showHotCountNum:model.total_price.longLongValue];
|
||||
if (model.xlh_status == 0) {
|
||||
self.activityBgView.hidden = YES;
|
||||
}else if (model.xlh_status == 2){
|
||||
self.activityBgView.hidden = NO;
|
||||
self.activityStatusBgImageView.image = [UIImage imageNamed:@"activity_status_will"];
|
||||
self.statusLabel.text = @"即将开始";
|
||||
if (model.redpacket_status > 0) {
|
||||
self.redpacketImageView.hidden = NO;
|
||||
}else{
|
||||
self.activityBgView.hidden = NO;
|
||||
self.activityStatusBgImageView.image = [UIImage imageNamed:@"activity_status_ing"];
|
||||
self.statusLabel.text = @"进行中";
|
||||
self.redpacketImageView.hidden = YES;
|
||||
}
|
||||
// if (model.xlh_status == 0) {
|
||||
// self.activityBgView.hidden = YES;
|
||||
// }else if (model.xlh_status == 2){
|
||||
// self.activityBgView.hidden = NO;
|
||||
// self.activityStatusBgImageView.image = [UIImage imageNamed:@"activity_status_will"];
|
||||
// self.statusLabel.text = @"即将开始";
|
||||
// }else{
|
||||
// self.activityBgView.hidden = NO;
|
||||
// self.activityStatusBgImageView.image = [UIImage imageNamed:@"activity_status_ing"];
|
||||
// self.statusLabel.text = @"进行中";
|
||||
// }
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
}
|
||||
-(void)inputMessageWithName:(NSString *)message redpacketModel:(QXRedPacketModel*)redpacketModel{
|
||||
self.redpacketModel = redpacketModel;
|
||||
self.commentView.textField.text = [NSString stringWithFormat:@"%@",message];
|
||||
self.commentView.textField.text = [NSString stringWithFormat:@"#口令红包 %@",message];
|
||||
[self.vc.view addSubview:self.commentView];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
@@ -369,8 +369,11 @@
|
||||
[self.vc.view endEditing:YES];
|
||||
return;
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didSendMessage:redpacketModel:)]) {
|
||||
[self.delegate didSendMessage:text redpacketModel:self.redpacketModel];
|
||||
NSString*password = [NSString stringWithFormat:@"#口令红包 %@",self.redpacketModel.password];
|
||||
if ([text isEqualToString:password]) {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didSendMessage:redpacketModel:)]) {
|
||||
[self.delegate didSendMessage:text redpacketModel:self.redpacketModel];
|
||||
}
|
||||
}
|
||||
[self.vc.view endEditing:YES];
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
/// 抢红包必须在本房间内
|
||||
@property (nonatomic,strong)UILabel *bottomLabel;
|
||||
@property (nonatomic,assign)QXRedBagDrawType drawType;
|
||||
@property (nonatomic,assign)BOOL isDrawNet;
|
||||
|
||||
@end
|
||||
@implementation QXRedBagDrawView
|
||||
@@ -250,7 +251,7 @@
|
||||
self.remarkLabel.text = redpacketModel.remark;
|
||||
[self.userHeaderImageView sd_setImageWithURL:[NSURL URLWithString:redpacketModel.avatar]];
|
||||
self.userNameLabel.text = [NSString stringWithFormat:@"%@的红包",redpacketModel.nickname];
|
||||
self.commentTitleLabel.text = [NSString stringWithFormat:@"发送评论%@",redpacketModel.password];
|
||||
self.commentTitleLabel.text = [NSString stringWithFormat:@"发送评论:%@",redpacketModel.password];
|
||||
if (redpacketModel.type.intValue == 2) {
|
||||
self.pwdImageView.hidden = NO;
|
||||
}else{
|
||||
@@ -366,9 +367,14 @@
|
||||
|
||||
-(void)openAction{
|
||||
MJWeakSelf
|
||||
if (self.isDrawNet) {
|
||||
return;
|
||||
}
|
||||
self.isDrawNet = YES;
|
||||
[QXMineNetwork drawRedpacketWithRedpacketId:self.redpacketModel.redpacket_id successBlock:^(NSString * _Nonnull code) {
|
||||
weakSelf.isDrawNet = NO;
|
||||
weakSelf.redpacketModel.is_qiang = @"1";
|
||||
if (code.intValue == 1) {
|
||||
weakSelf.redpacketModel.is_qiang = @"1";
|
||||
QXRedBagRecordViewController *vc = [[QXRedBagRecordViewController alloc] init];
|
||||
vc.redbagId = weakSelf.redpacketModel.redpacket_id;
|
||||
[weakSelf.viewController.navigationController pushViewController:vc animated:YES];
|
||||
@@ -383,6 +389,7 @@
|
||||
[weakSelf setType:QXRedBagDrawTypeFinished];
|
||||
}
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
weakSelf.isDrawNet = NO;
|
||||
showToast(msg);
|
||||
}];
|
||||
// CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
|
||||
@@ -414,7 +421,7 @@
|
||||
}
|
||||
-(void)recordAction{
|
||||
QXRedBagRecordViewController *vc = [[QXRedBagRecordViewController alloc] init];
|
||||
vc.redbagId = @"";
|
||||
vc.redbagId = self.redpacketModel.redpacket_id;
|
||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||
[self hide];
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
|
||||
/// 是否为规则页面返回
|
||||
@property (nonatomic,assign)BOOL isFromRule;
|
||||
@property (nonatomic,assign)BOOL isSendNet;
|
||||
@end
|
||||
|
||||
@implementation QXRedBagSendView
|
||||
@@ -744,6 +745,10 @@
|
||||
showToast(@"红包数量不能大于红包金额");
|
||||
return;
|
||||
}
|
||||
if (self.isSendNet) {
|
||||
return;
|
||||
}
|
||||
self.isSendNet = YES;
|
||||
[QXMineNetwork createRedpacketWithType:self.redBagType
|
||||
password:self.pwdTextField.text
|
||||
coin_type:self.redBagContentType
|
||||
@@ -754,9 +759,11 @@
|
||||
room_id:self.room_id
|
||||
remark:self.remarkTextField.text
|
||||
successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
self.isSendNet = NO;
|
||||
showToast(@"发送成功");
|
||||
[self hide];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
self.isSendNet = NO;
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user