助力成功
This commit is contained in:
@@ -629,6 +629,7 @@
|
||||
E82325FC274E4735003A3332 /* XPUserCardItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325FB274E4735003A3332 /* XPUserCardItemModel.m */; };
|
||||
E8232600274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325FF274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m */; };
|
||||
E8232603274E4AA0003A3332 /* ThemeColor+UserCard.m in Sources */ = {isa = PBXBuildFile; fileRef = E8232602274E4AA0003A3332 /* ThemeColor+UserCard.m */; };
|
||||
E823E38E290BE8BD00EADD86 /* WishGiftInfoUpdateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E823E38D290BE8BD00EADD86 /* WishGiftInfoUpdateModel.m */; };
|
||||
E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */; };
|
||||
E824543826F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543726F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m */; };
|
||||
E824543A26F5880E00BE8163 /* XPLoginVerifBindPhoneProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824543926F5822800BE8163 /* XPLoginVerifBindPhoneProtocol.h */; };
|
||||
@@ -2314,6 +2315,8 @@
|
||||
E82325FF274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardItemCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E8232601274E4AA0003A3332 /* ThemeColor+UserCard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+UserCard.h"; sourceTree = "<group>"; };
|
||||
E8232602274E4AA0003A3332 /* ThemeColor+UserCard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+UserCard.m"; sourceTree = "<group>"; };
|
||||
E823E38C290BE8BD00EADD86 /* WishGiftInfoUpdateModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WishGiftInfoUpdateModel.h; sourceTree = "<group>"; };
|
||||
E823E38D290BE8BD00EADD86 /* WishGiftInfoUpdateModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WishGiftInfoUpdateModel.m; sourceTree = "<group>"; };
|
||||
E824543326F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhoneViewController.h; sourceTree = "<group>"; };
|
||||
E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginVerifBindPhoneViewController.m; sourceTree = "<group>"; };
|
||||
E824543626F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhonePresenter.h; sourceTree = "<group>"; };
|
||||
@@ -7421,6 +7424,8 @@
|
||||
E8A3539328FE605F0014A784 /* WishGiftUserModel.m */,
|
||||
E89DCF5B2900E5EE001647EC /* WishGiftHistoryModel.h */,
|
||||
E89DCF5C2900E5EE001647EC /* WishGiftHistoryModel.m */,
|
||||
E823E38C290BE8BD00EADD86 /* WishGiftInfoUpdateModel.h */,
|
||||
E823E38D290BE8BD00EADD86 /* WishGiftInfoUpdateModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -9219,6 +9224,7 @@
|
||||
9B1EF3D527E8294B00554295 /* XPMineDressEmptyCollectionViewCell.m in Sources */,
|
||||
E890BC07273CF1800007C46B /* XPGiftCountCollectionViewCell.m in Sources */,
|
||||
E88C72A02828FCD40047FB2B /* XPMusicLibraryPlayView.m in Sources */,
|
||||
E823E38E290BE8BD00EADD86 /* WishGiftInfoUpdateModel.m in Sources */,
|
||||
E80EC80A28ACD84000D133C5 /* QEmotionBoardView.m in Sources */,
|
||||
E8C1670C28067DED00ECB15C /* XPMineGuildChooseManagerViewController.m in Sources */,
|
||||
E8998D962859DD6F00C68558 /* UIView+Corner.m in Sources */,
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#import "Api+Room.h"
|
||||
#import "Api+WishGift.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
#import "NSObject+MJExtension.h"
|
||||
///Model
|
||||
#import "RoomInfoModel.h"
|
||||
#import "MicroQueueModel.h"
|
||||
@@ -50,6 +51,7 @@
|
||||
#import "RoomPKTeamModel.h"
|
||||
#import "RoomNewUserGreetModel.h"
|
||||
#import "WishGiftInfoModel.h"
|
||||
#import "WishGiftInfoUpdateModel.h"
|
||||
///View
|
||||
#import "XPRoomHalfWebView.h"
|
||||
#import "XPAnchorAudienceUpMicView.h"
|
||||
@@ -1739,8 +1741,8 @@
|
||||
|
||||
- (void)handleWishGiftMessage:(AttachmentModel *)attachment {
|
||||
if (attachment.second == Custom_Message_Sub_Wish_Gift_Open || attachment.second == Custom_Message_Sub_Wish_Gift_Update) {
|
||||
NSArray * array = [WishGiftInfoModel modelsWithArray:attachment.data[@"gifts"]];
|
||||
self.wishGiftView.giftList = array;
|
||||
WishGiftInfoUpdateModel * model = [WishGiftInfoUpdateModel modelWithJSON:attachment.data];
|
||||
self.wishGiftView.giftList = model.gifts;
|
||||
if (!self.wishGiftView.superview) {
|
||||
[self addSubview:self.wishGiftView];
|
||||
[self.wishGiftView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -1749,11 +1751,15 @@
|
||||
make.size.mas_equalTo(CGSizeMake(81, 30));
|
||||
}];
|
||||
}
|
||||
[self.wishGiftVC getWishGiftListSuccess:array];
|
||||
[self.wishGiftVC getWishGiftListSuccess:model.gifts];
|
||||
|
||||
if (self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {
|
||||
self.wishGiftView.hidden = YES;
|
||||
}
|
||||
|
||||
if (model.senderUid.length > 0 && model.senderUid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
[XCHUDTool showSuccessWithMessage:@"助力成功"];
|
||||
}
|
||||
} else if (attachment.second == Custom_Message_Sub_Wish_Gift_Close) {
|
||||
if (!self.wishGiftView.superview) {
|
||||
[self.wishGiftVC getWishGiftListSuccess:@[]];
|
||||
|
@@ -8,13 +8,13 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(int, WishGiftLevel) {
|
||||
WishGiftLevel_Normal = 1,
|
||||
WishGiftLevel_Middle = 2,
|
||||
WishGiftLevel_High = 3
|
||||
};
|
||||
|
||||
|
||||
@interface WishGiftInfoModel : NSObject
|
||||
/// 实际收到数量
|
||||
@property (nonatomic, assign) NSInteger actualNum;
|
||||
@@ -39,5 +39,4 @@ typedef NS_ENUM(int, WishGiftLevel) {
|
||||
///等级
|
||||
@property (nonatomic,assign) WishGiftLevel level;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -10,3 +10,4 @@
|
||||
@implementation WishGiftInfoModel
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// WishGiftInfoUpdateModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/10/28.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "WishGiftInfoModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface WishGiftInfoUpdateModel : NSObject
|
||||
///送礼物的人
|
||||
@property (nonatomic,strong) NSString *senderUid;
|
||||
///礼物
|
||||
@property (nonatomic,copy) NSArray<WishGiftInfoModel *> *gifts;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// WishGiftInfoUpdateModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/10/28.
|
||||
//
|
||||
|
||||
#import "WishGiftInfoUpdateModel.h"
|
||||
|
||||
@implementation WishGiftInfoUpdateModel
|
||||
+ (NSDictionary *)objectClassInArray {
|
||||
return @{@"gifts":WishGiftInfoModel.class};
|
||||
}
|
||||
|
||||
@end
|
@@ -223,6 +223,10 @@
|
||||
}
|
||||
|
||||
- (void)addWishButtonAction:(UIButton *)sender {
|
||||
if (self.datasource.count == 3) {
|
||||
[self showErrorToast:@"最多只可添加三个心愿呦~"];
|
||||
return;
|
||||
}
|
||||
XPWishGiftCreateItemViewController * createItemVC = [[XPWishGiftCreateItemViewController alloc] init];
|
||||
createItemVC.levelOneGiftList = self.levelOneGiftList;
|
||||
createItemVC.levelTwoGiftList = self.levelTwoGiftList;
|
||||
|
Reference in New Issue
Block a user