static void pushPage(string type, string subType, string id, bool isPush = false) { if (type == "project") { if (subType == "article") { AnalyticsManager.ClickEnterArticleDetail("Push_Article", id, $"PushArticle_{id}"); StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToArticleDetailAction { articleId = id, isPush = isPush }); } } else if (type == "event") { var eventType = EventType.offline; if (subType == "online") { eventType = EventType.online; } AnalyticsManager.ClickEnterEventDetail("Push_Event", id, $"PushEvent_{id}", eventType.ToString()); StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToEventDetailAction { eventId = id, eventType = eventType }); } else if (type == "team") { if (subType == "follower") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToTeamDetailAction { teamId = id }); } } else if (type == "user") { if (subType == "follower") { StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToUserDetailAction { userId = id }); } } else if (type == "webView") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToWebViewAction { url = id }); } }
static void pushPage(string type, string subType, string id) { if (type == "project") { if (subType == "article") { AnalyticsManager.ClickEnterArticleDetail("Push_Article", id, $"PushArticle_{id}"); StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToArticleDetailAction { articleId = id }); } } else if (type == "event") { var eventType = EventType.offline; if (subType == "online") { eventType = EventType.online; } AnalyticsManager.ClickEnterEventDetail("Push_Event", id, $"PushEvent_{id}", type); StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToEventDetailAction { eventId = id, eventType = eventType }); } else if (type == "webView") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToWebViewAction { url = id }); } }
static void pushPage(string type, string subType, string id, bool isPush = false) { if (type != "rank" && id.isEmpty()) { return; } if (VersionManager.needForceUpdate()) { return; } if (type == "project") { if (subType == "article") { AnalyticsManager.ClickEnterArticleDetail("Push_Article", id, $"PushArticle_{id}"); if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToArticleDetailAction { articleId = id, isPush = isPush }); } } else if (type == "event") { var eventType = EventType.offline; if (subType == "online") { eventType = EventType.online; } AnalyticsManager.ClickEnterEventDetail("Push_Event", id, $"PushEvent_{id}", eventType.ToString()); if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToEventDetailAction { eventId = id, eventType = eventType }); } else if (type == "team") { if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } if (subType == "follower") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToTeamDetailAction { teamId = id }); } } else if (type == "user") { if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } if (subType == "follower") { StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToUserDetailAction { userId = id }); } } else if (type == "webView") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToWebViewAction { url = id }); } else if (type == "messenger") { if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } if (isPush) { if (UserInfoManager.isLogin()) { StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToChannelAction { channelId = id }); } else { Router.navigator.pushNamed(routeName: MainNavigatorRoutes.Login); } } else { StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToChannelShareAction { channelId = id }); } } else if (type == "rank") { if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } var initIndex = 0; switch (subType) { case "column": { initIndex = 1; break; } case "blogger": { initIndex = 2; break; } } StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToLeaderBoardAction { initIndex = initIndex }); } else if (type == "weixin") { if (subType == "miniprogram") { if (WechatPlugin.instance().isInstalled()) { var path = CStringUtils.CreateMiniPath(id: id, title: ""); WechatPlugin.instance().toOpenMiNi(path); } } } }
static void pushPage(string type, string subType, string id, bool isPush = false) { if (id.isEmpty()) { return; } if (type == "project") { if (subType == "article") { AnalyticsManager.ClickEnterArticleDetail("Push_Article", id, $"PushArticle_{id}"); if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToArticleDetailAction { articleId = id, isPush = isPush }); } } else if (type == "event") { var eventType = EventType.offline; if (subType == "online") { eventType = EventType.online; } AnalyticsManager.ClickEnterEventDetail("Push_Event", id, $"PushEvent_{id}", eventType.ToString()); if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToEventDetailAction { eventId = id, eventType = eventType }); } else if (type == "team") { if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } if (subType == "follower") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToTeamDetailAction { teamId = id }); } } else if (type == "user") { if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } if (subType == "follower") { StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToUserDetailAction { userId = id }); } } else if (type == "webView") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToWebViewAction { url = id }); } else if (type == "messenger") { if (CTemporaryValue.currentPageModelId.isNotEmpty() && id == CTemporaryValue.currentPageModelId) { return; } if (isPush) { if (UserInfoManager.isLogin()) { StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToChannelAction { channelId = id }); } else { Router.navigator.pushNamed(routeName: MainNavigatorRoutes.Login); } } else { StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToChannelShareAction { channelId = id }); } } }
public static void pushPage(string type, string subType, string id, bool isPush = false) { if (id.isEmpty()) { return; } if (type == "project") { if (subType == "article") { AnalyticsManager.ClickEnterArticleDetail("Push_Article", id, $"PushArticle_{id}"); StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToArticleDetailAction { articleId = id, isPush = isPush }); } } else if (type == "event") { var eventType = EventType.offline; if (subType == "online") { eventType = EventType.online; } AnalyticsManager.ClickEnterEventDetail("Push_Event", id, $"PushEvent_{id}", eventType.ToString()); StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToEventDetailAction { eventId = id, eventType = eventType }); } else if (type == "team") { if (subType == "follower") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToTeamDetailAction { teamId = id }); } } else if (type == "user") { if (subType == "follower") { StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToUserDetailAction { userId = id }); } } else if (type == "webView") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToWebViewAction { url = id }); } else if (type == "messenger") { if (MessageUtils.currentChannelId.isNotEmpty() && id == MessageUtils.currentChannelId) { return; } if (subType == "channelAt") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToChannelAction { channelId = id }); } else if (subType == "channelShare") { StoreProvider.store.dispatcher.dispatch( new MainNavigatorPushToChannelShareAction { channelId = id }); } } }