新增活动详情页相关功能,包括事件模型、API接口、UI组件及相关资源文件。更新版本号至20.20.60。

This commit is contained in:
edwinQQQ
2025-05-15 16:24:43 +08:00
parent bd2e5e380f
commit a99e650d45
53 changed files with 2001 additions and 431 deletions

View File

@@ -332,8 +332,13 @@
// GCD
self.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatch_get_main_queue());
// 0.3
//#if DEBUG
// dispatch_source_set_timer(self.timer, DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC, 0.01 * NSEC_PER_SEC);
//#else
// 0.25
dispatch_source_set_timer(self.timer, DISPATCH_TIME_NOW, 0.25 * NSEC_PER_SEC, 0.01 * NSEC_PER_SEC);
//#endif
//
dispatch_source_set_event_handler(self.timer, ^{
@@ -502,15 +507,20 @@
@"Price": @(receive.gift.goldPrice * receive.giftNum * array.count),
@"isFromWinning":@(NO)}];
} else {
if (code > 500) {
self.errorMessage = @"Over Heat!";
if (code >= 500 && code < 600) {
NSLog(@" ----------------------------------------------------------- error here");
#if DEBUG
self.errorMessage = [NSString stringWithFormat:@"Over Heat! - %@ ", msg];
#else
self.errorMessage = @"Over Heat & try later";
#endif
} else {
self.errorMessage = msg;
[self forceRemove];
}
if (self.actionCallback) {
self.actionCallback(ComboAction_Error);
}
// [self forceRemove];
}
}
targetUids:allUIDs

View File

@@ -28,6 +28,8 @@
@property(nonatomic, strong) UIImpactFeedbackGenerator *feedbackGenerator;
@property (nonatomic, strong) NSTimer *longPressTimer;
//@property (nonatomic, strong) dispatch_queue_t animationQueue; // 线
@@ -44,6 +46,8 @@
[self.playImageView clear];
self.playImageView.delegate = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self.longPressTimer invalidate];
self.longPressTimer = nil;
}
- (instancetype)init {
@@ -214,7 +218,9 @@
// NSLog(@"点击间隔过短,忽略此次点击");
return;
}
#if RELEASE
isHandlingTap = YES;
#endif
[self.feedbackGenerator impactOccurred];
[[GiftComboManager sharedManager] sendGift];
@@ -432,8 +438,8 @@
duration:5];
_countdownRingView.userInteractionEnabled = YES;
//#if DEBUG
// UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap)];
// longPress.minimumPressDuration = 0.2;
// UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)];
// longPress.minimumPressDuration = 0.1;
// [_countdownRingView addGestureRecognizer:longPress];
//#else
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap)];
@@ -443,4 +449,23 @@
return _countdownRingView;
}
- (void)handleLongPress:(UILongPressGestureRecognizer *)gesture {
if (gesture.state == UIGestureRecognizerStateBegan) {
//
[self.longPressTimer invalidate];
self.longPressTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
target:self
selector:@selector(handleTap)
userInfo:nil
repeats:YES];
[self handleTap];
} else if (gesture.state == UIGestureRecognizerStateEnded ||
gesture.state == UIGestureRecognizerStateCancelled ||
gesture.state == UIGestureRecognizerStateFailed) {
//
[self.longPressTimer invalidate];
self.longPressTimer = nil;
}
}
@end

View File

@@ -206,7 +206,6 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
if (![NSString isEmpty:message]) {
[self showErrorToast:message];
}
}
break;
case ComboAction_Update_After_Send_Success: {