|
@@ -191,55 +191,6 @@ class CommunityViewController: BaseViewController {
|
|
|
self?.navigationController?.pushViewController(vc, animated: true)
|
|
|
}
|
|
|
|
|
|
- // banner跳转
|
|
|
- observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("CommunityBannerClosure"), object: nil, queue: OperationQueue.main) {[weak self] (notification) in
|
|
|
- let communityRecommendTypeDataModel = notification.object as? CommunityRecommendTypeDataModel
|
|
|
- let communityBannerType = CommunityBannerType(rawValue: communityRecommendTypeDataModel?.type ?? 0)
|
|
|
- switch communityBannerType {
|
|
|
- case .none?:
|
|
|
- break
|
|
|
- case .content?: //内容
|
|
|
- let postType = PostType(rawValue: communityRecommendTypeDataModel?.postType ?? "image")
|
|
|
- switch postType {
|
|
|
- case .image?:
|
|
|
- let vc = CommunityRecommendController()
|
|
|
- vc.id = communityRecommendTypeDataModel?.linkContentId ?? 0
|
|
|
- self?.navigationController?.pushViewController(vc, animated: true)
|
|
|
- break
|
|
|
- case .html?:
|
|
|
- let vc = CommunityRecommendController()
|
|
|
- vc.id = communityRecommendTypeDataModel?.linkContentId ?? 0
|
|
|
- self?.navigationController?.pushViewController(vc, animated: true)
|
|
|
- break
|
|
|
- case .video?:
|
|
|
- let vc = CommunityVideoListController()
|
|
|
- vc.contentId = communityRecommendTypeDataModel?.linkContentId ?? 0
|
|
|
- self?.navigationController?.pushViewController(vc, animated: true)
|
|
|
- break
|
|
|
- default:
|
|
|
- break
|
|
|
- }
|
|
|
- break
|
|
|
- case .user?: //找朋友
|
|
|
- if communityRecommendTypeDataModel?.linkContentId ?? 0 != UserModel.shared().getModel()?.uid {
|
|
|
- let vc = OtherPersonalCenterViewController()
|
|
|
- vc.uid = communityRecommendTypeDataModel?.linkContentId ?? 0
|
|
|
- self?.navigationController?.pushViewController(vc, animated: true)
|
|
|
- }
|
|
|
-
|
|
|
- break
|
|
|
- case .activity?: //活动
|
|
|
- Mediator.push(H5RouterModuleType.pushActivityId(id: "\(communityRecommendTypeDataModel?.linkContentId ?? 0)"))
|
|
|
- break
|
|
|
- case .topic?: //话题
|
|
|
- Mediator.push(CommunityRouterModuleType.pushFeaturedTopics(id: communityRecommendTypeDataModel?.linkContentId ?? 0))
|
|
|
- break
|
|
|
- default:
|
|
|
- break
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
// 待发布
|
|
|
observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("DismissFromPublishEditVc"), object: nil, queue: OperationQueue.main) {[weak self] (notification) in
|
|
|
self?.reloadSegmentedFollowView()
|