This commit is contained in:
lianxiang
2018-09-23 15:52:02 +08:00
parent 3508cab25e
commit 69522b22fc
13 changed files with 476 additions and 36 deletions
@@ -366,25 +366,32 @@
[GiGaNetManager userbodyRequest:url params:params completionHandler:^(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error) {
[self.view hideToastActivity];
GiGaAPIResult *result = [[GiGaAPIResult alloc] initWithDictionary:resDic];
if (result.success) {
MaskTestResult* mode = [[MaskTestResult alloc] initWithDictionary:resDic error:nil];
[self userTestEnd:mode];
}else{
GIGA_ShowToast(result.message);
}
GILog(@"**测试结果***\n code:%ld\n message:%@\n *******\n dic:%@",result.code,result.message,result.dic);
[self userTestEnd];
}];
}
-(void)userTestEnd{
-(void)userTestEnd:(MaskTestResult*)model{
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
if (isUserLogin) {
//展示结果
NSDictionary *dic = @{
@"dryness":@"0.41",
@"drynessPercent":@"41%",
@"mask":@"",
@"minute":@"19",
@"oiliness":@"0.59",
@"oilinessPercent":@"59%"
};
MaskTestResult *model =[[MaskTestResult alloc] initWithDictionary:dic error:nil];
// NSDictionary *dic = @{
// @"dryness":@"0.41",
// @"drynessPercent":@"41%",
// @"mask":@"",
// @"minute":@"19",
// @"oiliness":@"0.59",
// @"oilinessPercent":@"59%"
// };
// MaskTestResult *model =[[MaskTestResult alloc] initWithDictionary:dic error:nil];
MaskTestResultVC *resultVC = [[MaskTestResultVC alloc] init];
resultVC.model = model;
[self.navigationController pushViewController:resultVC animated:YES];