修复盲盒连送

This commit is contained in:
2025-10-04 18:31:00 +08:00
parent 367c5f3cea
commit b0bab1f1be
10 changed files with 54 additions and 20 deletions

View File

@@ -379,15 +379,16 @@
self.auctionId = @"";
/// 2
NSString *userId = [self.pitUserListView.selectedArray componentsJoinedByString:@","];
@weakify(self)
[QXMineNetwork roomSendGiftWithRoomId:self.roomId gift_id:self.giftModel.gift_id gift_num:self.giftCount to_uid:userId heart_id:self.heartId type:type pit_number:@"" successBlock:^(NSDictionary * _Nonnull dict) {
@strongify(self)
if (type.intValue == 1) {
if (weakSelf.roomSendSuccessBlock) {
weakSelf.roomSendSuccessBlock(self.type,weakSelf.giftModel,weakSelf.giftCount,userId,@"");
if (self.roomSendSuccessBlock) {
self.roomSendSuccessBlock(self.type,self.giftModel,self.giftCount,userId,@"");
}
[weakSelf hide];
[self hide];
}else{
[weakSelf.bagGiftView reloadData];
[self.bagGiftView reloadData];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg)
@@ -398,15 +399,17 @@
return;
}
self.heartId = @"";
@weakify(self)
/// 2
[QXMineNetwork roomAuctionJoinWithAuctionId:self.auctionId user_id:[QXGlobal shareGlobal].loginModel.user_id gift_id:self.giftModel.gift_id num:self.giftCount type:type successBlock:^(NSDictionary * _Nonnull dict) {
@strongify(self)
if (type.intValue == 1) {
[weakSelf hide];
if (weakSelf.roomSendSuccessBlock) {
weakSelf.roomSendSuccessBlock(weakSelf.type,weakSelf.giftModel,weakSelf.giftCount,[QXGlobal shareGlobal].loginModel.user_id,weakSelf.auctionId);
if (self.roomSendSuccessBlock) {
self.roomSendSuccessBlock(self.type,self.giftModel,self.giftCount,[QXGlobal shareGlobal].loginModel.user_id,self.auctionId);
}
[self hide];
}else{
[weakSelf.bagGiftView reloadData];
[self.bagGiftView reloadData];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
@@ -419,15 +422,18 @@
self.auctionId = @"";
/// 2
NSString *userId = [self.pitUserListView.selectedArray componentsJoinedByString:@","];
NSString *type = self.categoryView.selectedIndex==0?@"2":@"1";
// NSString *type = self.categoryView.selectedIndex==0?@"2":@"1";
@weakify(self)
[QXMineNetwork roomSendGiftWithRoomId:self.roomId gift_id:self.giftModel.gift_id gift_num:self.giftCount to_uid:userId heart_id:self.heartId type:type pit_number:@"" successBlock:^(NSDictionary * _Nonnull dict) {
@strongify(self)
if (type.intValue == 1) {
[weakSelf hide];
if (weakSelf.roomSendSuccessBlock) {
weakSelf.roomSendSuccessBlock(self.type,weakSelf.giftModel,weakSelf.giftCount,userId,weakSelf.heartId);
if (self.roomSendSuccessBlock) {
self.roomSendSuccessBlock(self.type,self.giftModel,self.giftCount,userId,self.heartId);
}
[self hide];
}else{
[weakSelf.bagGiftView reloadData];
[self.bagGiftView reloadData];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg)