|
@@ -130,10 +130,10 @@
|
|
|
NSLog(@"%@",error.description);
|
|
|
faliure(error);
|
|
|
if (error.code == -1001) {
|
|
|
- [self showMessage:@"网络请求超时"];
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:@"网络请求超时"];
|
|
|
}
|
|
|
else if (error.code != -999) {
|
|
|
- [self showMessage:@"网络错误,请检查您的网络"];
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:@"网络错误,请检查您的网络"];
|
|
|
}
|
|
|
|
|
|
}];
|
|
@@ -167,10 +167,10 @@
|
|
|
NSLog(@"%@",error.description);
|
|
|
faliure(error);
|
|
|
if (error.code == -1001) {
|
|
|
- [self showMessage:@"网络请求超时"];
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:@"网络请求超时"];
|
|
|
}
|
|
|
else if (error.code != -999) {
|
|
|
- [self showMessage:@"网络错误,请检查您的网络"];
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:@"网络错误,请检查您的网络"];
|
|
|
}
|
|
|
|
|
|
}];
|
|
@@ -183,10 +183,10 @@
|
|
|
[LOADING_MANAGER removeCustomLoading];
|
|
|
[LOADING_MANAGER removeHUD];
|
|
|
if (isDisable) {
|
|
|
- [self showMessage:@"登录过期,请重新登录"];
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:@"登录过期,请重新登录"];
|
|
|
}
|
|
|
else {
|
|
|
- [self showMessage:@"未认证"];
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:@"未认证"];
|
|
|
}
|
|
|
[self logoutAction];
|
|
|
}
|
|
@@ -201,19 +201,6 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
-// 提示信息
|
|
|
-+ (void)showMessage:(NSString *)message {
|
|
|
- MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:[[UIApplication sharedApplication].windows lastObject] animated:YES];
|
|
|
- hud.removeFromSuperViewOnHide =YES;
|
|
|
- hud.mode = MBProgressHUDModeText;
|
|
|
- hud.label.text = message;
|
|
|
- hud.minSize = CGSizeMake(132.f, 60.0f);
|
|
|
- hud.label.textColor = [UIColor whiteColor];
|
|
|
- hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
|
|
|
- hud.bezelView.backgroundColor = HexRGBAlpha(0x000000, 0.8);
|
|
|
- [hud hideAnimated:YES afterDelay:2];
|
|
|
-}
|
|
|
-
|
|
|
// 多文件上传
|
|
|
+ (void)uploadMultiFileWithFileArray:(NSArray *)datas
|
|
|
andWithUrl:(NSString *)myUrl
|
|
@@ -235,7 +222,7 @@
|
|
|
}
|
|
|
success(dics);
|
|
|
} failBlock:^(NSArray *errors) {
|
|
|
- [self showMessage:@"网络错误,请检查您的网络"];
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:@"网络错误,请检查您的网络"];
|
|
|
faliure([errors lastObject]);
|
|
|
}];
|
|
|
|
|
@@ -265,7 +252,7 @@
|
|
|
return ;
|
|
|
} failBlock:^(NSError *error) {
|
|
|
faliure(error);
|
|
|
- [self showMessage:@"网络错误,请检查您的网络"];
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:@"网络错误,请检查您的网络"];
|
|
|
}];
|
|
|
}
|
|
|
|
|
@@ -301,7 +288,7 @@
|
|
|
NSMutableArray *result = [NSMutableArray arrayWithArray:responses];
|
|
|
success(result);
|
|
|
} failBlock:^(NSArray * _Nonnull errors) {
|
|
|
- [self showMessage:@"网络错误,请检查您的网络"];
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:@"网络错误,请检查您的网络"];
|
|
|
faliure([errors lastObject]);
|
|
|
}];
|
|
|
}
|