|
|
@@ -746,6 +746,8 @@
|
|
|
if(appDelegate.password!=nil)
|
|
|
[params setValue:appDelegate.password forKey:@"password"];
|
|
|
|
|
|
+ UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
|
|
|
+
|
|
|
__weak typeof(self) weakSelf = self;
|
|
|
[NetworkUtils upload:imageData FileName:@"test.jpg" Params:params ToHost:URL_UPLOAD_IMG Result:^(NSMutableDictionary *json) {
|
|
|
|
|
|
@@ -753,9 +755,8 @@
|
|
|
{
|
|
|
NSString* img_url_down = json[@"img_url_aname"];
|
|
|
NSString* img_url_up = json[@"img_url"];
|
|
|
-
|
|
|
{
|
|
|
- UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
|
|
|
+// UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
|
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
|
NSDictionary* order_json = [RANetwork sign_Order:weakSelf.order_code path:img_url_up];
|
|
|
@@ -818,7 +819,16 @@
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Upload Image" controller:weakSelf] ;
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
+
|
|
|
+ [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
|
|
|
+ NSString *msg = [json valueForKey:@"err_msg"];
|
|
|
+ if (msg.length == 0) {
|
|
|
+ msg = [json objectForKey:@"msg"];
|
|
|
+ }
|
|
|
+
|
|
|
+ [RAUtils message_alert:msg title:@"Upload Image" controller:weakSelf] ;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
} Progress:nil DecryptHandler:nil];
|