Browse Source

修改apex land 部分消息提示,增加2.0接口,增加定位信息 speed,timestamp,定位失败原因等

Ray Zhang 6 năm trước cách đây
mục cha
commit
ccc7cae290

+ 3 - 3
Redant Drivers/Apex And Drivers/AppDelegate.m

@@ -348,7 +348,7 @@
                     
                 } else {
                     
-                    [self rejectReportLocationWithReason:[NSString stringWithFormat:@"Driver %@ rejected to report location",RASingleton.sharedInstance.user] forOrder:orderID locationID:locationId];
+                    [self rejectReportLocationWithReason:[NSString stringWithFormat:@"Reject tracing by app setting Driver: %@",RASingleton.sharedInstance.user] forOrder:orderID locationID:locationId];
                 }
                 
                 return;
@@ -363,7 +363,7 @@
                 [self askForReportLastLocation:orderID locationID:locationId];
             } else if (RASingleton.sharedInstance.backgroundReportType == RABackgroundReportTypeReject) {
                 
-                [self rejectReportLocationWithReason:[NSString stringWithFormat:@"Driver %@ rejected to report location",RASingleton.sharedInstance.user] forOrder:orderID locationID:locationId];
+                [self rejectReportLocationWithReason:[NSString stringWithFormat:@"Reject ping by  app setting,driver: %@",RASingleton.sharedInstance.user] forOrder:orderID locationID:locationId];
             }
             completionHandler(UIBackgroundFetchResultNewData);
         } else {
@@ -452,7 +452,7 @@
         UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:[NSString stringWithFormat:@"Report Location For Order:%@",orderID] preferredStyle:UIAlertControllerStyleAlert];
         UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
             
-            [self rejectReportLocationWithReason:[NSString stringWithFormat:@"Driver %@ cancel to report location",RASingleton.sharedInstance.user] forOrder:orderID locationID:locationId];
+            [self rejectReportLocationWithReason:[NSString stringWithFormat:@"Driver %@ choose cancel of report location",RASingleton.sharedInstance.user] forOrder:orderID locationID:locationId];
             
         }];
         

+ 12 - 1
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController.m

@@ -416,16 +416,27 @@
     if (self.orderType2) {
         [params setObject:self.orderType2 forKey:@"orderType2"];
     }
-    if (/*RASingleton.sharedInstance.requiredBackgroundLocation*/true)
+    
+    CLAuthorizationStatus locationAuthoriztionAstatus = [CLLocationManager authorizationStatus];
+    
+    if (/*RASingleton.sharedInstance.requiredBackgroundLocation*/locationAuthoriztionAstatus != kCLAuthorizationStatusDenied)
     {
         CLLocation *location = RASingleton.sharedInstance.currentLocation;
         NSString *latLon = nil;
         if (location) {
             latLon = [NSString stringWithFormat:@"%f,%f",location.coordinate.latitude,location.coordinate.longitude];
+            [params setObject:@(location.speed) forKey:@"speed"];
+            [params setObject:@([location.timestamp timeIntervalSince1970]) forKey:@"timestamp"];
         } else {
             latLon = @"-999,-999";
         }
         [params setObject:latLon forKey:@"location"];
+        [params setObject:@false forKey:@"user_reject"];
+    }
+    else
+    {
+        [params setObject:@true forKey:@"user_reject"];
+        [params setObject:@"Location Denied by app setting" forKey:@"reason"];
     }
     NSMutableArray *emptyArr = [NSMutableArray array];
     

+ 25 - 10
Redant Drivers/Apex And Drivers/config.h

@@ -29,24 +29,39 @@
 #endif
 
 #define APPENDING_STR(var)      [URL_HOST stringByAppendingString:var]
-
-#define URL_INTERFACE_TEST      APPENDING_STR(@"/mobile/testInterface.mo/")
+//不用修改的接口
 #define URL_ERR_LOG             @""
 #define URL_LOGIN               APPENDING_STR(@"/mobile/login.mo/")
-#define URL_HOME                APPENDING_STR(@"/mobile/truckPage.mo/")
-#define URL_MORE_ORDER          APPENDING_STR(@"/mobile/morePickupOrders.mo/")
-#define URL_DETAIL              APPENDING_STR(@"/mobile/orderDetails.mo/")
-#define URL_UPDATE              APPENDING_STR(@"/mobile/actionDetails.mo/")
-#define URL_SUBMIT              APPENDING_STR(@"/mobile/updateContainerData.mo/")
-#define URL_UPLOAD              APPENDING_STR(@"/mobile/uploadContainerFiles.mo/")
 #define URL_LOGOUT              APPENDING_STR(@"/mobile/loginOut.mo/")
-#define URL_REPORT_LOCATION     APPENDING_STR(@"/mobile/uploadDriverLocation.mo/")
-#define URL_REPORT_TOKEN        APPENDING_STR(@"/mobile/uploadToken.mo/")
 #define URL_RETRIVE_PASSWORD    APPENDING_STR(@"/mobile/resetPassword.mo/")
+#define URL_REPORT_TOKEN        APPENDING_STR(@"/mobile/uploadToken.mo/")
 #define URL_DRIVER_AVAILABLE    APPENDING_STR(@"/mobile/updateDriverAvailable.mo/")
 #define URL_CHANGE_PASSWORD     APPENDING_STR(@"/mobile/changePassword.mo/")
+//需要修改的接口
+
+
+
+#define URL_UPLOAD              APPENDING_STR(@"/mobile/uploadContainerFiles.mo/")
+#define URL_REPORT_LOCATION     APPENDING_STR(@"/mobile/uploadDriverLocation.mo/")
 #define URL_MESSAGE_LIST        APPENDING_STR(@"/mobile/moreDriverMessages.mo/")
 
+
+
+//完成修改的接口
+
+#define URL_DETAIL              APPENDING_STR(@"/mobile/orderDetails.mo/")
+#define URL_UPDATE              APPENDING_STR(@"/mobile/actionDetails.mo/")
+#define URL_MORE_ORDER          APPENDING_STR(@"/mobile/morePickupOrders.mo/")
+#define URL_HOME                APPENDING_STR(@"/mobile/truckPage.mo/")
+#define URL_SUBMIT              APPENDING_STR(@"/mobile/updateContainerData.mo/")
+
+//#define URL_DETAIL              APPENDING_STR(@"/mobile/orderDetails2.mo/")
+//#define URL_UPDATE              APPENDING_STR(@"/mobile/checkInDetails.mo/")
+//#define URL_MORE_ORDER          APPENDING_STR(@"/mobile/fullOrderList.mo/")
+//#define URL_HOME                APPENDING_STR(@"/mobile/homePage.mo/")
+//#define URL_SUBMIT              APPENDING_STR(@"/mobile/CheckIn.mo/")
+
+
 //#define URL_HOME                @"http://192.168.0.130:8080/MyWeb/Test"
 //#define URL_LOGIN               @"http://192.168.0.130:8080/MyWeb/Test"
 #endif /* config_h */