|
@@ -33,7 +33,6 @@ class PersonViewUserAndOtherListView: BaseView {
|
|
var personalCenterVCType : Int?
|
|
var personalCenterVCType : Int?
|
|
/// 模型数组
|
|
/// 模型数组
|
|
var postMyModels = Array<PostMyModel>()
|
|
var postMyModels = Array<PostMyModel>()
|
|
-
|
|
|
|
override func setupViews() {
|
|
override func setupViews() {
|
|
addSubview(collectionView)
|
|
addSubview(collectionView)
|
|
setupData()
|
|
setupData()
|
|
@@ -122,7 +121,18 @@ extension PersonViewUserAndOtherListView: UICollectionViewDelegateFlowLayout,UIC
|
|
}
|
|
}
|
|
|
|
|
|
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
|
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
|
-
|
|
|
|
|
|
+ let postMyModel = postMyModels[indexPath.row]
|
|
|
|
+
|
|
|
|
+ if PostType(rawValue: postMyModel.type ?? "video") == .video {
|
|
|
|
+ let vc = CommunityVideoListController()
|
|
|
|
+ vc.contentId = postMyModel.id ?? 0
|
|
|
|
+ findViewController().navigationController?.pushViewController(vc, animated: true)
|
|
|
|
+ }else {
|
|
|
|
+ let vc = CommunityRecommendController()
|
|
|
|
+ vc.id = postMyModel.id ?? 0
|
|
|
|
+ findViewController().navigationController?.pushViewController(vc, animated: true)
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
|
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|