Переглянути джерело

1.修改UWA Order Detail子线程修改UI。

Pen Li 7 роки тому
батько
коміт
36606459d7

+ 13 - 3
RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m

@@ -746,6 +746,8 @@
         if(appDelegate.password!=nil)
         if(appDelegate.password!=nil)
             [params setValue:appDelegate.password forKey:@"password"];
             [params setValue:appDelegate.password forKey:@"password"];
         
         
+        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
+        
         __weak typeof(self) weakSelf = self;
         __weak typeof(self) weakSelf = self;
         [NetworkUtils upload:imageData FileName:@"test.jpg" Params:params ToHost:URL_UPLOAD_IMG Result:^(NSMutableDictionary *json) {
         [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_down = json[@"img_url_aname"];
                 NSString* img_url_up = json[@"img_url"];
                 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), ^{
                     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
                         
                         
                         NSDictionary* order_json = [RANetwork sign_Order:weakSelf.order_code path:img_url_up];
                         NSDictionary* order_json = [RANetwork sign_Order:weakSelf.order_code path:img_url_up];
@@ -818,7 +819,16 @@
             }
             }
             else
             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];
         } Progress:nil DecryptHandler:nil];

+ 1 - 1
RedAnt ERP Mobile/common/data_provider/RANetwork.m

@@ -4010,7 +4010,7 @@ repeat:
         //            ibadge=@"0";
         //            ibadge=@"0";
         //        if([strbadge isEqualToString:@"null"])
         //        if([strbadge isEqualToString:@"null"])
         //            strbadge=@"0";
         //            strbadge=@"0";
-        app.applicationIconBadgeNumber = ibadge;//[strbadge intValue];
+//        app.applicationIconBadgeNumber = ibadge;//[strbadge intValue];
         
         
         //  BOOL bigger = [appDelegate.build compare:required_ver] ;
         //  BOOL bigger = [appDelegate.build compare:required_ver] ;
         if([appDelegate.build intValue]<[required_ver intValue])
         if([appDelegate.build intValue]<[required_ver intValue])