Commit 8fd31c33 by lee

u deeplink open view animated

parent ff59cbe9
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
return [[AppDelegate mainViewController] selectedViewController]; return [[AppDelegate mainViewController] selectedViewController];
} }
- (void) pushViewController:(UIViewController *) vc {
[[self navigationController] pushViewController:vc animated:[[UIApplication sharedApplication] applicationState] == UIApplicationStateActive];
}
- (void)registerRouter { - (void)registerRouter {
JLRoutes *routes = [JLRoutes routesForScheme:@"cemarose"]; JLRoutes *routes = [JLRoutes routesForScheme:@"cemarose"];
[routes addRoute:@"/collections/:handle/*" handler:^BOOL(NSDictionary<NSString *,id> * _Nonnull parameters) { [routes addRoute:@"/collections/:handle/*" handler:^BOOL(NSDictionary<NSString *,id> * _Nonnull parameters) {
...@@ -35,13 +39,14 @@ ...@@ -35,13 +39,14 @@
brandCaramelVC.isSale = NO; brandCaramelVC.isSale = NO;
brandCaramelVC.handle = handle; brandCaramelVC.handle = handle;
brandCaramelVC.brand = handle; brandCaramelVC.brand = handle;
[[self navigationController] pushViewController:brandCaramelVC animated:NO]; [self pushViewController:brandCaramelVC];
}else{ }else{
KWMSelectedGoodsVC * selectedGoodsVC = (KWMSelectedGoodsVC *)[KWMBaseVC findControllerBy:[KWMSelectedGoodsVC kwmTag] fromStoryboard:@"New"]; KWMSelectedGoodsVC * selectedGoodsVC = (KWMSelectedGoodsVC *)[KWMBaseVC findControllerBy:[KWMSelectedGoodsVC kwmTag] fromStoryboard:@"New"];
selectedGoodsVC.handle = handle; selectedGoodsVC.handle = handle;
selectedGoodsVC.ctags = tags; selectedGoodsVC.ctags = tags;
selectedGoodsVC.title = parameters[@"title"]; selectedGoodsVC.title = parameters[@"title"];
[[AppDelegate mainViewController].selectedViewController pushViewController:selectedGoodsVC animated:NO]; [self pushViewController:selectedGoodsVC];
} }
return YES; return YES;
}]; }];
...@@ -52,7 +57,7 @@ ...@@ -52,7 +57,7 @@
// productDetailVC.product = brandCell.leftProduct; // productDetailVC.product = brandCell.leftProduct;
vc.handle = parameters[@"id"]; vc.handle = parameters[@"id"];
// NSLog(@"%@",[AppDelegate mainViewController].selectedViewController); // NSLog(@"%@",[AppDelegate mainViewController].selectedViewController);
[[AppDelegate mainViewController].selectedViewController pushViewController:vc animated:NO]; [self pushViewController:vc];
return YES; return YES;
}]; }];
[routes addRoute:@"/blogs/:blog/:handle" handler:^BOOL(NSDictionary<NSString *,id> * _Nonnull parameters) { [routes addRoute:@"/blogs/:blog/:handle" handler:^BOOL(NSDictionary<NSString *,id> * _Nonnull parameters) {
...@@ -60,7 +65,7 @@ ...@@ -60,7 +65,7 @@
blogDetailVC.handle = parameters[@"handle"]; blogDetailVC.handle = parameters[@"handle"];
blogDetailVC.type = KWMContentTypeBlog;; blogDetailVC.type = KWMContentTypeBlog;;
blogDetailVC.title = parameters[@"title"]; blogDetailVC.title = parameters[@"title"];
[[AppDelegate mainViewController].selectedViewController pushViewController:blogDetailVC animated:NO]; [self pushViewController:blogDetailVC];
return YES; return YES;
}]; }];
[routes addRoute:@"/pages/:handle" handler:^BOOL(NSDictionary<NSString *,id> * _Nonnull parameters) { [routes addRoute:@"/pages/:handle" handler:^BOOL(NSDictionary<NSString *,id> * _Nonnull parameters) {
...@@ -68,7 +73,7 @@ ...@@ -68,7 +73,7 @@
blogDetailVC.handle = parameters[@"handle"]; blogDetailVC.handle = parameters[@"handle"];
blogDetailVC.type = KWMContentTypePage; blogDetailVC.type = KWMContentTypePage;
blogDetailVC.title = parameters[@"title"]; blogDetailVC.title = parameters[@"title"];
[[AppDelegate mainViewController].selectedViewController pushViewController:blogDetailVC animated:NO]; [self pushViewController:blogDetailVC];
return YES; return YES;
}]; }];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment