提交
This commit is contained in:
51
QXLive/HomePage(声播)/Model/QXNiceGiftRechargeModel.h
Normal file
51
QXLive/HomePage(声播)/Model/QXNiceGiftRechargeModel.h
Normal file
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// QXNiceGiftRechargeModel.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/12.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXGiftModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXNiceGiftRechargeModel : UIView
|
||||
/// 名称
|
||||
@property (nonatomic,strong)NSString *name;
|
||||
/// 礼包名称
|
||||
@property (nonatomic,strong)NSString *bag_name;
|
||||
|
||||
@property (nonatomic,strong)NSString *title1;
|
||||
|
||||
@property (nonatomic,strong)NSString *title2;
|
||||
/// 剩余时间
|
||||
@property (nonatomic,strong)NSString* effective_time;
|
||||
/// 规则
|
||||
@property (nonatomic,strong)NSString *rule;
|
||||
/// 说明
|
||||
@property (nonatomic,strong)NSString *counter;
|
||||
/// 金钱
|
||||
@property (nonatomic,strong)NSString *money;
|
||||
/// 钻石
|
||||
@property (nonatomic,strong)NSString *diamond;
|
||||
/// 礼物列表
|
||||
@property (nonatomic,strong)NSArray <QXGiftModel*>*gift_list;
|
||||
@end
|
||||
|
||||
|
||||
@interface QXFirstRechargeModel : NSObject
|
||||
/// 9|30元
|
||||
@property (nonatomic,strong)NSString *name;
|
||||
/// 9元限时抢
|
||||
@property (nonatomic,strong)NSString *title1;
|
||||
/// 88元礼包
|
||||
@property (nonatomic,strong)NSString *title2;
|
||||
/// 充值金额
|
||||
@property (nonatomic,strong)NSString *money;
|
||||
/// 时间
|
||||
@property (nonatomic,strong)NSString *time;
|
||||
/// 礼物列表
|
||||
@property (nonatomic,strong)NSArray <QXGiftModel*>*gift_list;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
28
QXLive/HomePage(声播)/Model/QXNiceGiftRechargeModel.m
Normal file
28
QXLive/HomePage(声播)/Model/QXNiceGiftRechargeModel.m
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// QXNiceGiftRechargeModel.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/12.
|
||||
//
|
||||
|
||||
#import "QXNiceGiftRechargeModel.h"
|
||||
|
||||
@implementation QXNiceGiftRechargeModel
|
||||
|
||||
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
|
||||
return @{
|
||||
@"gift_list" : @"QXGiftModel"
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation QXFirstRechargeModel
|
||||
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
|
||||
return @{
|
||||
@"gift_list" : @"QXGiftModel"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
27
QXLive/HomePage(声播)/Model/QXRechargePermissionModel.h
Normal file
27
QXLive/HomePage(声播)/Model/QXRechargePermissionModel.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// QXRechargePermissionModel.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/12.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRechargePermissionModel : NSObject
|
||||
/// 首充权限:1开启 0关闭
|
||||
@property (nonatomic,strong)NSString* first_charge_permission;
|
||||
/// 天降好礼权限:1开启 0关闭
|
||||
@property (nonatomic,strong)NSString* day_drop_permission;
|
||||
/// 新人好礼权限:1开启 0关闭
|
||||
@property (nonatomic,strong)NSString* n_people_permission;
|
||||
@end
|
||||
|
||||
@interface QXRechargeTypeModel : NSObject
|
||||
/// 1 新人好礼 2天降好礼 3首充好礼
|
||||
@property (nonatomic,assign)NSInteger type;
|
||||
@property (nonatomic,strong)NSString* icon;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
18
QXLive/HomePage(声播)/Model/QXRechargePermissionModel.m
Normal file
18
QXLive/HomePage(声播)/Model/QXRechargePermissionModel.m
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// QXRechargePermissionModel.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/12.
|
||||
//
|
||||
|
||||
#import "QXRechargePermissionModel.h"
|
||||
|
||||
@implementation QXRechargePermissionModel
|
||||
|
||||
@end
|
||||
|
||||
@implementation QXRechargeTypeModel
|
||||
|
||||
|
||||
|
||||
@end
|
||||
27
QXLive/HomePage(声播)/Model/QXRedPacketModel.h
Normal file
27
QXLive/HomePage(声播)/Model/QXRedPacketModel.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// QXRedPacketModel.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/11.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRedPacketModel : NSObject
|
||||
@property (nonatomic, copy) NSString *packetId; // 红包唯一ID
|
||||
@property (nonatomic, assign) NSInteger type; // 红包类型
|
||||
@property (nonatomic, assign) long long end_time; // 倒计时时间(秒)
|
||||
@property (nonatomic, assign) CGFloat amount; // 红包金额
|
||||
@property (nonatomic, strong) NSDate *createTime; // 创建时间
|
||||
@property (nonatomic, assign) BOOL isAvailable; // 是否可领取
|
||||
@property (nonatomic, assign) NSInteger position; // 在房间中的位置标识
|
||||
|
||||
// 计算剩余时间
|
||||
- (long)remainingTime;
|
||||
// 检查是否可领取
|
||||
- (BOOL)canOpenNow;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
23
QXLive/HomePage(声播)/Model/QXRedPacketModel.m
Normal file
23
QXLive/HomePage(声播)/Model/QXRedPacketModel.m
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// QXRedPacketModel.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/11.
|
||||
//
|
||||
|
||||
#import "QXRedPacketModel.h"
|
||||
|
||||
@implementation QXRedPacketModel
|
||||
- (long)remainingTime {
|
||||
long needTime = 0;
|
||||
NSTimeInterval timeInterval = [[NSDate date] timeIntervalSince1970];
|
||||
// 将秒转换为毫秒
|
||||
long long milliseconds = (long long)(timeInterval);
|
||||
needTime = self.end_time - milliseconds;
|
||||
return needTime;
|
||||
}
|
||||
|
||||
- (BOOL)canOpenNow {
|
||||
return [self remainingTime] <= 0;
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user