覆盖羽声
This commit is contained in:
40
QXLive/HomePage(声播)/Model/QXRedPacketModel.m
Normal file
40
QXLive/HomePage(声播)/Model/QXRedPacketModel.m
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// 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.start_time - milliseconds;
|
||||
return needTime;
|
||||
}
|
||||
|
||||
- (BOOL)canOpenNow {
|
||||
return [self remainingTime] <= 0;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation QXDrawRedPacketModel
|
||||
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
|
||||
return @{
|
||||
@"redpacket_info": @"QXRedPacketModel",
|
||||
@"my_record": @"QXDrawRedpacketRecordModel",
|
||||
@"records": @"QXDrawRedpacketRecordModel",
|
||||
};
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation QXDrawRedpacketRecordModel
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user