NSDictionary* dict = [NSJSONSerialization JSONObjectWithData:_datas
options:NSJSONReadingAllowFragments error:nil];
if (action == ACTION_QUERY) {//查询处理
[self reloadView:dict];
} else if (action == ACTION_REMOVE) {//删除处理
NSString *message = @”操作成功。”;
NSNumber *resultCodeObj = [dict objectForKey:@"ResultCode"];
if ([resultCodeObj integerValue] < 0) {
message = [resultCodeObj errorMessage];
}
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@”提示信息”
message:message
delegate:nil
cancelButtonTitle:@”OK”
otherButtonTitles: nil];
[alertView show];
//重新查询
action = ACTION_QUERY;
[self startRequest];
}
[MBProgressHUD hideHUDForView:self.view animated:YES];