Temperary:服務器
dispatch_async(dispatch_get_main_queue(), ^{網絡
//[MBHUDHelper hideHUDView];async
});ide
if (error.code==-999) {spa
//主動取消請求code
} else if (error.code==-1001) {get
// 請求超時it
dispatch_async(dispatch_get_main_queue(), ^{互聯網
//[MBHUDHelper showWarningWithText:@"請求超時,請稍後重試"];請求
});
} else if (error.code==-1004) {
dispatch_async(dispatch_get_main_queue(), ^{
//[MBHUDHelper showWarningWithText:@"未能鏈接到服務器"];
});
} else if (error.code==-1005) {
dispatch_async(dispatch_get_main_queue(), ^{
//[MBHUDHelper showWarningWithText:@"網絡鏈接已中斷"];
});
} else if (error.code==-1009) {
dispatch_async(dispatch_get_main_queue(), ^{
//[MBHUDHelper showWarningWithText:@"彷佛已斷開與互聯網的鏈接"];
});
} else {
dispatch_async(dispatch_get_main_queue(), ^{
//[MBHUDHelper showWarningWithText:@"網絡異常"];
});
}