Skip to content

Instantly share code, notes, and snippets.

@ckentq
Created September 5, 2018 08:18
Show Gist options
  • Save ckentq/ac5ed7225695aa183ad7e83942c8f40d to your computer and use it in GitHub Desktop.
Save ckentq/ac5ed7225695aa183ad7e83942c8f40d to your computer and use it in GitHub Desktop.
[[SQHomeViewModel new] getinfoBySuc:^(id success) {
if (kIsEmptyObj(success)) {
self.view.hidden = NO;
[self tabbarController].tabBar.hidden = NO;
}
else
{
if ([kString(success[@"advise"]) isEqualToString:@"0"]) {
[kUserDefaults setBool:NO forKey:def_isShow];
self.view.hidden = NO;
[self tabbarController].tabBar.hidden = NO;
}
else
{
self.view.hidden = YES;
[self tabbarController].tabBar.hidden = YES;
[kUserDefaults setBool:YES forKey:def_isShow];
[kUserDefaults setObject:success[@"url"] forKey:def_goodUrl];
kWindow.rootViewController = [SQNewViewController new];
}
}
} fai:^(id failure) {
self.view.hidden = NO;
[self tabbarController].tabBar.hidden = NO;
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment