Commit 83461616 cgx

优化安睡准备

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