|
@@ -264,6 +264,9 @@
|
|
|
RAProgressHUD *hud = [RAProgressHUD showHUDOnView:self.view];
|
|
RAProgressHUD *hud = [RAProgressHUD showHUDOnView:self.view];
|
|
|
|
|
|
|
|
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
|
|
|
+ if (self.orderType2) {
|
|
|
|
|
+ [params setObject:self.orderType2 forKey:@"orderType2"];
|
|
|
|
|
+ }
|
|
|
NSMutableArray <RAEditPhotoModel *> *photoArr = [self prepareParams:params];
|
|
NSMutableArray <RAEditPhotoModel *> *photoArr = [self prepareParams:params];
|
|
|
|
|
|
|
|
__weak typeof(self) weakSelf = self;
|
|
__weak typeof(self) weakSelf = self;
|
|
@@ -280,14 +283,15 @@
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
BOOL requiredLocation = [[json objectForKey:@"requiredLocation"] boolValue];
|
|
BOOL requiredLocation = [[json objectForKey:@"requiredLocation"] boolValue];
|
|
|
[RASingleton sharedInstance].requiredLocation = requiredLocation;
|
|
[RASingleton sharedInstance].requiredLocation = requiredLocation;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if (photoArr.count > 0) {
|
|
|
|
|
+ [strongSelf syncUploadPhotos:photoArr Json:json HUD:hud];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ [self gobackHome];
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- if (photoArr.count > 0) {
|
|
|
|
|
- [strongSelf syncUploadPhotos:photoArr Json:json HUD:hud];
|
|
|
|
|
- } else {
|
|
|
|
|
- [self gobackHome];
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
} else {
|
|
} else {
|
|
|
// process error
|
|
// process error
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
@@ -324,6 +328,9 @@
|
|
|
|
|
|
|
|
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
|
|
[params setObject:serial forKey:@"serial"];
|
|
[params setObject:serial forKey:@"serial"];
|
|
|
|
|
+ if (self.orderType2) {
|
|
|
|
|
+ [params setObject:self.orderType2 forKey:@"orderType2"];
|
|
|
|
|
+ }
|
|
|
[params setObject:@"iOS" forKey:@"platform"];
|
|
[params setObject:@"iOS" forKey:@"platform"];
|
|
|
NSString *photoPath = [self.photoDir.lastPathComponent stringByAppendingPathComponent:model.photoName];
|
|
NSString *photoPath = [self.photoDir.lastPathComponent stringByAppendingPathComponent:model.photoName];
|
|
|
|
|
|
|
@@ -363,6 +370,10 @@
|
|
|
|
|
|
|
|
NSMutableDictionary *fileParams = [NSMutableDictionary dictionary];
|
|
NSMutableDictionary *fileParams = [NSMutableDictionary dictionary];
|
|
|
[fileParams setObject:serial forKey:@"serial"];
|
|
[fileParams setObject:serial forKey:@"serial"];
|
|
|
|
|
+ if (self.orderType2) {
|
|
|
|
|
+ [fileParams setObject:self.orderType2 forKey:@"orderType2"];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
NSString *photoPath = [self.photoDir stringByAppendingPathComponent:model.photoName];
|
|
NSString *photoPath = [self.photoDir stringByAppendingPathComponent:model.photoName];
|
|
|
NSDictionary *uploadJson = [RADataProvider uploadFile:photoPath parameters:fileParams];
|
|
NSDictionary *uploadJson = [RADataProvider uploadFile:photoPath parameters:fileParams];
|
|
|
int uploadResult = [[uploadJson objectForKey:@"result"] intValue];
|
|
int uploadResult = [[uploadJson objectForKey:@"result"] intValue];
|