瀏覽代碼

RA Image

修改 loadtasks 函数
Ray Zhang 9 年之前
父節點
當前提交
8216be0999

二進制
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


二進制
RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 6 - 6
RA Image/RA Image/PopModeViewController.m

@@ -107,15 +107,15 @@
  //    // add upload tasks;
  //    // add upload tasks;
     [Appdelegate.uploadManager addTasks:tasks];
     [Appdelegate.uploadManager addTasks:tasks];
     
     
-    NSMutableArray *arr = [NSMutableArray array];
-    id foo = nil;
-    [arr addObject:foo];
-    return;
+//    NSMutableArray *arr = [NSMutableArray array];
+//    id foo = nil;
+//    [arr addObject:foo];
+//    return;
 
 
     [self clear];
     [self clear];
     
     
-    UploadViewController *upVC = (UploadViewController *)[self viewControllerInStoryboard:@"Upload" withId:@"UploadViewController"];
-    [self.navigationController pushViewController:upVC animated:YES];
+//    UploadViewController *upVC = (UploadViewController *)[self viewControllerInStoryboard:@"Upload" withId:@"UploadViewController"];
+//    [self.navigationController pushViewController:upVC animated:YES];
 }
 }
 
 
 - (IBAction)typeBtnClick:(UIButton *)sender {
 - (IBAction)typeBtnClick:(UIButton *)sender {

+ 3 - 3
common/upload/RAUploadManager.m

@@ -147,10 +147,10 @@
 -(void) loadTasks
 -(void) loadTasks
 {
 {
     [self stopAllTasks];
     [self stopAllTasks];
-    
+    self.arr_queue = [NSMutableArray new];
     NSMutableArray* arr = [[[NSUserDefaults standardUserDefaults] objectForKey:@"upload_queue"] mutableCopy];
     NSMutableArray* arr = [[[NSUserDefaults standardUserDefaults] objectForKey:@"upload_queue"] mutableCopy];
-    if(arr==nil)
-        self.arr_queue = [NSMutableArray new];
+//    if(arr==nil)
+    
     
     
     for(NSDictionary* task in arr)
     for(NSDictionary* task in arr)
     {
     {

+ 1 - 0
common/upload/RAUploadOperation.m

@@ -83,6 +83,7 @@
     
     
     
     
     __block NSMutableDictionary* block_task = _taskinfo;
     __block NSMutableDictionary* block_task = _taskinfo;
+    NSString *md5 = [RAUtils md5WithFile:[self filePath:_taskinfo ]];
     
     
     [NetworkUtils upload:[self filePath:_taskinfo ]  Params:_taskinfo[@"params"] ToHost:_taskinfo[@"url"] Result:^(NSMutableDictionary *result) {
     [NetworkUtils upload:[self filePath:_taskinfo ]  Params:_taskinfo[@"params"] ToHost:_taskinfo[@"url"] Result:^(NSMutableDictionary *result) {