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

1.修改上传进度Label宽度。

Pen Li 9 роки тому
батько
коміт
12fc02e1c7

+ 14 - 6
RA Image/RA Image.xcodeproj/project.pbxproj

@@ -238,12 +238,6 @@
 		42A829C91EBC6BF500898B8A /* Upload */ = {
 			isa = PBXGroup;
 			children = (
-				71961CAA1EC00DDD002C4096 /* RANetworkTaskDelegate.h */,
-				71961CAB1EC00DDD002C4096 /* RANetworkTaskDelegate.m */,
-				71961CAC1EC00DDD002C4096 /* RAUploadManager.h */,
-				71961CAD1EC00DDD002C4096 /* RAUploadManager.m */,
-				71961CAE1EC00DDD002C4096 /* RAUploadOperation.h */,
-				71961CAF1EC00DDD002C4096 /* RAUploadOperation.m */,
 				42A829CA1EBC6CA200898B8A /* UploadViewController.h */,
 				42A829CB1EBC6CA200898B8A /* UploadViewController.m */,
 				42A829CD1EBC6CA900898B8A /* Upload.storyboard */,
@@ -340,6 +334,7 @@
 				71114A9F1EB1C3DE00D2200C /* NetworkUtils.m */,
 				71114AA11EB1C40900D2200C /* RAINetwork.h */,
 				71114AA21EB1C40900D2200C /* RAINetwork.m */,
+				42F2B9FE1EC041A200AEEA34 /* upload */,
 			);
 			name = Network;
 			sourceTree = "<group>";
@@ -354,6 +349,19 @@
 			name = Root;
 			sourceTree = "<group>";
 		};
+		42F2B9FE1EC041A200AEEA34 /* upload */ = {
+			isa = PBXGroup;
+			children = (
+				71961CAA1EC00DDD002C4096 /* RANetworkTaskDelegate.h */,
+				71961CAB1EC00DDD002C4096 /* RANetworkTaskDelegate.m */,
+				71961CAC1EC00DDD002C4096 /* RAUploadManager.h */,
+				71961CAD1EC00DDD002C4096 /* RAUploadManager.m */,
+				71961CAE1EC00DDD002C4096 /* RAUploadOperation.h */,
+				71961CAF1EC00DDD002C4096 /* RAUploadOperation.m */,
+			);
+			name = upload;
+			sourceTree = "<group>";
+		};
 		71114AA71EB1C51200D2200C /* util */ = {
 			isa = PBXGroup;
 			children = (

BIN
RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 11 - 7
RA Image/RA Image/PopModeViewController.m

@@ -77,7 +77,14 @@
             task[@"file_path"]=photo[@"path"];
             task[@"url"]=Appdelegate.address;
         
-            NSDictionary* params = @{@"user" : Appdelegate.user,@"password" : Appdelegate.password,@"mode":@"piid",@"barcode":self.barcode,@"_operate":@"uoload"};
+            NSDictionary* params = @{
+                                     @"user" : Appdelegate.user,
+                                     @"password" : Appdelegate.password,
+                                     @"mode":self.name,
+                                     @"barcode":self.barcode,
+                                     @"_operate":@"upload",
+                                     @"md5":@""
+                                     };
             task[@"params"]=params;
         [tasks addObject:task];
 
@@ -85,16 +92,13 @@
 
     
  //    // add upload tasks;
-
-
-    [Appdelegate.uploadManager addTasks:nil];
+    [Appdelegate.uploadManager addTasks:tasks];
     
     
     
     
-//    
-//    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 {

+ 5 - 5
RA Image/RA Image/Upload.storyboard

@@ -33,7 +33,7 @@
                                                 <rect key="frame" x="0.0" y="28" width="736" height="80"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="p1C-Cy-yXq" id="tdd-mO-6vJ">
-                                                    <rect key="frame" x="0.0" y="0.0" width="736" height="80"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="736" height="79"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="QS8884456999666666" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0VW-ZZ-YcB">
@@ -46,23 +46,23 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="NYs-S2-H37">
-                                                            <rect key="frame" x="10" y="37.333333333333336" width="716" height="5"/>
+                                                            <rect key="frame" x="10" y="37" width="716" height="5"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="5" id="QYr-rE-zSp"/>
                                                             </constraints>
                                                         </progressView>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99.9%" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Qr-iv-UsW">
-                                                            <rect key="frame" x="684" y="52.333333333333329" width="42" height="20.999999999999986"/>
+                                                            <rect key="frame" x="676" y="52" width="50" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="21" id="8Tc-O3-69h"/>
-                                                                <constraint firstAttribute="width" constant="42" id="ljZ-ci-ehG"/>
+                                                                <constraint firstAttribute="width" constant="50" id="ljZ-ci-ehG"/>
                                                             </constraints>
                                                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                             <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Waiting" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DED-nv-Rm5">
-                                                            <rect key="frame" x="10" y="52.333333333333329" width="664" height="20.999999999999986"/>
+                                                            <rect key="frame" x="10" y="52" width="656" height="21"/>
                                                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                             <nil key="textColor"/>
                                                             <nil key="highlightedColor"/>

+ 1 - 1
RA Image/RA Image/UploadViewController.m

@@ -80,7 +80,7 @@
         RAUploadOperation* op = item_json[@"operation"];
         op.updateUI=^(){
             
-            
+            DebugLog(@"upload result:%@",item_json);
             NSString* status =nil;
             switch ([item_json[@"status"] intValue]) {
                 case TaskStatusStart: