|
|
@@ -23,11 +23,12 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
|
|
|
#pragma mark - Private
|
|
|
|
|
|
-- (void)showHomeVCWithOrderID:(NSString *)orderID type:(NSInteger)type {
|
|
|
+- (void)showHomeVCWithOrderID:(NSString *)orderID type:(NSInteger)type type2:(NSString *)type2 {
|
|
|
|
|
|
RAHomeViewController *homeVC = [RAHomeViewController viewControllerFromStoryboard];
|
|
|
homeVC.gotoDetailID = orderID;
|
|
|
homeVC.gotoDetailType = type;
|
|
|
+ homeVC.gotoDetailType2 = type2;
|
|
|
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:homeVC];
|
|
|
self.window.rootViewController = nav;
|
|
|
}
|
|
|
@@ -41,7 +42,7 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
|
|
|
[[RASingleton sharedInstance] loginUser:user password:password];
|
|
|
|
|
|
- [weakSelf showHomeVCWithOrderID:nil type:OrderTypeNew];
|
|
|
+ [weakSelf showHomeVCWithOrderID:nil type:OrderTypeNew type2:nil];
|
|
|
};
|
|
|
|
|
|
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:rootVC];
|
|
|
@@ -117,11 +118,13 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
|
|
|
NSString *orderID = nil;
|
|
|
NSInteger orderType = OrderTypeNew;
|
|
|
+ NSString *orderType2 = nil;
|
|
|
if (launchOptions) {
|
|
|
NSDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
|
|
|
NSDictionary *aps = [userInfo objectForKey:@"aps"];
|
|
|
orderID = [aps objectForKey:@"order-id"];
|
|
|
orderType = [[aps objectForKey:@"order-type"] integerValue];
|
|
|
+ orderType2 = [aps objectForKey:@"order-type2"];
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -131,7 +134,7 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
self.window.backgroundColor = [UIColor whiteColor];
|
|
|
|
|
|
if (RASingleton.sharedInstance.autoLogin) {
|
|
|
- [self showHomeVCWithOrderID:orderID type:orderType];
|
|
|
+ [self showHomeVCWithOrderID:orderID type:orderType type2:orderType2];
|
|
|
} else {
|
|
|
[self showLoginVC];
|
|
|
}
|
|
|
@@ -217,8 +220,12 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
NSDictionary *aps = [userInfo objectForKey:@"aps"];
|
|
|
NSString *orderID = [aps objectForKey:@"order-id"];
|
|
|
NSInteger orderType = [[aps objectForKey:@"order-type"] integerValue];
|
|
|
+ NSString *orderType2 = [aps objectForKey:@"order-type2"];
|
|
|
+ if (!orderType2) {
|
|
|
+ orderType2 = @"";
|
|
|
+ }
|
|
|
if (orderID) {
|
|
|
- [[NSNotificationCenter defaultCenter] postNotificationName:RANotificationGoDetail object:@{@"orderID" : orderID,@"orderType" : @(orderType)}];
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:RANotificationGoDetail object:@{@"orderID" : orderID,@"orderType" : @(orderType),@"orderType2" : orderType2}];
|
|
|
}
|
|
|
|
|
|
completionHandler();
|
|
|
@@ -256,6 +263,7 @@ static const NSInteger OrderTypeNew = 2;
|
|
|
},
|
|
|
"new-order" : 1,
|
|
|
"order-id" : "AFS20180530001200",
|
|
|
+ "order-type2" : "Pick Up",
|
|
|
"order-type" : 2,
|
|
|
"sound" : "default",
|
|
|
"content-available" : 1
|