Commit b2e5cf8c cgx

埋点及睡眠故事播放动画

1 个父辈 2d64e337
正在显示 23 个修改的文件 包含 145 行增加20 行删除
...@@ -233,6 +233,7 @@ ...@@ -233,6 +233,7 @@
D0BE53712845AFD8007F15B3 /* NewTaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0BE53702845AFD8007F15B3 /* NewTaskModel.m */; }; D0BE53712845AFD8007F15B3 /* NewTaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0BE53702845AFD8007F15B3 /* NewTaskModel.m */; };
D0BE53742845B27E007F15B3 /* DailyTaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0BE53732845B27E007F15B3 /* DailyTaskModel.m */; }; D0BE53742845B27E007F15B3 /* DailyTaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0BE53732845B27E007F15B3 /* DailyTaskModel.m */; };
D0BFA77E2902304700A27310 /* DefaultView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0BFA77D2902304700A27310 /* DefaultView.m */; }; D0BFA77E2902304700A27310 /* DefaultView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0BFA77D2902304700A27310 /* DefaultView.m */; };
D0BFC1E92908E134006F7647 /* CALayer+Extra.m in Sources */ = {isa = PBXBuildFile; fileRef = D0BFC1E82908E134006F7647 /* CALayer+Extra.m */; };
D0C09ED728007D9100709D4C /* relax_normal_lottie.json in Resources */ = {isa = PBXBuildFile; fileRef = D0C09ED328007D9100709D4C /* relax_normal_lottie.json */; }; D0C09ED728007D9100709D4C /* relax_normal_lottie.json in Resources */ = {isa = PBXBuildFile; fileRef = D0C09ED328007D9100709D4C /* relax_normal_lottie.json */; };
D0C09ED828007D9100709D4C /* 478_lottie.json in Resources */ = {isa = PBXBuildFile; fileRef = D0C09ED428007D9100709D4C /* 478_lottie.json */; }; D0C09ED828007D9100709D4C /* 478_lottie.json in Resources */ = {isa = PBXBuildFile; fileRef = D0C09ED428007D9100709D4C /* 478_lottie.json */; };
D0C09ED928007D9100709D4C /* 478normal_lottie.json in Resources */ = {isa = PBXBuildFile; fileRef = D0C09ED528007D9100709D4C /* 478normal_lottie.json */; }; D0C09ED928007D9100709D4C /* 478normal_lottie.json in Resources */ = {isa = PBXBuildFile; fileRef = D0C09ED528007D9100709D4C /* 478normal_lottie.json */; };
...@@ -777,6 +778,8 @@ ...@@ -777,6 +778,8 @@
D0BE53732845B27E007F15B3 /* DailyTaskModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DailyTaskModel.m; sourceTree = "<group>"; }; D0BE53732845B27E007F15B3 /* DailyTaskModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DailyTaskModel.m; sourceTree = "<group>"; };
D0BFA77C2902304700A27310 /* DefaultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DefaultView.h; sourceTree = "<group>"; }; D0BFA77C2902304700A27310 /* DefaultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DefaultView.h; sourceTree = "<group>"; };
D0BFA77D2902304700A27310 /* DefaultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DefaultView.m; sourceTree = "<group>"; }; D0BFA77D2902304700A27310 /* DefaultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DefaultView.m; sourceTree = "<group>"; };
D0BFC1E72908E134006F7647 /* CALayer+Extra.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CALayer+Extra.h"; sourceTree = "<group>"; };
D0BFC1E82908E134006F7647 /* CALayer+Extra.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "CALayer+Extra.m"; sourceTree = "<group>"; };
D0C09ED328007D9100709D4C /* relax_normal_lottie.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = relax_normal_lottie.json; sourceTree = "<group>"; }; D0C09ED328007D9100709D4C /* relax_normal_lottie.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = relax_normal_lottie.json; sourceTree = "<group>"; };
D0C09ED428007D9100709D4C /* 478_lottie.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 478_lottie.json; sourceTree = "<group>"; }; D0C09ED428007D9100709D4C /* 478_lottie.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 478_lottie.json; sourceTree = "<group>"; };
D0C09ED528007D9100709D4C /* 478normal_lottie.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 478normal_lottie.json; sourceTree = "<group>"; }; D0C09ED528007D9100709D4C /* 478normal_lottie.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = 478normal_lottie.json; sourceTree = "<group>"; };
...@@ -1265,6 +1268,8 @@ ...@@ -1265,6 +1268,8 @@
D0930F142801874B006B497A /* DSNavigationTools */, D0930F142801874B006B497A /* DSNavigationTools */,
D06224352907C92000E1C89E /* UIColor+Extra.h */, D06224352907C92000E1C89E /* UIColor+Extra.h */,
D06224362907C92000E1C89E /* UIColor+Extra.m */, D06224362907C92000E1C89E /* UIColor+Extra.m */,
D0BFC1E72908E134006F7647 /* CALayer+Extra.h */,
D0BFC1E82908E134006F7647 /* CALayer+Extra.m */,
D0C50B3D27FD381000DC68F0 /* UIView+Extras.h */, D0C50B3D27FD381000DC68F0 /* UIView+Extras.h */,
D0C50B3E27FD381000DC68F0 /* UIView+Extras.m */, D0C50B3E27FD381000DC68F0 /* UIView+Extras.m */,
D027EE2E27FB52DA004BBA61 /* UIImage+Extras.h */, D027EE2E27FB52DA004BBA61 /* UIImage+Extras.h */,
...@@ -1619,20 +1624,10 @@ ...@@ -1619,20 +1624,10 @@
D078280D28FE616200C8D612 /* SleepStory */ = { D078280D28FE616200C8D612 /* SleepStory */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
D0CCB09E2902A49D00B81141 /* StoryPlayView.h */, D0BFC1EB290913AE006F7647 /* Model */,
D0CCB09F2902A49D00B81141 /* StoryPlayView.m */, D0BFC1EA290913A0006F7647 /* View */,
D0CCB08F290289BF00B81141 /* SleepStoryCell.h */, D0BFC1EC290913C6006F7647 /* Controller */,
D0CCB090290289BF00B81141 /* SleepStoryCell.m */, D0BFC1ED290913D0006F7647 /* PlayerTool */,
D0CCB092290289E200B81141 /* SleepStoryView.h */,
D0CCB093290289E200B81141 /* SleepStoryView.m */,
D06381A228D012420074515B /* SleepStoryController.h */,
D06381A328D012420074515B /* SleepStoryController.m */,
D0CCB09B2902A2E800B81141 /* StoryPlayController.h */,
D0CCB09C2902A2E800B81141 /* StoryPlayController.m */,
D077AF6429066D1100F41394 /* PlayerManger.h */,
D077AF6529066D1100F41394 /* PlayerManger.m */,
D0622432290793A900E1C89E /* SleepStoryHomeModel.h */,
D0622433290793A900E1C89E /* SleepStoryHomeModel.m */,
); );
path = SleepStory; path = SleepStory;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2074,6 +2069,48 @@ ...@@ -2074,6 +2069,48 @@
path = Utils; path = Utils;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
D0BFC1EA290913A0006F7647 /* View */ = {
isa = PBXGroup;
children = (
D0CCB09E2902A49D00B81141 /* StoryPlayView.h */,
D0CCB09F2902A49D00B81141 /* StoryPlayView.m */,
D0CCB08F290289BF00B81141 /* SleepStoryCell.h */,
D0CCB090290289BF00B81141 /* SleepStoryCell.m */,
D0CCB092290289E200B81141 /* SleepStoryView.h */,
D0CCB093290289E200B81141 /* SleepStoryView.m */,
);
path = View;
sourceTree = "<group>";
};
D0BFC1EB290913AE006F7647 /* Model */ = {
isa = PBXGroup;
children = (
D0622432290793A900E1C89E /* SleepStoryHomeModel.h */,
D0622433290793A900E1C89E /* SleepStoryHomeModel.m */,
);
path = Model;
sourceTree = "<group>";
};
D0BFC1EC290913C6006F7647 /* Controller */ = {
isa = PBXGroup;
children = (
D06381A228D012420074515B /* SleepStoryController.h */,
D06381A328D012420074515B /* SleepStoryController.m */,
D0CCB09B2902A2E800B81141 /* StoryPlayController.h */,
D0CCB09C2902A2E800B81141 /* StoryPlayController.m */,
);
path = Controller;
sourceTree = "<group>";
};
D0BFC1ED290913D0006F7647 /* PlayerTool */ = {
isa = PBXGroup;
children = (
D077AF6429066D1100F41394 /* PlayerManger.h */,
D077AF6529066D1100F41394 /* PlayerManger.m */,
);
path = PlayerTool;
sourceTree = "<group>";
};
D0C50B4327FD3DE800DC68F0 /* PrivacyPolicy */ = { D0C50B4327FD3DE800DC68F0 /* PrivacyPolicy */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -2812,6 +2849,7 @@ ...@@ -2812,6 +2849,7 @@
D0BE536E2845A7AF007F15B3 /* SignModel.m in Sources */, D0BE536E2845A7AF007F15B3 /* SignModel.m in Sources */,
D0D69ED628236E0800A0D5EB /* SafeSleepListController.m in Sources */, D0D69ED628236E0800A0D5EB /* SafeSleepListController.m in Sources */,
D0691E0E288009D3008BFFAB /* ReadyItemCell.m in Sources */, D0691E0E288009D3008BFFAB /* ReadyItemCell.m in Sources */,
D0BFC1E92908E134006F7647 /* CALayer+Extra.m in Sources */,
D09D0E9A280D507F008DEDAB /* ProfileAlertView.m in Sources */, D09D0E9A280D507F008DEDAB /* ProfileAlertView.m in Sources */,
D0FAC41F281B817D00D4B859 /* UIScrollView+GKPhotoBrowser.m in Sources */, D0FAC41F281B817D00D4B859 /* UIScrollView+GKPhotoBrowser.m in Sources */,
D055BEC2282526B700BC11A4 /* CourseDetailController.m in Sources */, D055BEC2282526B700BC11A4 /* CourseDetailController.m in Sources */,
......
//
// CALayer+Extra.h
// DreamSleep
//
// Created by peter on 2022/10/26.
//
#import <QuartzCore/QuartzCore.h>
NS_ASSUME_NONNULL_BEGIN
@interface CALayer (Extra)
- (void)beginRotationAnimation;
- (void)pauseAnimation;
- (void)resumeAnimation;
@end
NS_ASSUME_NONNULL_END
//
// CALayer+Extra.m
// DreamSleep
//
// Created by peter on 2022/10/26.
//
#import "CALayer+Extra.h"
@implementation CALayer (Extra)
- (void)beginRotationAnimation {
CABasicAnimation *rotateAni = [CABasicAnimation animation];
rotateAni.keyPath = @"transform.rotation.z";
rotateAni.toValue = [NSNumber numberWithFloat: M_PI * 2.0];
rotateAni.beginTime = 0.f;
rotateAni.duration = 10.0f;
rotateAni.removedOnCompletion = NO;
rotateAni.fillMode = kCAFillModeForwards;
rotateAni.repeatCount = HUGE_VALF;
[self addAnimation:rotateAni forKey:@"animation3"];
self.speed = 0.0;
}
- (void)pauseAnimation {
CFTimeInterval pausedTime = [self convertTime:CACurrentMediaTime() fromLayer:nil];
self.speed = 0.0;
self.timeOffset = pausedTime;
}
- (void)resumeAnimation {
CFTimeInterval pausedTime = [self timeOffset];
self.speed = 1.0;
self.timeOffset = 0.0;
self.beginTime = 0.0;
CFTimeInterval timeSincePause = [self convertTime:CACurrentMediaTime() fromLayer:nil] - pausedTime;
self.beginTime = timeSincePause;
}
@end
...@@ -38,6 +38,14 @@ FOUNDATION_EXTERN NSString * const Function_Option; ...@@ -38,6 +38,14 @@ FOUNDATION_EXTERN NSString * const Function_Option;
FOUNDATION_EXTERN NSString * const RelaxTrain; FOUNDATION_EXTERN NSString * const RelaxTrain;
/// 安睡准备 /// 安睡准备
FOUNDATION_EXTERN NSString * const SleepReadyEvent; FOUNDATION_EXTERN NSString * const SleepReadyEvent;
/// 访问社区动态列表
FOUNDATION_EXTERN NSString * const AccessComList;
/// 访问睡眠文章列表
FOUNDATION_EXTERN NSString * const AccessArticleList;
/// 访问测评列表
FOUNDATION_EXTERN NSString * const AccessEvaluationList;
/// 睡前故事
FOUNDATION_EXTERN NSString * const AccessSleepStory;
#pragma mark - 友盟自定义异常 #pragma mark - 友盟自定义异常
FOUNDATION_EXTERN NSString * const H5Monitor; FOUNDATION_EXTERN NSString * const H5Monitor;
......
...@@ -23,6 +23,10 @@ NSString * const InviteFriends = @"inviteFriends"; ...@@ -23,6 +23,10 @@ NSString * const InviteFriends = @"inviteFriends";
NSString * const Function_Option = @"Function_Option"; NSString * const Function_Option = @"Function_Option";
NSString * const RelaxTrain = @"RelaxTrain"; NSString * const RelaxTrain = @"RelaxTrain";
NSString * const SleepReadyEvent = @"SleepReadyEvent"; NSString * const SleepReadyEvent = @"SleepReadyEvent";
NSString * const AccessComList = @"AccessComList";
NSString * const AccessArticleList = @"AccessArticleList";
NSString * const AccessEvaluationList = @"AccessEvaluationList";
NSString * const AccessSleepStory = @"AccessSleepStory";
NSString * const H5Monitor = @"H5Monitor"; NSString * const H5Monitor = @"H5Monitor";
......
...@@ -54,6 +54,8 @@ ...@@ -54,6 +54,8 @@
} }
} }
}]; }];
[DataStatisticsUtil event:AccessArticleList attributes:@{}];
} }
- (void)endRefreshing:(BOOL)loadMore { - (void)endRefreshing:(BOOL)loadMore {
......
...@@ -120,6 +120,8 @@ ...@@ -120,6 +120,8 @@
[self.communityView endRefreshing:loadMore]; [self.communityView endRefreshing:loadMore];
} }
}]; }];
[DataStatisticsUtil event:AccessComList attributes:@{@"name":[LoginUtils getUserLoginData] ? @"登录状态" : @"未登录状态"}];
} }
- (void)publishLogicDeal { - (void)publishLogicDeal {
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
// Created by peter on 2022/9/20. // Created by peter on 2022/9/20.
// //
#import <UIKit/UIKit.h> #import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
/// 社区人气评测控制器 /// 社区人气评测控制器
@interface EvaluateController : UIViewController @interface EvaluateController : BaseViewController
@end @end
......
...@@ -17,17 +17,16 @@ ...@@ -17,17 +17,16 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
#warning --- 人气测评待开发...
self.navigationItem.title = @"人气测评"; self.navigationItem.title = @"人气测评";
self.view.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG); self.view.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG);
[EvaluateRequestModel queryCommunityEvaluationListWithCompletion:^(EvaluateRequestModel * _Nonnull requestModel) { [EvaluateRequestModel queryCommunityEvaluationListWithCompletion:^(EvaluateRequestModel * _Nonnull requestModel) {
}]; }];
}
#pragma mark - 品牌模式 [DataStatisticsUtil event:AccessEvaluationList attributes:@{}];
- (NaviStyle)navigationBarStyle {
return NaviStyleDefault;
} }
@end @end
...@@ -40,12 +40,16 @@ ...@@ -40,12 +40,16 @@
[DSProgressHUD showToast:requestModel.errMessage]; [DSProgressHUD showToast:requestModel.errMessage];
} }
}]; }];
[DataStatisticsUtil event:AccessSleepStory attributes:@{@"name":@"睡前故事列表"}];
} }
- (void)didSelectStoryItem:(SubAudioModel *)audioModel { - (void)didSelectStoryItem:(SubAudioModel *)audioModel {
StoryPlayController *playVC = [StoryPlayController new]; StoryPlayController *playVC = [StoryPlayController new];
playVC.audioModel = audioModel; playVC.audioModel = audioModel;
[self presentViewController:playVC animated:YES completion:nil]; [self presentViewController:playVC animated:YES completion:nil];
[DataStatisticsUtil event:AccessSleepStory attributes:@{@"name":audioModel.audio_name ? audioModel.audio_name : @""}];
} }
#pragma mark - lazy #pragma mark - lazy
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#import "StoryPlayView.h" #import "StoryPlayView.h"
#import "DSSlider.h" #import "DSSlider.h"
#import "CALayer+Extra.h"
@interface StoryPlayView () <UIGestureRecognizerDelegate> @interface StoryPlayView () <UIGestureRecognizerDelegate>
@property (nonatomic, strong) UIButton *dismissBtn; @property (nonatomic, strong) UIButton *dismissBtn;
...@@ -81,6 +82,12 @@ ...@@ -81,6 +82,12 @@
- (void)updatePlayingState:(BOOL)isPlaying { - (void)updatePlayingState:(BOOL)isPlaying {
self.playerBtn.selected = isPlaying; self.playerBtn.selected = isPlaying;
if (isPlaying) {
[self.audioPicIV.layer resumeAnimation];
} else {
[self.audioPicIV.layer pauseAnimation];
}
} }
- (void)updateProgress:(float)progress currentTime:(NSString *)currentTime totalTime:(NSString *)totalTime { - (void)updateProgress:(float)progress currentTime:(NSString *)currentTime totalTime:(NSString *)totalTime {
...@@ -149,6 +156,7 @@ ...@@ -149,6 +156,7 @@
_audioPicIV = [UIImageView new]; _audioPicIV = [UIImageView new];
[_audioPicIV cornerRadius:72.0]; [_audioPicIV cornerRadius:72.0];
_audioPicIV.dk_alphaPicker = DKAlphaPickerWithAlphas(1.0, .5, .5); _audioPicIV.dk_alphaPicker = DKAlphaPickerWithAlphas(1.0, .5, .5);
[_audioPicIV.layer beginRotationAnimation];
} }
return _audioPicIV; return _audioPicIV;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!