Forráskód Böngészése

1.修改iOS Apex Drivers Available上传参数。

Pen Li 7 éve
szülő
commit
6e45f6da3d

+ 1 - 1
Redant Drivers/Apex And Drivers/Filter/orderFilter.storyboard

@@ -120,7 +120,7 @@
                                             <rect key="frame" x="0.0" y="0.0" width="375" height="49.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
-                                                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Z7R-ah-wFK">
+                                                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Z7R-ah-wFK">
                                                     <rect key="frame" x="5" y="10" width="365" height="30"/>
                                                     <nil key="textColor"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>

+ 18 - 0
Redant Drivers/Apex And Drivers/Home/HomeHeader.xib

@@ -295,20 +295,38 @@
                                 <constraint firstAttribute="trailing" secondItem="apL-NL-f18" secondAttribute="trailing" id="xhd-F7-tzD"/>
                             </constraints>
                         </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ni3-TR-BVf">
+                            <rect key="frame" x="214" y="20.5" width="1" height="20"/>
+                            <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="20" id="6bX-Wf-tBG"/>
+                                <constraint firstAttribute="width" constant="1" id="vC6-FF-UYG"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tqP-9g-fiy">
+                            <rect key="frame" x="433" y="20.5" width="1" height="20"/>
+                            <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        </view>
                     </subviews>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
                         <constraint firstItem="PMs-34-A9a" firstAttribute="centerY" secondItem="xlF-8W-Q64" secondAttribute="centerY" id="89f-Ky-Xz9"/>
                         <constraint firstItem="thx-28-zRP" firstAttribute="leading" secondItem="PMs-34-A9a" secondAttribute="trailing" constant="5" id="9uh-Lp-BP4"/>
+                        <constraint firstItem="Ni3-TR-BVf" firstAttribute="centerY" secondItem="PMs-34-A9a" secondAttribute="centerY" id="Bvm-ge-bLe"/>
                         <constraint firstAttribute="trailing" secondItem="thx-28-zRP" secondAttribute="trailing" id="JIk-hm-o4c"/>
+                        <constraint firstItem="PMs-34-A9a" firstAttribute="leading" secondItem="Ni3-TR-BVf" secondAttribute="trailing" constant="2.5" id="Mw3-5Y-fVp"/>
                         <constraint firstItem="xlF-8W-Q64" firstAttribute="centerY" secondItem="kyi-82-tau" secondAttribute="centerY" id="RVI-Lh-yup"/>
                         <constraint firstItem="thx-28-zRP" firstAttribute="width" secondItem="PMs-34-A9a" secondAttribute="width" id="Vrf-Hv-U3o"/>
                         <constraint firstItem="PMs-34-A9a" firstAttribute="height" secondItem="xlF-8W-Q64" secondAttribute="height" id="bEL-Mc-ZvI"/>
+                        <constraint firstItem="tqP-9g-fiy" firstAttribute="width" secondItem="Ni3-TR-BVf" secondAttribute="width" id="dIL-dk-nvl"/>
                         <constraint firstItem="xlF-8W-Q64" firstAttribute="height" secondItem="kyi-82-tau" secondAttribute="height" id="eaC-V0-RTd"/>
                         <constraint firstItem="PMs-34-A9a" firstAttribute="width" secondItem="xlF-8W-Q64" secondAttribute="width" id="gDk-is-MGp"/>
                         <constraint firstItem="PMs-34-A9a" firstAttribute="leading" secondItem="xlF-8W-Q64" secondAttribute="trailing" constant="5" id="ivs-4h-sJQ"/>
                         <constraint firstItem="U0M-Uc-xWZ" firstAttribute="leading" secondItem="kyi-82-tau" secondAttribute="leading" id="jrd-DE-CxQ"/>
                         <constraint firstAttribute="height" constant="60" id="keo-5N-7kb"/>
+                        <constraint firstItem="tqP-9g-fiy" firstAttribute="leading" secondItem="PMs-34-A9a" secondAttribute="trailing" constant="2.5" id="nwe-Le-E8Z"/>
+                        <constraint firstItem="tqP-9g-fiy" firstAttribute="height" secondItem="Ni3-TR-BVf" secondAttribute="height" id="rcq-em-s3k"/>
+                        <constraint firstItem="tqP-9g-fiy" firstAttribute="centerY" secondItem="PMs-34-A9a" secondAttribute="centerY" id="vxV-sH-gwa"/>
                         <constraint firstItem="thx-28-zRP" firstAttribute="height" secondItem="PMs-34-A9a" secondAttribute="height" id="zKa-aL-L7h"/>
                         <constraint firstItem="thx-28-zRP" firstAttribute="centerY" secondItem="PMs-34-A9a" secondAttribute="centerY" id="zyi-vh-RFS"/>
                     </constraints>

+ 3 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m

@@ -320,9 +320,12 @@
                 NSInteger newCount = [[json objectForKey:@"new_count"] integerValue];
                 NSInteger processingCount = [[json objectForKey:@"processing_count"] integerValue];
                 NSInteger finishCount = [[json objectForKey:@"finish_count"] integerValue];
+                NSInteger messageCount = [[json objectForKey:@"message_count"] integerValue];
+                
                 strongSelf.headerView.NewOrderCount = newCount;
                 strongSelf.headerView.ProcessingOrderCount = processingCount;
                 strongSelf.headerView.FinishOrderCount = finishCount;
+                strongSelf.headerView.existNewMessage = messageCount > 0;
                 
                 int result = [[json objectForKey:@"result"] intValue];
                 if (result == RESULT_TRUE) {

+ 3 - 1
Redant Drivers/Apex And Drivers/RADataProvider.m

@@ -340,7 +340,9 @@
 + (NSDictionary *)updateDriverAvailable:(BOOL)available {
     
     NSMutableDictionary *params = [NSMutableDictionary dictionary];
-    [params setObject:@(available) forKey:@"available"];
+
+    int a = available ? 1 : 0;
+    [params setObject:@(a) forKey:@"available"];
     
     NSData* json=[self get_json:URL_DRIVER_AVAILABLE parameters:params  file:nil];
     

+ 6 - 1
Redant Drivers/Apex And Drivers/Setting/ChangePassword/RAChangePasswordViewController.m

@@ -127,10 +127,13 @@
     self.changeBtn.enabled = NO;
     self.cancelBtn.enabled = NO;
     
+    NSString *encryptOldpass = [RASingleton.sharedInstance encryptString:oldpass];
+    NSString *encryptNewpass = [RASingleton.sharedInstance encryptString:newpass];
+    
     RAProgressHUD *hud = [RAProgressHUD showHUDOnView:self.view];
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
        
-        NSDictionary *json = [RADataProvider requestChange:oldpass password:newpass];
+        NSDictionary *json = [RADataProvider requestChange:encryptOldpass password:encryptNewpass];
         int result = [[json objectForKey:@"result"] intValue];
         dispatch_async(dispatch_get_main_queue(), ^{
             
@@ -145,6 +148,8 @@
                 UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:@"change password success" preferredStyle:UIAlertControllerStyleAlert];
                 UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                     
+                    [self dismissViewControllerAnimated:YES completion:nil];
+                    
                 }];
                 
                 [alertVC addAction:okAction];

+ 3 - 2
Redant Drivers/Apex And Drivers/Setting/RASettingViewController+TableDelegate.m

@@ -93,8 +93,9 @@
             
             NSFileManager *defaultManager = [NSFileManager defaultManager];
             NSString *cacheDir = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
-            if ([defaultManager fileExistsAtPath:cacheDir]) {
-                [defaultManager removeItemAtPath:cacheDir error:nil];
+            NSString *imageCacheDir = [cacheDir stringByAppendingPathComponent:@"ImageCache"];
+            if ([defaultManager fileExistsAtPath:imageCacheDir]) {
+                [defaultManager removeItemAtPath:imageCacheDir error:nil];
             }
             sleep(1.0);
             dispatch_async(dispatch_get_main_queue(), ^{

+ 3 - 3
Redant Drivers/Apex And Drivers/Setting/setting.storyboard

@@ -317,7 +317,7 @@
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Old password *required" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="AGg-Is-zfV">
+                            <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Old password *required" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="AGg-Is-zfV">
                                 <rect key="frame" x="5" y="61" width="365" height="30"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="30" id="tdG-fz-DUH"/>
@@ -335,7 +335,7 @@
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="New password *required" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="one-j7-LgU">
+                            <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="New password *required" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="one-j7-LgU">
                                 <rect key="frame" x="5" y="101" width="365" height="30"/>
                                 <nil key="textColor"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
@@ -344,7 +344,7 @@
                                     <outlet property="delegate" destination="q0p-GF-XgD" id="s14-bx-KKH"/>
                                 </connections>
                             </textField>
-                            <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Confirm new password *required" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dQK-Xb-iG2">
+                            <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Confirm new password *required" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="dQK-Xb-iG2">
                                 <rect key="frame" x="5" y="141" width="365" height="30"/>
                                 <nil key="textColor"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>

+ 1 - 1
Redant Drivers/Apex And Drivers/config.h

@@ -29,7 +29,7 @@
 #define URL_REPORT_TOKEN        APPENDING_STR(@"/j/mobile/uploadToken.mo/")
 #define URL_RETRIVE_PASSWORD    APPENDING_STR(@"/j/mobile/resetPassword.mo/")
 #define URL_DRIVER_AVAILABLE    APPENDING_STR(@"/j/mobile/updateDriverAvailable.mo/")
-#define URL_CHANGE_PASSWORD     APPENDING_STR(@"/j/mobile/updateDriverAvailable.mo/")
+#define URL_CHANGE_PASSWORD     APPENDING_STR(@"/j/mobile/changePassword.mo/")
 #define URL_MESSAGE_LIST        APPENDING_STR(@"/j/mobile/moreDriverMessages.mo/")
 
 //#define URL_HOME                @"http://192.168.0.130:8080/MyWeb/Test"