Bladeren bron

增加未读消息数维护逻辑

Ray Zhang 7 jaren geleden
bovenliggende
commit
9106c5cfe6

+ 2 - 1
Redant Drivers/Apex And Drivers/AppDelegate.m

@@ -237,7 +237,7 @@
         }];
         }];
         self.uploadManager = [RAUploadManager sharedManager];
         self.uploadManager = [RAUploadManager sharedManager];
     }
     }
-    [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
+//    [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
     
     
     // 程序在后台收到通知后,直接打开程序的情况下弹窗提示
     // 程序在后台收到通知后,直接打开程序的情况下弹窗提示
     if (self.currentOrderNotification) {
     if (self.currentOrderNotification) {
@@ -332,6 +332,7 @@
     if (userInfo) {
     if (userInfo) {
         
         
         NSDictionary *aps = [userInfo objectForKey:@"aps"];
         NSDictionary *aps = [userInfo objectForKey:@"aps"];
+//        [UIApplication sharedApplication].applicationIconBadgeNumber = [aps[@"badge"] intValue];
         NSInteger report_location = [[aps objectForKey:@"report-location"] integerValue];
         NSInteger report_location = [[aps objectForKey:@"report-location"] integerValue];
         if (report_location == 1) {
         if (report_location == 1) {
             
             

+ 2 - 0
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.m

@@ -253,6 +253,8 @@
                 
                 
                 int result = [[json objectForKey:@"result"] intValue];
                 int result = [[json objectForKey:@"result"] intValue];
                 if (result == RESULT_TRUE) {
                 if (result == RESULT_TRUE) {
+                    int badge = [json[@"badge"] intValue];
+                    [UIApplication sharedApplication].applicationIconBadgeNumber=badge;
                     
                     
                     if (!strongSelf.firstRequestOk) { // 刷新Home或More的backendFlag圆点
                     if (!strongSelf.firstRequestOk) { // 刷新Home或More的backendFlag圆点
                         [[NSNotificationCenter defaultCenter] postNotificationName:RANotificationCheckDetail object:nil userInfo:@{@"order_id":strongSelf.orderID}];
                         [[NSNotificationCenter defaultCenter] postNotificationName:RANotificationCheckDetail object:nil userInfo:@{@"order_id":strongSelf.orderID}];

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

@@ -507,6 +507,8 @@
                 int result = [[json objectForKey:@"result"] intValue];
                 int result = [[json objectForKey:@"result"] intValue];
                 if (result == RESULT_TRUE) {
                 if (result == RESULT_TRUE) {
                     
                     
+                    int badge = [json[@"badge"] intValue];
+                    [UIApplication sharedApplication].applicationIconBadgeNumber=badge;
                     BOOL requiredLocation = [[json objectForKey:@"requiredLocation"] boolValue];
                     BOOL requiredLocation = [[json objectForKey:@"requiredLocation"] boolValue];
                     [RASingleton sharedInstance].requiredBackgroundLocation = requiredLocation;
                     [RASingleton sharedInstance].requiredBackgroundLocation = requiredLocation;
                     
                     

+ 2 - 1
Redant Drivers/Apex And Drivers/Message/RAMessageViewController.m

@@ -187,7 +187,8 @@ typedef enum {
                 if (result == RESULT_TRUE) {
                 if (result == RESULT_TRUE) {
                     
                     
                     NSArray *messages = [json objectForKey:@"messages"];
                     NSArray *messages = [json objectForKey:@"messages"];
-                    
+                    int badge = [json[@"badge"] intValue];
+                    [UIApplication sharedApplication].applicationIconBadgeNumber=badge;
                     if (actionType != LoadDataActionTypeLoadMore) {
                     if (actionType != LoadDataActionTypeLoadMore) {
                         [strongSelf.messageArray removeAllObjects];
                         [strongSelf.messageArray removeAllObjects];
                     } else {
                     } else {

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

@@ -17,12 +17,20 @@
 #define ApexDriverWhiteColor UIColorFromRGB(0xffffff)
 #define ApexDriverWhiteColor UIColorFromRGB(0xffffff)
 #define ApexDriverRedColor UIColorFromRGB(0xAE2838)
 #define ApexDriverRedColor UIColorFromRGB(0xAE2838)
 
 
-//#define URL_HOST                @"https://ra.apexshipping.com/truck/"
-#define URL_HOST                @"https://ra.apexshipping.com/t"
+# ifdef DEBUG
+#define test_server
+# endif
 
 
+#ifdef test_server
+    #define URL_HOST                @"http://192.168.0.138:8080/TruckingSuiteOnline/"
+# else
+
+    #define URL_HOST                @"https://ra.apexshipping.com/t"
+#endif
 
 
 #define APPENDING_STR(var)      [URL_HOST stringByAppendingString:var]
 #define APPENDING_STR(var)      [URL_HOST stringByAppendingString:var]
 
 
+#define URL_INTERFACE_TEST      APPENDING_STR(@"/mobile/testInterface.mo/")
 #define URL_ERR_LOG             @""
 #define URL_ERR_LOG             @""
 #define URL_LOGIN               APPENDING_STR(@"/mobile/login.mo/")
 #define URL_LOGIN               APPENDING_STR(@"/mobile/login.mo/")
 #define URL_HOME                APPENDING_STR(@"/mobile/truckPage.mo/")
 #define URL_HOME                APPENDING_STR(@"/mobile/truckPage.mo/")

BIN
Redant Drivers/Redant Drivers.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 92 - 28
Redant Drivers/Redant Drivers.xcworkspace/xcuserdata/ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -137,7 +137,7 @@
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "167"
             startingLineNumber = "167"
             endingLineNumber = "167"
             endingLineNumber = "167"
-            landmarkName = "-signatureCell:tapSignature:"
+            landmarkName = "-scanInputCell:clickScanButton:"
             landmarkType = "7">
             landmarkType = "7">
          </BreakpointContent>
          </BreakpointContent>
       </BreakpointProxy>
       </BreakpointProxy>
@@ -324,7 +324,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
-            timestampString = "572583324.40264"
+            timestampString = "579427993.518012"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "43"
             startingLineNumber = "43"
@@ -436,7 +436,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/RADataProvider.m"
             filePath = "Apex And Drivers/RADataProvider.m"
-            timestampString = "577010780.984609"
+            timestampString = "578046399.5236911"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "199"
             startingLineNumber = "199"
@@ -452,7 +452,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/RADataProvider.m"
             filePath = "Apex And Drivers/RADataProvider.m"
-            timestampString = "577010780.986095"
+            timestampString = "578046399.5251811"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "302"
             startingLineNumber = "302"
@@ -484,7 +484,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Detail/RAOrderDetailViewController.m"
             filePath = "Apex And Drivers/Detail/RAOrderDetailViewController.m"
-            timestampString = "572260585.120275"
+            timestampString = "579506668.409583"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "213"
             startingLineNumber = "213"
@@ -500,11 +500,11 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572583324.402934"
+            timestampString = "579506668.409731"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "510"
-            endingLineNumber = "510"
+            startingLineNumber = "512"
+            endingLineNumber = "512"
             landmarkName = "-loadData"
             landmarkName = "-loadData"
             landmarkType = "7">
             landmarkType = "7">
          </BreakpointContent>
          </BreakpointContent>
@@ -532,11 +532,11 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/AppDelegate.m"
             filePath = "Apex And Drivers/AppDelegate.m"
-            timestampString = "572520483.4308701"
+            timestampString = "579427993.518934"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "510"
-            endingLineNumber = "510"
+            startingLineNumber = "511"
+            endingLineNumber = "511"
             landmarkName = "-locationManager:didChangeAuthorizationStatus:"
             landmarkName = "-locationManager:didChangeAuthorizationStatus:"
             landmarkType = "7">
             landmarkType = "7">
          </BreakpointContent>
          </BreakpointContent>
@@ -596,11 +596,11 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572583324.4035341"
+            timestampString = "579506668.410284"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "675"
-            endingLineNumber = "675"
+            startingLineNumber = "677"
+            endingLineNumber = "677"
             landmarkName = "-signoutClick:"
             landmarkName = "-signoutClick:"
             landmarkType = "7">
             landmarkType = "7">
          </BreakpointContent>
          </BreakpointContent>
@@ -612,7 +612,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
-            timestampString = "572583324.403964"
+            timestampString = "579427993.519044"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "118"
             startingLineNumber = "118"
@@ -628,7 +628,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
-            timestampString = "572583324.404022"
+            timestampString = "579427993.519356"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "124"
             startingLineNumber = "124"
@@ -644,7 +644,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
-            timestampString = "572583324.404084"
+            timestampString = "579427993.5196379"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "130"
             startingLineNumber = "130"
@@ -656,11 +656,11 @@
       <BreakpointProxy
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
             filePath = "Apex And Drivers/Home/RAHomeHeaderView.m"
-            timestampString = "572583324.404145"
+            timestampString = "579427993.5198981"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "136"
             startingLineNumber = "136"
@@ -676,7 +676,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572583324.404197"
+            timestampString = "579506668.410817"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "491"
             startingLineNumber = "491"
@@ -740,7 +740,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572583324.404632"
+            timestampString = "579506668.411182"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "179"
             startingLineNumber = "179"
@@ -756,7 +756,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572583324.405009"
+            timestampString = "579506668.411461"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "125"
             startingLineNumber = "125"
@@ -772,7 +772,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572583324.405408"
+            timestampString = "579506668.411918"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "474"
             startingLineNumber = "474"
@@ -788,7 +788,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572583324.405768"
+            timestampString = "579506668.412275"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "152"
             startingLineNumber = "152"
@@ -820,7 +820,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572583324.406143"
+            timestampString = "579506668.412712"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "215"
             startingLineNumber = "215"
@@ -836,7 +836,7 @@
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
             filePath = "Apex And Drivers/Home/RAHomeViewController.m"
-            timestampString = "572583324.406553"
+            timestampString = "579506668.413022"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "192"
             startingLineNumber = "192"
@@ -911,11 +911,11 @@
       <BreakpointProxy
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             continueAfterRunningActions = "No"
             filePath = "Apex And Drivers/AppDelegate.m"
             filePath = "Apex And Drivers/AppDelegate.m"
-            timestampString = "573535839.840439"
+            timestampString = "579427993.520294"
             startingColumnNumber = "9223372036854775807"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "332"
             startingLineNumber = "332"
@@ -924,5 +924,69 @@
             landmarkType = "7">
             landmarkType = "7">
          </BreakpointContent>
          </BreakpointContent>
       </BreakpointProxy>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/RADataProvider.m"
+            timestampString = "578046399.527509"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "71"
+            endingLineNumber = "71"
+            landmarkName = "+get_json:parameters:file:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/NetworkUtils.m"
+            timestampString = "578735684.505744"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "159"
+            endingLineNumber = "159"
+            landmarkName = "+get_json:parameters:file:err_recorder:result_handler:decrypt_handler:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/RADataProvider.m"
+            timestampString = "578046399.5282"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "353"
+            endingLineNumber = "353"
+            landmarkName = "+requestUpdateOrder:driverAction:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex And Drivers/AppDelegate.m"
+            timestampString = "579427993.520376"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "331"
+            endingLineNumber = "331"
+            landmarkName = "-application:didReceiveRemoteNotification:fetchCompletionHandler:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
    </Breakpoints>
 </Bucket>
 </Bucket>