//创建一个信号量(值为0)
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
[[AFNetWorkTool shareNetWorkTool] getWarningListwithPage2:[NSString stringWithFormat:@"1"] andFinishBlock:^(id object){
NSLog(@"1");
dispatch_semaphore_signal(semaphore);
}];
//信号量减1,如果>0,则向下执行,否则等待
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
NSLog(@"222");