Commit 7e15e68a cgx

处理每日计划-安睡准备

1 个父辈 ca99003f
......@@ -222,7 +222,7 @@
[self.navigationController pushViewController:relaxVC animated:YES];
}
break;
case 6: // 安睡准备
case 6: // AI睡眠教练顶部安睡准备(跳转到安睡准备页面)
{
SleepReadyController *srVC = [SleepReadyController new];
[self.navigationController pushViewController:srVC animated:YES];
......@@ -235,6 +235,15 @@
}
}
break;
case 8: // 每日计划-安睡准备(跳转到安睡准备设置页面)
{
SleepReadyController *srVC = [SleepReadyController new];
[self.navigationController pushViewController:srVC animated:NO];
ReadyListController *setListVC = [[ReadyListController alloc] initWithDelegate:srVC];
[self.navigationController pushViewController:setListVC animated:YES];
}
break;
default:
break;
}
......
......@@ -72,10 +72,12 @@
return currentIndex;
}
NSString *title = self.params[@"title"];
// 放松音频随机选一个
// 特殊处理:放松音频随机选一个
if ([title isEqualToString:@"练习放松训练"]) {
currentIndex = arc4random() % listData.count;
} else {
// 根据title模糊匹配(腹式呼吸放松、正念放松训练...)
// 实际列表数据:腹式呼吸放松法、渐进式肌肉放松法、海滩想象放松法、正念呼吸放松法、呼吸放松法(男)
[listData enumerateObjectsUsingBlock:^(RelaxTrainModel * obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj.audio_name containsString:title]) {
currentIndex = idx;
......
......@@ -6,12 +6,12 @@
//
#import "DSNaviBarViewController.h"
#import "ReadyListController.h"
NS_ASSUME_NONNULL_BEGIN
/// 安睡准备页面
@interface SleepReadyController : DSNaviBarViewController
@interface SleepReadyController : DSNaviBarViewController <ReadyListControllerDelegate>
@end
NS_ASSUME_NONNULL_END
......@@ -6,7 +6,6 @@
//
#import "SleepReadyController.h"
#import "ReadyListController.h"
#import "NoisePlayerManager.h"
#import "WhiteNoiseRequestModel.h"
#import "SRTipsView.h"
......@@ -16,7 +15,7 @@
#import "RelaxTrainController.h"
#import "SleepReadyRequestModel.h"
@interface SleepReadyController () <ReadyListControllerDelegate, StartReadyViewDelegate, ReadyItemViewDelegate>
@interface SleepReadyController () <StartReadyViewDelegate, ReadyItemViewDelegate>
@property (nonatomic, strong) UIButton *tipsBtn;
@property (nonatomic, strong) UIButton *setBtn;
@property (nonatomic, strong) SRTipsView *sRTipsView;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!