Commit 83461616 cgx

优化安睡准备

1 个父辈 ff74de1a
...@@ -2605,7 +2605,7 @@ ...@@ -2605,7 +2605,7 @@
CODE_SIGN_ENTITLEMENTS = DreamSleep/Basement/DSConfig/DreamSleepDebug.entitlements; CODE_SIGN_ENTITLEMENTS = DreamSleep/Basement/DSConfig/DreamSleepDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 5; CURRENT_PROJECT_VERSION = 6;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 4NDZ6UX8PW; DEVELOPMENT_TEAM = 4NDZ6UX8PW;
...@@ -2687,7 +2687,7 @@ ...@@ -2687,7 +2687,7 @@
CODE_SIGN_ENTITLEMENTS = DreamSleep/DreamSleep.entitlements; CODE_SIGN_ENTITLEMENTS = DreamSleep/DreamSleep.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5; CURRENT_PROJECT_VERSION = 6;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 4NDZ6UX8PW; DEVELOPMENT_TEAM = 4NDZ6UX8PW;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
...@@ -2828,7 +2828,7 @@ ...@@ -2828,7 +2828,7 @@
CODE_SIGN_ENTITLEMENTS = DreamSleep/Basement/DSConfig/DreamSleepBeta.entitlements; CODE_SIGN_ENTITLEMENTS = DreamSleep/Basement/DSConfig/DreamSleepBeta.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5; CURRENT_PROJECT_VERSION = 6;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 4NDZ6UX8PW; DEVELOPMENT_TEAM = 4NDZ6UX8PW;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#import "RelaxTrainController.h" #import "RelaxTrainController.h"
#import "UnityGameController.h" #import "UnityGameController.h"
#import "SleepReadyController.h" #import "SleepReadyController.h"
#import "ReadyListController.h"
@interface AISleepCoachController () <WKNavigationDelegate, WKScriptMessageHandler, DsWebControllerDelegate, RelaxTrainControllerDelegate> @interface AISleepCoachController () <WKNavigationDelegate, WKScriptMessageHandler, DsWebControllerDelegate, RelaxTrainControllerDelegate>
@property (strong, nonatomic) WKWebView *aiWebView; @property (strong, nonatomic) WKWebView *aiWebView;
...@@ -232,10 +233,7 @@ ...@@ -232,10 +233,7 @@
break; break;
case 8: // 每日计划-安睡准备(跳转到安睡准备设置页面) case 8: // 每日计划-安睡准备(跳转到安睡准备设置页面)
{ {
SleepReadyController *srVC = [SleepReadyController new]; ReadyListController *setListVC = [ReadyListController new];
[self.navigationController pushViewController:srVC animated:NO];
ReadyListController *setListVC = [[ReadyListController alloc] initWithDelegate:srVC];
[self.navigationController pushViewController:setListVC animated:YES]; [self.navigationController pushViewController:setListVC animated:YES];
} }
break; break;
......
...@@ -156,10 +156,18 @@ ...@@ -156,10 +156,18 @@
} }
- (void)backAction { - (void)backAction {
if (self.prepare_items.count == 0) { if (self.delegate) { // AI睡眠教练页面->安睡准备页面->安睡设置页面
[super backAction]; if (self.prepare_items.count == 0) {
return; [super backAction];
return;
}
[self userSetupPrepareItemsRequest];
} else { // AI睡眠教练页面->安睡设置页面
[self userSetupPrepareItemsRequest];
} }
}
- (void)userSetupPrepareItemsRequest {
[DSProgressHUD showProgressHUDWithInfo:@""]; [DSProgressHUD showProgressHUDWithInfo:@""];
[SleepReadyRequestModel userSetupPrepareItems:self.relaxItemsView.has_relax_items completion:^(SleepReadyRequestModel * _Nonnull requestModel) { [SleepReadyRequestModel userSetupPrepareItems:self.relaxItemsView.has_relax_items completion:^(SleepReadyRequestModel * _Nonnull requestModel) {
[DSProgressHUD dissmissProgressHUD]; [DSProgressHUD dissmissProgressHUD];
...@@ -168,7 +176,7 @@ ...@@ -168,7 +176,7 @@
[self.delegate passAdjustedReadyItems:self.relaxItemsView.has_relax_items]; [self.delegate passAdjustedReadyItems:self.relaxItemsView.has_relax_items];
} }
[super backAction]; [self.navigationController popViewControllerAnimated:YES];
} }
}]; }];
} }
......
...@@ -6,12 +6,11 @@ ...@@ -6,12 +6,11 @@
// //
#import "DSNaviBarViewController.h" #import "DSNaviBarViewController.h"
#import "ReadyListController.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
/// 安睡准备页面 /// 安睡准备页面
@interface SleepReadyController : DSNaviBarViewController <ReadyListControllerDelegate> @interface SleepReadyController : DSNaviBarViewController
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -14,8 +14,9 @@ ...@@ -14,8 +14,9 @@
#import "ReadyItemView.h" #import "ReadyItemView.h"
#import "RelaxTrainController.h" #import "RelaxTrainController.h"
#import "SleepReadyRequestModel.h" #import "SleepReadyRequestModel.h"
#import "ReadyListController.h"
@interface SleepReadyController () <StartReadyViewDelegate, ReadyItemViewDelegate> @interface SleepReadyController () <StartReadyViewDelegate, ReadyItemViewDelegate, ReadyListControllerDelegate>
@property (nonatomic, strong) UIButton *tipsBtn; @property (nonatomic, strong) UIButton *tipsBtn;
@property (nonatomic, strong) UIButton *setBtn; @property (nonatomic, strong) UIButton *setBtn;
@property (nonatomic, strong) SRTipsView *sRTipsView; @property (nonatomic, strong) SRTipsView *sRTipsView;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!