Просмотр исходного кода

HOMER MOBILE

1 去掉remove finish 和 remove error 的设置和逻辑。
2 Only upload via WIFI 默认改为false 并修改相关逻辑。
3 修改默认上传重试次数为5次。
4 修改piid和model 验证,增加验证提示框,避免重复点上传按钮。
5 修改验证出错的提示,增加网络错误提示,并把提示方式由气泡窗改为对话框。
6 去掉internal server
Ray Zhang 8 лет назад
Родитель
Сommit
77005500f3

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


+ 16 - 78
RA Image/RA Image/Base.lproj/Main.storyboard

@@ -14,7 +14,7 @@
         <scene sceneID="7ND-eH-sRU">
             <objects>
                 <navigationController id="zf9-JT-Kr2" customClass="RootNavigationController" sceneMemberID="viewController">
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="fQ0-CT-SJq">
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="fQ0-CT-SJq">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
@@ -344,33 +344,10 @@
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ak9-ZL-LJg">
-                                <rect key="frame" x="26" y="80" width="40" height="40"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="40" id="cUn-d9-05T"/>
-                                    <constraint firstAttribute="height" constant="40" id="pKp-9z-wKu"/>
-                                </constraints>
-                                <state key="normal" image="checkbox">
-                                    <color key="titleColor" red="0.25435081980000002" green="0.75957768849999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                </state>
-                                <state key="selected" image="checkbox_check"/>
-                                <connections>
-                                    <action selector="internalCheckBtnClick:" destination="r7u-Ls-Lza" eventType="touchUpInside" id="GIU-oB-sNH"/>
-                                </connections>
-                            </button>
-                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="IP" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="blU-4o-XVJ">
-                                <rect key="frame" x="26" y="130" width="339" height="40"/>
-                                <nil key="textColor"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <textInputTraits key="textInputTraits"/>
-                                <connections>
-                                    <outlet property="delegate" destination="r7u-Ls-Lza" id="J8f-Pz-Gwg"/>
-                                </connections>
-                            </textField>
                             <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="N4g-tS-PSF">
                                 <rect key="frame" x="26" y="40" width="323" height="30"/>
                                 <constraints>
-                                    <constraint firstAttribute="height" constant="30" id="Yf5-Pn-1SW"/>
+                                    <constraint firstAttribute="height" constant="30" id="m3z-CE-Fja"/>
                                 </constraints>
                                 <nil key="textColor"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -379,73 +356,36 @@
                                     <outlet property="delegate" destination="r7u-Ls-Lza" id="XKz-18-Ndz"/>
                                 </connections>
                             </textField>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Internal Address" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="l39-8d-pmH">
-                                <rect key="frame" x="86" y="80" width="279" height="40"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Server" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="l39-8d-pmH">
+                                <rect key="frame" x="26" y="80" width="323" height="20.5"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kbo-vR-wxL">
-                                <rect key="frame" x="26" y="190" width="40" height="40"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="40" id="CLg-nr-pUz"/>
-                                    <constraint firstAttribute="width" constant="40" id="ZyL-b3-rIU"/>
-                                </constraints>
-                                <state key="normal" image="checkbox">
-                                    <color key="titleColor" red="0.25435081980000002" green="0.75957768849999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                </state>
-                                <state key="selected" image="checkbox_check"/>
-                                <connections>
-                                    <action selector="externalCheckBtnClick:" destination="r7u-Ls-Lza" eventType="touchUpInside" id="BhV-eZ-ONE"/>
-                                </connections>
-                            </button>
-                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="IP" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="6u3-iJ-b6y">
-                                <rect key="frame" x="26" y="240" width="339" height="40"/>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="blU-4o-XVJ">
+                                <rect key="frame" x="26" y="111" width="323" height="30"/>
                                 <nil key="textColor"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <textInputTraits key="textInputTraits"/>
                                 <connections>
-                                    <outlet property="delegate" destination="r7u-Ls-Lza" id="Nzq-if-DkY"/>
+                                    <outlet property="delegate" destination="r7u-Ls-Lza" id="J8f-Pz-Gwg"/>
                                 </connections>
                             </textField>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="External Address" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="65S-Fg-ERX">
-                                <rect key="frame" x="86" y="190" width="279" height="40"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
-                            <constraint firstItem="l39-8d-pmH" firstAttribute="height" secondItem="ak9-ZL-LJg" secondAttribute="height" id="6gd-8y-bdZ"/>
-                            <constraint firstItem="6u3-iJ-b6y" firstAttribute="leading" secondItem="kbo-vR-wxL" secondAttribute="leading" id="8d1-fi-tLC"/>
-                            <constraint firstAttribute="trailing" secondItem="6u3-iJ-b6y" secondAttribute="trailing" constant="10" id="ElH-e4-39m"/>
-                            <constraint firstItem="65S-Fg-ERX" firstAttribute="leading" secondItem="kbo-vR-wxL" secondAttribute="trailing" constant="20" id="GTd-Ee-T0R"/>
-                            <constraint firstAttribute="trailing" secondItem="l39-8d-pmH" secondAttribute="trailing" constant="10" id="OIc-CK-Oge"/>
-                            <constraint firstItem="65S-Fg-ERX" firstAttribute="centerY" secondItem="kbo-vR-wxL" secondAttribute="centerY" id="Pzg-XR-ZTJ"/>
-                            <constraint firstItem="blU-4o-XVJ" firstAttribute="leading" secondItem="ak9-ZL-LJg" secondAttribute="leading" id="Ucr-yy-feK"/>
-                            <constraint firstItem="l39-8d-pmH" firstAttribute="centerY" secondItem="ak9-ZL-LJg" secondAttribute="centerY" id="VAv-u4-sgI"/>
-                            <constraint firstAttribute="trailing" secondItem="65S-Fg-ERX" secondAttribute="trailing" constant="10" id="WNf-Xd-Dj4"/>
-                            <constraint firstItem="blU-4o-XVJ" firstAttribute="top" secondItem="ak9-ZL-LJg" secondAttribute="bottom" constant="10" id="aD6-ml-Fhm"/>
-                            <constraint firstItem="6u3-iJ-b6y" firstAttribute="height" secondItem="kbo-vR-wxL" secondAttribute="height" id="aR8-j4-StY"/>
-                            <constraint firstItem="blU-4o-XVJ" firstAttribute="height" secondItem="ak9-ZL-LJg" secondAttribute="height" id="f8q-0V-8RV"/>
-                            <constraint firstItem="65S-Fg-ERX" firstAttribute="height" secondItem="kbo-vR-wxL" secondAttribute="height" id="fIc-f9-v0B"/>
-                            <constraint firstItem="N4g-tS-PSF" firstAttribute="top" secondItem="pYb-eQ-flk" secondAttribute="bottom" constant="20" id="h3p-CX-VWS"/>
-                            <constraint firstItem="ak9-ZL-LJg" firstAttribute="leading" secondItem="N4g-tS-PSF" secondAttribute="leading" id="hY2-4J-C9K"/>
-                            <constraint firstAttribute="trailing" secondItem="blU-4o-XVJ" secondAttribute="trailing" constant="10" id="hu2-Vv-cFU"/>
-                            <constraint firstItem="ak9-ZL-LJg" firstAttribute="top" secondItem="N4g-tS-PSF" secondAttribute="bottom" constant="10" id="keo-la-Ruh"/>
-                            <constraint firstItem="kbo-vR-wxL" firstAttribute="leading" secondItem="ak9-ZL-LJg" secondAttribute="leading" id="okh-NH-F5P"/>
-                            <constraint firstItem="N4g-tS-PSF" firstAttribute="leading" secondItem="mu4-lc-PRk" secondAttribute="leadingMargin" constant="10" id="oyR-VA-K9M"/>
-                            <constraint firstItem="kbo-vR-wxL" firstAttribute="top" secondItem="blU-4o-XVJ" secondAttribute="bottom" constant="20" id="uZu-fa-ULm"/>
-                            <constraint firstItem="l39-8d-pmH" firstAttribute="leading" secondItem="ak9-ZL-LJg" secondAttribute="trailing" constant="20" id="wiV-8D-vx9"/>
-                            <constraint firstItem="6u3-iJ-b6y" firstAttribute="top" secondItem="kbo-vR-wxL" secondAttribute="bottom" constant="10" id="xlA-i3-hle"/>
-                            <constraint firstAttribute="trailingMargin" secondItem="N4g-tS-PSF" secondAttribute="trailing" constant="10" id="yXh-vN-ybU"/>
+                            <constraint firstItem="N4g-tS-PSF" firstAttribute="centerX" secondItem="mu4-lc-PRk" secondAttribute="centerX" id="4kc-tk-11e"/>
+                            <constraint firstItem="N4g-tS-PSF" firstAttribute="leading" secondItem="mu4-lc-PRk" secondAttribute="leadingMargin" constant="10" id="ES9-Ie-txh"/>
+                            <constraint firstItem="blU-4o-XVJ" firstAttribute="leading" secondItem="N4g-tS-PSF" secondAttribute="leading" id="TYO-qT-Lfe"/>
+                            <constraint firstItem="N4g-tS-PSF" firstAttribute="top" secondItem="pYb-eQ-flk" secondAttribute="bottom" constant="20" id="Wsp-KJ-ZGC"/>
+                            <constraint firstItem="blU-4o-XVJ" firstAttribute="top" secondItem="l39-8d-pmH" secondAttribute="bottom" constant="10.5" id="aia-zU-K38"/>
+                            <constraint firstItem="blU-4o-XVJ" firstAttribute="trailing" secondItem="N4g-tS-PSF" secondAttribute="trailing" id="dzp-sl-pBk"/>
+                            <constraint firstItem="N4g-tS-PSF" firstAttribute="leading" secondItem="l39-8d-pmH" secondAttribute="leading" id="fYc-XM-SBg"/>
+                            <constraint firstItem="N4g-tS-PSF" firstAttribute="trailing" secondItem="l39-8d-pmH" secondAttribute="trailing" id="lkD-tS-c4j"/>
+                            <constraint firstItem="l39-8d-pmH" firstAttribute="top" secondItem="N4g-tS-PSF" secondAttribute="bottom" constant="10" id="m4L-qY-0Rn"/>
                         </constraints>
                     </view>
                     <connections>
-                        <outlet property="externalCheckBtn" destination="kbo-vR-wxL" id="gYt-D4-bet"/>
-                        <outlet property="externalTextField" destination="6u3-iJ-b6y" id="PkG-Vx-2Xd"/>
-                        <outlet property="internalCheckBtn" destination="ak9-ZL-LJg" id="9pw-ae-4yN"/>
                         <outlet property="internalTextField" destination="blU-4o-XVJ" id="Cz1-DP-Zrf"/>
                         <outlet property="nameTextField" destination="N4g-tS-PSF" id="kdZ-Ct-VgR"/>
                     </connections>
@@ -497,8 +437,6 @@
     </scenes>
     <resources>
         <image name="AppIcon40x40" width="16" height="16"/>
-        <image name="checkbox" width="16" height="16"/>
-        <image name="checkbox_check" width="16" height="16"/>
         <image name="setting" width="60" height="60"/>
     </resources>
 </document>

+ 12 - 4
RA Image/RA Image/BasicModeViewController.m

@@ -573,13 +573,14 @@
      AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
 //    appDelegate.address = self.address;
     __weak typeof(self) weakself = self;
-//    UIAlertView *alert = [RAUtils waiting_alert:@"Please wait" title:@"Login"];
+    NSString* title=[@"Verify " stringByAppendingString:self.barcodeTitle];
+    UIAlertView *alert = [RAUtils waiting_alert:@"Please wait" title:title];
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
     //    if (weakself) {
 //            __strong typeof(weakself) strongself = weakself;
             NSDictionary *result_json = [RAINetwork Verify:params];
             dispatch_async(dispatch_get_main_queue(), ^{
-//                [alert dismissWithClickedButtonIndex:0 animated:YES];
+                [alert dismissWithClickedButtonIndex:0 animated:YES];
                 int result = [[result_json objectForKey:@"result"] intValue];
 //                BOOL rememberLogin = [[strongself userDefaultsValue:kRememberLogin] boolValue];
 //                [self addTasks];
@@ -589,12 +590,15 @@
                     {
                         //code not exist;
                         
-                            [weakself.view makeToast:weakself.verify_msg0 duration:3.0 position:CSToastPositionCenter];
+                        [RAUtils message_alert:weakself.verify_msg0 title:@"Warring" controller:weakself];
+//                            [weakself.view makeToast:weakself.verify_msg0 duration:3.0 position:CSToastPositionCenter];
                         break;
                     }
                     case 1:
                     {
-                                                    [weakself.view makeToast:@"Model/Manufacturer does not match" duration:3.0 position:CSToastPositionCenter];
+                        
+                        [RAUtils message_alert:@"Model/Manufacturer does not match" title:@"Warring" controller:weakself];
+//                                                    [weakself.view makeToast:@"Model/Manufacturer does not match" duration:3.0 position:CSToastPositionCenter];
                         break;
                     }
                     case 2:
@@ -603,6 +607,10 @@
                         [self addTasks];
                         break;
                     }
+                    case RESULT_NET_ERROR:
+                    {
+                        [RAUtils message_alert:@"Can not connect to server" title:title controller:weakself];
+                    }
                     default:
                         break;
                 }

+ 68 - 50
RA Image/RA Image/LoginSettingViewController.m

@@ -14,10 +14,7 @@
 @interface LoginSettingViewController ()<UITextFieldDelegate>
 
 @property (strong, nonatomic) IBOutlet UITextField *nameTextField;
-@property (strong, nonatomic) IBOutlet UIButton *internalCheckBtn;
 @property (strong, nonatomic) IBOutlet UITextField *internalTextField;
-@property (strong, nonatomic) IBOutlet UIButton *externalCheckBtn;
-@property (strong, nonatomic) IBOutlet UITextField *externalTextField;
 @property (nonatomic,copy) NSString *checkedAddress;
 
 @end
@@ -47,26 +44,35 @@
 - (void)loadAddress {
     NSDictionary *addressDic = [self userDefaultsValue:kScanAddress];
     if (addressDic) {
-        self.internalTextField.text = [addressDic objectForKey:@"internalAddress"];
-        self.externalTextField.text = [addressDic objectForKey:@"externalAddress"];
-        self.nameTextField.text = [addressDic objectForKey:@"name"];
-        NSUInteger selectedIndex = [[addressDic objectForKey:@"selectedIndex"] integerValue];
-        switch (selectedIndex) {
-            case 0:
-            case 1: {
-                [self internalCheckBtnClick:self.internalCheckBtn];
-            }
-                break;
-            case 2: {
-                [self externalCheckBtnClick:self.externalCheckBtn];
-            }
-                break;
-                
-            default:
-                break;
+        NSString* ia=addressDic[@"internalAddress"];
+        NSString* ea=addressDic[@"externalAddress"];
+        NSString* sa=addressDic[@"serverAddress"];
+        if(sa.length==0)
+        {
+            if(ea.length>0)
+                sa=ea;
+            else if(ia.length>0)
+            sa=ia;
         }
+        self.internalTextField.text = sa;
+        self.nameTextField.text = [addressDic objectForKey:@"name"];
+//        NSUInteger selectedIndex = [[addressDic objectForKey:@"selectedIndex"] integerValue];
+//        switch (selectedIndex) {
+//            case 0:
+//            case 1: {
+//                [self internalCheckBtnClick:self.internalCheckBtn];
+//            }
+//                break;
+//            case 2: {
+//                [self externalCheckBtnClick:self.externalCheckBtn];
+//            }
+//                break;
+//                
+//            default:
+//                break;
+//        }
     } else {
-        [self internalCheckBtnClick:self.internalCheckBtn];
+//        [self internalCheckBtnClick:self.internalCheckBtn];
     }
 }
 
@@ -75,15 +81,16 @@
 
 - (void)doneItemClick:(UIBarButtonItem *)sender {
     self.checkedAddress = nil;
-    NSUInteger selectedIndex = 0;
-    if (self.internalCheckBtn.selected) {
-        self.checkedAddress = self.internalTextField.text;
-        selectedIndex = 1;
-    }
-    if (self.externalCheckBtn.selected) {
-        self.checkedAddress = self.externalTextField.text;
-        selectedIndex = 2;
-    }
+    NSUInteger selectedIndex = 1;
+    self.checkedAddress = self.internalTextField.text;
+//    if (self.internalCheckBtn.selected) {
+//        self.checkedAddress = self.internalTextField.text;
+//        selectedIndex = 1;
+//    }
+//    if (self.externalCheckBtn.selected) {
+//        self.checkedAddress = self.externalTextField.text;
+//        selectedIndex = 2;
+//    }
     
     if (self.returnValue) {
         self.returnValue(self.checkedAddress);
@@ -94,14 +101,14 @@
             // 保存信息
             NSString *name = weakself.nameTextField.text;
             NSString *internalAddr = weakself.internalTextField.text;
-            NSString *externalAddr = weakself.externalTextField.text;
+//            NSString *externalAddr = weakself.externalTextField.text;
             NSMutableDictionary *addressDic = [NSMutableDictionary dictionary];
             if (internalAddr.length) {
-                [addressDic setObject:internalAddr forKey:@"internalAddress"];
-            }
-            if (externalAddr.length) {
-                [addressDic setObject:externalAddr forKey:@"externalAddress"];
+                [addressDic setObject:internalAddr forKey:@"serverAddress"];
             }
+//            if (externalAddr.length) {
+//                [addressDic setObject:externalAddr forKey:@"externalAddress"];
+//            }
             if (name.length) {
                 [addressDic setObject:name forKey:@"name"];
             }
@@ -124,17 +131,28 @@
                 
                 NSArray *dataArr = [code componentsSeparatedByString:@";"];
                 if (dataArr.count == 3) {
+                    NSString *name = [dataArr objectAtIndex:0];
+                    NSString *internalAddr = [dataArr objectAtIndex:2];
+//                    NSString *externalAddr = [dataArr objectAtIndex:2];
+                    
+                    strongself.nameTextField.text = name;
+                    strongself.internalTextField.text = internalAddr;
+//                    strongself.externalTextField.text = externalAddr;
+                }
+                else if (dataArr.count == 2) {
                     NSString *name = [dataArr objectAtIndex:0];
                     NSString *internalAddr = [dataArr objectAtIndex:1];
-                    NSString *externalAddr = [dataArr objectAtIndex:2];
+                    //                    NSString *externalAddr = [dataArr objectAtIndex:2];
                     
                     strongself.nameTextField.text = name;
                     strongself.internalTextField.text = internalAddr;
-                    strongself.externalTextField.text = externalAddr;
-                } else {
-                    strongself.nameTextField.text = nil;
-                    strongself.internalTextField.text = [dataArr firstObject];
-                    strongself.externalTextField.text = nil;
+                    //                    strongself.externalTextField.text = externalAddr;
+                }
+                else {
+                    [RAUtils alert_view:@"Wrong QR-CODE?" title:@"Can not setup server"];
+//                    strongself.nameTextField.text = nil;
+//                    strongself.internalTextField.text = [dataArr firstObject];
+//                    strongself.externalTextField.text = nil;
                 }
                 
             }
@@ -146,15 +164,15 @@
     
 }
 
-- (IBAction)internalCheckBtnClick:(UIButton *)sender {
-    sender.selected = !sender.selected;
-    if (sender.selected) self.externalCheckBtn.selected = NO;
-}
-
-- (IBAction)externalCheckBtnClick:(UIButton *)sender {
-    sender.selected = !sender.selected;
-    if (sender.selected) self.internalCheckBtn.selected = NO;
-}
+//- (IBAction)internalCheckBtnClick:(UIButton *)sender {
+//    sender.selected = !sender.selected;
+//    if (sender.selected) self.externalCheckBtn.selected = NO;
+//}
+//
+//- (IBAction)externalCheckBtnClick:(UIButton *)sender {
+//    sender.selected = !sender.selected;
+//    if (sender.selected) self.internalCheckBtn.selected = NO;
+//}
 
 #pragma mark - TextField Delegate
 

+ 22 - 59
RA Image/RA Image/Upload.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina5_5" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
@@ -162,37 +162,16 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Max Retry Count" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I3J-dT-AiE">
-                                <rect key="frame" x="20" y="261.66666666666669" width="268" height="31"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FYV-4e-6Ap">
-                                <rect key="frame" x="319" y="93" width="51" height="31"/>
-                                <connections>
-                                    <action selector="autoRmFinishClick:" destination="rW7-Ba-NwZ" eventType="valueChanged" id="8Bw-uk-9Do"/>
-                                </connections>
-                            </switch>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Auto Remove Finish" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Zr-Ac-9Ae">
-                                <rect key="frame" x="20" y="93" width="268" height="31"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gOA-fB-4s1">
-                                <rect key="frame" x="319" y="134" width="51" height="31"/>
-                                <connections>
-                                    <action selector="autoRmErrClick:" destination="rW7-Ba-NwZ" eventType="valueChanged" id="KtW-o9-qW6"/>
-                                </connections>
-                            </switch>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Auto Remove Error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lG4-HU-q7O">
-                                <rect key="frame" x="20" y="134" width="268" height="31"/>
+                                <rect key="frame" x="20" y="190" width="160" height="31"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="31" id="dtu-05-Dlj"/>
+                                </constraints>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="HEJ-Eh-vI4">
-                                <rect key="frame" x="319" y="261.66666666666669" width="49" height="31"/>
+                                <rect key="frame" x="319" y="190" width="49" height="30"/>
                                 <nil key="textColor"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
@@ -201,26 +180,32 @@
                                 </connections>
                             </textField>
                             <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ZKg-aU-mIC">
-                                <rect key="frame" x="319" y="175" width="51" height="31"/>
+                                <rect key="frame" x="319" y="98" width="51" height="31"/>
                                 <connections>
                                     <action selector="autoRmErrClick:" destination="rW7-Ba-NwZ" eventType="valueChanged" id="j2v-FC-9dI"/>
                                     <action selector="compressSwitchClick:" destination="rW7-Ba-NwZ" eventType="valueChanged" id="7It-Um-Jee"/>
                                 </connections>
                             </switch>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Compress Image" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="13k-tQ-BSv">
-                                <rect key="frame" x="20" y="180" width="129.66666666666666" height="20.666666666666657"/>
+                                <rect key="frame" x="20" y="98" width="130" height="31"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="31" id="YO3-Wm-GxN"/>
+                                </constraints>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Only Use The WiFi" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9mp-ot-ria">
-                                <rect key="frame" x="20" y="215.66666666666666" width="268" height="31"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Only Upload Via WiFi" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9mp-ot-ria">
+                                <rect key="frame" x="20" y="144" width="160" height="31"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="31" id="sH7-4Y-wnX"/>
+                                </constraints>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pSj-dG-qXr">
-                                <rect key="frame" x="319" y="215.66666666666666" width="51" height="31"/>
+                                <rect key="frame" x="319" y="144" width="51" height="31"/>
                                 <connections>
                                     <action selector="autoRmErrClick:" destination="rW7-Ba-NwZ" eventType="valueChanged" id="djr-GE-iLI"/>
                                     <action selector="compressSwitchClick:" destination="rW7-Ba-NwZ" eventType="valueChanged" id="Zg7-r2-eDx"/>
@@ -230,53 +215,31 @@
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
                             <constraint firstItem="pSj-dG-qXr" firstAttribute="width" secondItem="ZKg-aU-mIC" secondAttribute="width" id="0eG-Fh-0QA"/>
-                            <constraint firstItem="5Zr-Ac-9Ae" firstAttribute="top" secondItem="uVx-M4-Qy4" secondAttribute="bottom" constant="10" id="2oq-dc-wzL"/>
-                            <constraint firstItem="13k-tQ-BSv" firstAttribute="top" secondItem="lG4-HU-q7O" secondAttribute="bottom" constant="15" id="3l1-3S-bZz"/>
-                            <constraint firstItem="gOA-fB-4s1" firstAttribute="leading" secondItem="FYV-4e-6Ap" secondAttribute="leading" id="5jc-nd-fCa"/>
+                            <constraint firstItem="pSj-dG-qXr" firstAttribute="leading" secondItem="PZj-IO-85H" secondAttribute="leading" id="1RQ-kc-eVn"/>
                             <constraint firstItem="pSj-dG-qXr" firstAttribute="top" secondItem="9mp-ot-ria" secondAttribute="top" id="6dw-j4-tn9"/>
-                            <constraint firstItem="FYV-4e-6Ap" firstAttribute="leading" secondItem="PZj-IO-85H" secondAttribute="leading" id="7Vf-0z-Ijh"/>
                             <constraint firstAttribute="trailingMargin" secondItem="PZj-IO-85H" secondAttribute="trailing" constant="26" id="7bo-vv-OW6"/>
-                            <constraint firstItem="9mp-ot-ria" firstAttribute="height" secondItem="lG4-HU-q7O" secondAttribute="height" id="A7P-Ky-Xf3"/>
-                            <constraint firstItem="lG4-HU-q7O" firstAttribute="height" secondItem="5Zr-Ac-9Ae" secondAttribute="height" id="CWZ-uW-HAw"/>
-                            <constraint firstItem="5Zr-Ac-9Ae" firstAttribute="height" secondItem="uVx-M4-Qy4" secondAttribute="height" id="CvC-FX-OHH"/>
                             <constraint firstItem="pSj-dG-qXr" firstAttribute="height" secondItem="ZKg-aU-mIC" secondAttribute="height" id="ERz-NS-CbM"/>
                             <constraint firstItem="pSj-dG-qXr" firstAttribute="leading" secondItem="ZKg-aU-mIC" secondAttribute="leading" id="Ecj-cf-DyC"/>
                             <constraint firstItem="ZKg-aU-mIC" firstAttribute="centerY" secondItem="13k-tQ-BSv" secondAttribute="centerY" id="G5E-v9-6Fa"/>
-                            <constraint firstItem="13k-tQ-BSv" firstAttribute="leading" secondItem="lG4-HU-q7O" secondAttribute="leading" id="Gje-d8-QLD"/>
-                            <constraint firstItem="FYV-4e-6Ap" firstAttribute="height" secondItem="PZj-IO-85H" secondAttribute="height" id="HBu-2m-WlK"/>
-                            <constraint firstItem="9mp-ot-ria" firstAttribute="leading" secondItem="13k-tQ-BSv" secondAttribute="leading" id="IiS-ub-QCx"/>
-                            <constraint firstItem="lG4-HU-q7O" firstAttribute="leading" secondItem="5Zr-Ac-9Ae" secondAttribute="leading" id="ItV-fy-FwH"/>
+                            <constraint firstItem="pSj-dG-qXr" firstAttribute="trailing" secondItem="HEJ-Eh-vI4" secondAttribute="trailing" id="K0X-RP-MCo"/>
                             <constraint firstAttribute="leadingMargin" secondItem="uVx-M4-Qy4" secondAttribute="leading" id="Ka9-Iq-uvp"/>
-                            <constraint firstItem="HEJ-Eh-vI4" firstAttribute="height" secondItem="gOA-fB-4s1" secondAttribute="height" id="NM8-u8-jta"/>
-                            <constraint firstItem="9mp-ot-ria" firstAttribute="width" secondItem="lG4-HU-q7O" secondAttribute="width" id="Qi4-64-gDh"/>
+                            <constraint firstItem="13k-tQ-BSv" firstAttribute="top" secondItem="uVx-M4-Qy4" secondAttribute="bottom" constant="15" id="Qmv-4f-CND"/>
                             <constraint firstItem="9mp-ot-ria" firstAttribute="top" secondItem="13k-tQ-BSv" secondAttribute="bottom" constant="15" id="RXW-aO-3lO"/>
-                            <constraint firstItem="FYV-4e-6Ap" firstAttribute="width" secondItem="PZj-IO-85H" secondAttribute="width" id="Uoh-7Q-2ek"/>
                             <constraint firstItem="PZj-IO-85H" firstAttribute="leading" secondItem="uVx-M4-Qy4" secondAttribute="trailing" constant="31" id="Vzf-9z-cAO"/>
                             <constraint firstItem="HEJ-Eh-vI4" firstAttribute="top" secondItem="I3J-dT-AiE" secondAttribute="top" id="aD3-c9-GaE"/>
                             <constraint firstItem="uVx-M4-Qy4" firstAttribute="top" secondItem="8l0-nk-W7m" secondAttribute="bottom" constant="32" id="aVf-kB-5t2"/>
-                            <constraint firstItem="5Zr-Ac-9Ae" firstAttribute="width" secondItem="uVx-M4-Qy4" secondAttribute="width" id="bal-FY-Ct5"/>
                             <constraint firstItem="I3J-dT-AiE" firstAttribute="top" secondItem="9mp-ot-ria" secondAttribute="bottom" constant="15" id="csP-fg-iDf"/>
                             <constraint firstItem="I3J-dT-AiE" firstAttribute="width" secondItem="9mp-ot-ria" secondAttribute="width" id="dMq-mX-UG5"/>
-                            <constraint firstItem="HEJ-Eh-vI4" firstAttribute="leading" secondItem="gOA-fB-4s1" secondAttribute="leading" id="e3N-xS-gDH"/>
-                            <constraint firstItem="HEJ-Eh-vI4" firstAttribute="width" secondItem="gOA-fB-4s1" secondAttribute="width" id="f20-8E-4h4"/>
                             <constraint firstItem="HEJ-Eh-vI4" firstAttribute="leading" secondItem="pSj-dG-qXr" secondAttribute="leading" id="jS2-Bl-NWa"/>
+                            <constraint firstItem="13k-tQ-BSv" firstAttribute="leading" secondItem="uVx-M4-Qy4" secondAttribute="leading" id="kJm-Nv-4dy"/>
                             <constraint firstItem="I3J-dT-AiE" firstAttribute="height" secondItem="9mp-ot-ria" secondAttribute="height" id="oAY-mc-aaO"/>
+                            <constraint firstItem="13k-tQ-BSv" firstAttribute="leading" secondItem="9mp-ot-ria" secondAttribute="leading" id="oFc-Tg-Gqp"/>
                             <constraint firstItem="PZj-IO-85H" firstAttribute="height" secondItem="uVx-M4-Qy4" secondAttribute="height" id="pDj-6j-QwR"/>
-                            <constraint firstItem="ZKg-aU-mIC" firstAttribute="leading" secondItem="gOA-fB-4s1" secondAttribute="leading" id="pjc-md-epB"/>
                             <constraint firstItem="I3J-dT-AiE" firstAttribute="leading" secondItem="9mp-ot-ria" secondAttribute="leading" id="qpf-ne-VUI"/>
                             <constraint firstItem="PZj-IO-85H" firstAttribute="centerY" secondItem="uVx-M4-Qy4" secondAttribute="centerY" id="sNt-TE-Wt7"/>
-                            <constraint firstItem="lG4-HU-q7O" firstAttribute="top" secondItem="5Zr-Ac-9Ae" secondAttribute="bottom" constant="10" id="tha-TB-ufH"/>
-                            <constraint firstItem="gOA-fB-4s1" firstAttribute="centerY" secondItem="lG4-HU-q7O" secondAttribute="centerY" id="w7n-jz-bfA"/>
-                            <constraint firstItem="gOA-fB-4s1" firstAttribute="height" secondItem="FYV-4e-6Ap" secondAttribute="height" id="xHY-5Q-Rzf"/>
-                            <constraint firstItem="5Zr-Ac-9Ae" firstAttribute="leading" secondItem="uVx-M4-Qy4" secondAttribute="leading" id="xYh-My-SJg"/>
-                            <constraint firstItem="lG4-HU-q7O" firstAttribute="width" secondItem="5Zr-Ac-9Ae" secondAttribute="width" id="y6D-h3-KMb"/>
-                            <constraint firstItem="FYV-4e-6Ap" firstAttribute="centerY" secondItem="5Zr-Ac-9Ae" secondAttribute="centerY" id="yLL-Mq-hQ6"/>
-                            <constraint firstItem="gOA-fB-4s1" firstAttribute="width" secondItem="FYV-4e-6Ap" secondAttribute="width" id="zMI-7M-I2I"/>
                         </constraints>
                     </view>
                     <connections>
-                        <outlet property="autoRmErrorSwith" destination="gOA-fB-4s1" id="Qaa-bt-Q9U"/>
-                        <outlet property="autoRmFinishSwitch" destination="FYV-4e-6Ap" id="eTP-xV-a6u"/>
                         <outlet property="autoSwitch" destination="PZj-IO-85H" id="Nyl-DU-coe"/>
                         <outlet property="compressSwitch" destination="ZKg-aU-mIC" id="f1D-bt-5Oc"/>
                         <outlet property="onlyWiFiSwitch" destination="pSj-dG-qXr" id="ahs-FF-JEa"/>

+ 18 - 18
RA Image/RA Image/UploadSettingController.m

@@ -15,8 +15,8 @@ NSString *const kUploadSetting = @"UploadSettingKey";
 
 @property (strong, nonatomic) IBOutlet UISwitch *autoSwitch;
 @property (strong, nonatomic) IBOutlet UITextField *retryCountBox;
-@property (strong, nonatomic) IBOutlet UISwitch *autoRmFinishSwitch;
-@property (strong, nonatomic) IBOutlet UISwitch *autoRmErrorSwith;
+//@property (strong, nonatomic) IBOutlet UISwitch *autoRmFinishSwitch;
+//@property (strong, nonatomic) IBOutlet UISwitch *autoRmErrorSwith;
 @property (strong, nonatomic) IBOutlet UISwitch *compressSwitch;
 @property (strong, nonatomic) IBOutlet UISwitch *onlyWiFiSwitch;
 
@@ -32,31 +32,31 @@ NSString *const kUploadSetting = @"UploadSettingKey";
     self.navigationItem.rightBarButtonItem = saveItem;
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
     BOOL autoUpload = YES;
-    BOOL autoRmFinish = YES;
-    BOOL autoRmErr = NO;
+//    BOOL autoRmFinish = YES;
+//    BOOL autoRmErr = NO;
     BOOL compress = YES;
-    BOOL onlyWiFi = YES;
-    int retryCount = 2;
+    BOOL onlyWiFi = NO;
+    int retryCount = 5;
     NSDictionary *param = [self userDefaultsValue:kUploadSetting];
     if (param) {
         autoUpload = [[param objectForKey:@"auto_upload"] boolValue];
         retryCount = [[param objectForKey:@"retry_count"] intValue];
-        autoRmFinish = [[param objectForKey:@"auto_rm_finish"] boolValue];
-        autoRmErr = [[param objectForKey:@"auto_rm_error"] boolValue];
+//        autoRmFinish = [[param objectForKey:@"auto_rm_finish"] boolValue];
+//        autoRmErr = [[param objectForKey:@"auto_rm_error"] boolValue];
         compress = [[param objectForKey:@"compress_img"] boolValue];
         onlyWiFi = [[param objectForKey:@"only_wifi"] boolValue];
     } else {
         
         autoUpload = appDelegate.uploadManager.autoStart;
         retryCount = appDelegate.uploadManager.maxRetry;
-        autoRmFinish = appDelegate.uploadManager.removeFinish;
-        autoRmErr = appDelegate.uploadManager.removeError;
+//        autoRmFinish = appDelegate.uploadManager.removeFinish;
+//        autoRmErr = appDelegate.uploadManager.removeError;
         compress = appDelegate.compressFile;
         onlyWiFi = appDelegate.uploadManager.onlyWiFi;
     }
     self.autoSwitch.on = autoUpload;
-    self.autoRmFinishSwitch.on = autoRmFinish;
-    self.autoRmErrorSwith.on = autoRmErr;
+//    self.autoRmFinishSwitch.on = autoRmFinish;
+//    self.autoRmErrorSwith.on = autoRmErr;
     self.retryCountBox.text = [NSString stringWithFormat:@"%d",retryCount];
     self.compressSwitch.on = compress;
     self.onlyWiFiSwitch.on = onlyWiFi;
@@ -86,15 +86,15 @@ NSString *const kUploadSetting = @"UploadSettingKey";
 
 - (void)saveItemClick:(UIBarButtonItem *)sender {
     BOOL autoUpload = self.autoSwitch.isOn;
-    BOOL autoRmFinish = self.autoRmFinishSwitch.isOn;
-    BOOL autoRmErr = self.autoRmErrorSwith.isOn;
+//    BOOL autoRmFinish = self.autoRmFinishSwitch.isOn;
+//    BOOL autoRmErr = self.autoRmErrorSwith.isOn;
     BOOL compress = self.compressSwitch.isOn;
     int retryCount = [self.retryCountBox.text intValue];
     BOOL onlyWiFi = self.onlyWiFiSwitch.isOn;
     NSDictionary *param = @{
                             @"auto_upload" : @(autoUpload),
-                            @"auto_rm_finish"   : @(autoRmFinish),
-                            @"auto_rm_error"    : @(autoRmErr),
+//                            @"auto_rm_finish"   : @(autoRmFinish),
+//                            @"auto_rm_error"    : @(autoRmErr),
                             @"compress_img"     : @(compress),
                             @"retry_count" : @(retryCount),
                             @"only_wifi" : @(onlyWiFi)
@@ -104,8 +104,8 @@ NSString *const kUploadSetting = @"UploadSettingKey";
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
     appDelegate.uploadManager.maxRetry = retryCount;
     appDelegate.uploadManager.autoStart = autoUpload;
-    appDelegate.uploadManager.removeFinish = autoRmFinish;
-    appDelegate.uploadManager.removeError = autoRmErr;
+//    appDelegate.uploadManager.removeFinish = autoRmFinish;
+//    appDelegate.uploadManager.removeError = autoRmErr;
     appDelegate.compressFile = compress;
     appDelegate.uploadManager.onlyWiFi = onlyWiFi;
     

+ 2 - 2
common/upload/RAUploadManager.h

@@ -38,8 +38,8 @@ typedef NS_ENUM(NSInteger, QueueStatus) {
 -(void) addTask:(NSMutableDictionary*) task;
 -(void) addTasks:(NSMutableArray*) tasks;
 @property (nonatomic,assign) BOOL onlyWiFi;
-@property (assign) bool removeFinish;
-@property (assign) bool removeError;
+//@property (assign) bool removeFinish;
+//@property (assign) bool removeError;
 @property (assign) bool autoStart;
 @property (assign) QueueStatus queue_status;
 

+ 10 - 10
common/upload/RAUploadManager.m

@@ -59,16 +59,16 @@
             BOOL onlyWiFi = [[param objectForKey:@"only_wifi"] boolValue];
             int retryCount = [[param objectForKey:@"retry_count"] intValue];
             self.autoStart = autoUpload;
-            self.removeFinish = autoRmFinish;
-            self.removeError = autoRmErr;
+//            self.removeFinish = autoRmFinish;
+//            self.removeError = autoRmErr;
             self.maxRetry = retryCount;
             self.onlyWiFi = onlyWiFi;
         } else {
             self.autoStart = YES;
-            self.removeFinish = YES;
-            self.removeError = NO;
-            self.maxRetry = 2;
-            self.onlyWiFi = YES;
+//            self.removeFinish = YES;
+//            self.removeError = NO;
+            self.maxRetry = 5;
+            self.onlyWiFi = NO;
         }
 
         
@@ -422,14 +422,14 @@
         switch ([block_task[@"status"] intValue]) {
             case TaskStatusFinish:
             {
-                if(weakSelf.removeFinish)
-                   [self removeTask:block_task];
+//                if(weakSelf.removeFinish)
+//                   [self removeTask:block_task];
             }
                 break;
             case TaskStatusError:
             {
-                if(weakSelf.removeError)
-                    [self removeTask:block_task];
+//                if(weakSelf.removeError)
+//                    [self removeTask:block_task];
             }
                 break;
             default: