优化提交
This commit is contained in:
@@ -154,9 +154,12 @@
|
||||
CGFloat height = [firsModel.content heightForFont:[UIFont systemFontOfSize:14] width:SCREEN_WIDTH-40-16*2-7];
|
||||
QXDynamicCommentHeaderView *header = [[QXDynamicCommentHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, height+12+40+7+3+9)];
|
||||
[header addTapBlock:^(id _Nonnull obj) {
|
||||
weakSelf.commentView.model = firsModel;
|
||||
weakSelf.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",firsModel.nickname];
|
||||
[weakSelf.commentView.textField becomeFirstResponder];
|
||||
// weakSelf.commentView.model = firsModel;
|
||||
// weakSelf.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",firsModel.nickname];
|
||||
// [weakSelf.commentView.textField becomeFirstResponder];
|
||||
UIPasteboard *p = [UIPasteboard generalPasteboard];
|
||||
p.string = [NSString stringWithFormat:@"%@", firsModel.content];
|
||||
showToast(@"已复制");
|
||||
}];
|
||||
header.delegate = self;
|
||||
header.model = firsModel;
|
||||
@@ -204,11 +207,11 @@
|
||||
if (indexPath.section == 0) {
|
||||
return;
|
||||
}
|
||||
QXDynamicCommentListModel *firsModel = self.dataArray[indexPath.section-1];
|
||||
QXDynamicCommentListModel *model = firsModel.replies[indexPath.row];
|
||||
self.commentView.model = model;
|
||||
self.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",model.nickname];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
// QXDynamicCommentListModel *firsModel = self.dataArray[indexPath.section-1];
|
||||
// QXDynamicCommentListModel *model = firsModel.replies[indexPath.row];
|
||||
// self.commentView.model = model;
|
||||
// self.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",model.nickname];
|
||||
// [self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
|
||||
-(void)didClickDeleteComment:(QXDynamicCommentListModel*)model{
|
||||
@@ -234,7 +237,9 @@
|
||||
}
|
||||
|
||||
-(void)didClickReplyComment:(QXDynamicCommentListModel*)model{
|
||||
|
||||
self.commentView.model = model;
|
||||
self.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",model.nickname];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
#pragma mark - 评论
|
||||
-(void)didClickSendWithText:(NSString*)text model:(nonnull QXDynamicCommentListModel *)model{
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
@property (nonatomic,strong)NSString *giftCount;
|
||||
|
||||
@property (nonatomic,strong)QXSendGiftCollectionView *bagGiftView;
|
||||
|
||||
@property (nonatomic,strong)NSString *giftBagPrice;
|
||||
@property (nonatomic,strong)NSString *coin;
|
||||
@end
|
||||
|
||||
@implementation QXSendGiftView
|
||||
@@ -353,7 +356,7 @@
|
||||
}
|
||||
NSString *userId = [self.pitUserListView.selectedArray componentsJoinedByString:@","];
|
||||
MJWeakSelf
|
||||
[QXMineNetwork roomBagGiftClearWithRoomId:self.roomId userId:userId heartId:self.heartId successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[QXMineNetwork roomBagGiftClearWithRoomId:self.roomId userId:userId heartId:self.heartId auction_id:self.auctionId successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[weakSelf hide];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
@@ -514,10 +517,12 @@
|
||||
[QXMineNetwork giftLabelSuccessBlock:^(NSArray<QXGiftLabelModel *> * _Nonnull list) {
|
||||
[weakSelf.titles removeAllObjects];
|
||||
[weakSelf.titles addObjectsFromArray:list];
|
||||
QXGiftLabelModel *md = [[QXGiftLabelModel alloc] init];
|
||||
md.name = @"背包";
|
||||
md.id = @"-10";
|
||||
[weakSelf.titles insertObject:md atIndex:0];
|
||||
if (self.type != QXSendGiftViewTypeFind) {
|
||||
QXGiftLabelModel *md = [[QXGiftLabelModel alloc] init];
|
||||
md.name = @"背包";
|
||||
md.id = @"-10";
|
||||
[weakSelf.titles insertObject:md atIndex:0];
|
||||
}
|
||||
NSMutableArray *arr = [NSMutableArray array];
|
||||
for (QXGiftLabelModel*md in weakSelf.titles) {
|
||||
[arr addObject:md.name];
|
||||
@@ -537,10 +542,17 @@
|
||||
MJWeakSelf
|
||||
[QXMineNetwork getWalletInfoSuccessBlock:^(NSString * _Nonnull coin, NSString * _Nonnull earnings, NSString * _Nonnull title, NSString * _Nonnull url) {
|
||||
weakSelf.cornLabel.text = coin;
|
||||
weakSelf.coin = coin;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
self.rechargeBtn.hidden = !QXGlobal.shareGlobal.isOpenRecharge;
|
||||
|
||||
[QXMineNetwork roomGiftBagPricesuccessBlock:^(NSString * _Nonnull price) {
|
||||
weakSelf.giftBagPrice = price;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@@ -553,8 +565,12 @@
|
||||
// }
|
||||
if (index == 0) {
|
||||
self.sendAllBtn.hidden = NO;
|
||||
self.cornLabel.text = self.giftBagPrice;
|
||||
self.rechargeBtn.hidden = YES;
|
||||
}else{
|
||||
self.cornLabel.text = self.coin;
|
||||
self.sendAllBtn.hidden = YES;
|
||||
self.rechargeBtn.hidden = !QXGlobal.shareGlobal.isOpenRecharge;
|
||||
}
|
||||
}
|
||||
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
|
||||
@@ -1099,10 +1115,13 @@
|
||||
}
|
||||
-(void)setPitModel:(QXRoomPitModel *)pitModel{
|
||||
_pitModel = pitModel;
|
||||
[self.selectedBtn setTitle:pitModel.nickname forState:(UIControlStateNormal)];
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:pitModel.avatar] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
if (pitModel.pit_number.intValue == 9) {
|
||||
self.selectedBtn.hidden = NO;
|
||||
[self.selectedBtn setTitle:QXText(@"主持人") forState:(UIControlStateNormal)];
|
||||
}else if (pitModel.pit_number.intValue == 10) {
|
||||
self.selectedBtn.hidden = NO;
|
||||
[self.selectedBtn setTitle:QXText(@"嘉宾") forState:(UIControlStateNormal)];
|
||||
}else{
|
||||
if (pitModel.pit_number.intValue > 0) {
|
||||
@@ -1114,9 +1133,9 @@
|
||||
[self.selectedBtn setTitle:[NSString localizedStringWithFormat:QXText(@"%@号麦"),pitModel.pit_number] forState:(UIControlStateNormal)];
|
||||
}
|
||||
}else{
|
||||
self.selectedBtn.hidden = YES;
|
||||
self.selectedBtn.hidden = NO;
|
||||
[self.selectedBtn setTitle:pitModel.nickname forState:(UIControlStateNormal)];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (pitModel.isSelected) {
|
||||
|
||||
@@ -179,6 +179,7 @@
|
||||
self.rightBtn = [[UIButton alloc] init];
|
||||
[self.rightBtn setImage:[UIImage imageNamed:@"login_agreement_sel"] forState:(UIControlStateSelected)];
|
||||
[self.rightBtn setImage:[UIImage imageNamed:@"login_agreement_nor"] forState:(UIControlStateNormal)];
|
||||
self.rightBtn.userInteractionEnabled = NO;
|
||||
[self.contentView addSubview:self.rightBtn];
|
||||
[self.rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-16);
|
||||
|
||||
Reference in New Issue
Block a user