Browse Source

Merge branch 'develop' into feature/jeremy

南鑫林 5 years ago
parent
commit
c854768e17
22 changed files with 815 additions and 86 deletions
  1. 8 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 408 22
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoCoverCollectionCell.swift
  3. 42 60
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoPlayView.swift
  4. 78 0
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoSelTopicCell.swift
  5. 79 0
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoTopicView.swift
  6. 84 0
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift
  7. 6 4
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/Controller/PublishEditController.swift
  8. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_share_white.imageset/Contents.json
  9. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_share_white.imageset/nav_share_white@2x.png
  10. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_share_white.imageset/nav_share_white@3x.png
  11. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/nav_share_poster.imageset/Contents.json
  12. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/nav_share_poster.imageset/nav_share_poster@2x.png
  13. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/nav_share_poster.imageset/nav_share_poster@3x.png
  14. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_collect_white.imageset/Contents.json
  15. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_collect_white.imageset/video_btn_collect_white@2x.png
  16. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_collect_white.imageset/video_btn_collect_white@3x.png
  17. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_note_white.imageset/Contents.json
  18. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_note_white.imageset/video_btn_note_white@2x.png
  19. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_note_white.imageset/video_btn_note_white@3x.png
  20. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_praise_white.imageset/Contents.json
  21. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_praise_white.imageset/video_btn_praise_white@2x.png
  22. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_praise_white.imageset/video_btn_praise_white@3x.png

+ 8 - 0
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -528,6 +528,8 @@
 		BD2FCBE622B2586C0006D974 /* CommunityTagCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD2FCBE522B2586C0006D974 /* CommunityTagCollectionCell.swift */; };
 		BD2FCBE622B2586C0006D974 /* CommunityTagCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD2FCBE522B2586C0006D974 /* CommunityTagCollectionCell.swift */; };
 		BD2FCBEA22B267280006D974 /* RecommendNoneCommentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD2FCBE922B267280006D974 /* RecommendNoneCommentCell.swift */; };
 		BD2FCBEA22B267280006D974 /* RecommendNoneCommentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD2FCBE922B267280006D974 /* RecommendNoneCommentCell.swift */; };
 		BD3474F522857B85000908C5 /* CommonPayHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD3474F422857B85000908C5 /* CommonPayHeader.swift */; };
 		BD3474F522857B85000908C5 /* CommonPayHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD3474F422857B85000908C5 /* CommonPayHeader.swift */; };
+		BD37E38322CDF5BA003A14A2 /* CommunityVideoTopicView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD37E38222CDF5BA003A14A2 /* CommunityVideoTopicView.swift */; };
+		BD37E38522CDF91A003A14A2 /* CommunityVideoSelTopicCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD37E38422CDF91A003A14A2 /* CommunityVideoSelTopicCell.swift */; };
 		BD3AA45822AE63EC00EF4F20 /* MessageMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD3AA45722AE63EC00EF4F20 /* MessageMainViewController.swift */; };
 		BD3AA45822AE63EC00EF4F20 /* MessageMainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD3AA45722AE63EC00EF4F20 /* MessageMainViewController.swift */; };
 		BD477F6322C23D66008BE2CB /* AliyunReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = BD477F6222C23D66008BE2CB /* AliyunReachability.m */; };
 		BD477F6322C23D66008BE2CB /* AliyunReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = BD477F6222C23D66008BE2CB /* AliyunReachability.m */; };
 		BD4B50AC22BC7DEA0073B516 /* FilterResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BD4B50AB22BC7DEA0073B516 /* FilterResource.bundle */; };
 		BD4B50AC22BC7DEA0073B516 /* FilterResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BD4B50AB22BC7DEA0073B516 /* FilterResource.bundle */; };
@@ -1240,6 +1242,8 @@
 		BD2FCBE522B2586C0006D974 /* CommunityTagCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityTagCollectionCell.swift; sourceTree = "<group>"; };
 		BD2FCBE522B2586C0006D974 /* CommunityTagCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityTagCollectionCell.swift; sourceTree = "<group>"; };
 		BD2FCBE922B267280006D974 /* RecommendNoneCommentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendNoneCommentCell.swift; sourceTree = "<group>"; };
 		BD2FCBE922B267280006D974 /* RecommendNoneCommentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendNoneCommentCell.swift; sourceTree = "<group>"; };
 		BD3474F422857B85000908C5 /* CommonPayHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonPayHeader.swift; sourceTree = "<group>"; };
 		BD3474F422857B85000908C5 /* CommonPayHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonPayHeader.swift; sourceTree = "<group>"; };
+		BD37E38222CDF5BA003A14A2 /* CommunityVideoTopicView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityVideoTopicView.swift; sourceTree = "<group>"; };
+		BD37E38422CDF91A003A14A2 /* CommunityVideoSelTopicCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityVideoSelTopicCell.swift; sourceTree = "<group>"; };
 		BD3AA45722AE63EC00EF4F20 /* MessageMainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageMainViewController.swift; sourceTree = "<group>"; };
 		BD3AA45722AE63EC00EF4F20 /* MessageMainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageMainViewController.swift; sourceTree = "<group>"; };
 		BD477F6122C23D65008BE2CB /* AliyunReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunReachability.h; sourceTree = "<group>"; };
 		BD477F6122C23D65008BE2CB /* AliyunReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunReachability.h; sourceTree = "<group>"; };
 		BD477F6222C23D66008BE2CB /* AliyunReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AliyunReachability.m; sourceTree = "<group>"; };
 		BD477F6222C23D66008BE2CB /* AliyunReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AliyunReachability.m; sourceTree = "<group>"; };
@@ -4678,6 +4682,8 @@
 			children = (
 			children = (
 				BD27F0AF22CC929800A6514D /* CommunityVideoCoverCollectionCell.swift */,
 				BD27F0AF22CC929800A6514D /* CommunityVideoCoverCollectionCell.swift */,
 				BD27F0B122CC9E2A00A6514D /* CommunityVideoPlayView.swift */,
 				BD27F0B122CC9E2A00A6514D /* CommunityVideoPlayView.swift */,
+				BD37E38222CDF5BA003A14A2 /* CommunityVideoTopicView.swift */,
+				BD37E38422CDF91A003A14A2 /* CommunityVideoSelTopicCell.swift */,
 			);
 			);
 			path = View;
 			path = View;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
@@ -6097,6 +6103,7 @@
 				A71CAB3922C9DF0600D908A8 /* CommunityTopicDetailModel.swift in Sources */,
 				A71CAB3922C9DF0600D908A8 /* CommunityTopicDetailModel.swift in Sources */,
 				BD6122D322C364E400D3F513 /* AliyunMusicPickCell.m in Sources */,
 				BD6122D322C364E400D3F513 /* AliyunMusicPickCell.m in Sources */,
 				A71AF0BC226F099B001730FE /* ProductHBigTableViewCell.swift in Sources */,
 				A71AF0BC226F099B001730FE /* ProductHBigTableViewCell.swift in Sources */,
+				BD37E38522CDF91A003A14A2 /* CommunityVideoSelTopicCell.swift in Sources */,
 				BD108C9622A60C2100837DAB /* HGImagePickerCell.swift in Sources */,
 				BD108C9622A60C2100837DAB /* HGImagePickerCell.swift in Sources */,
 				A7A98E3C228036D7005306E9 /* ShoppingMallCategoryCollectionViewCell.swift in Sources */,
 				A7A98E3C228036D7005306E9 /* ShoppingMallCategoryCollectionViewCell.swift in Sources */,
 				A7C0FDEB22B4C6C300BC1E86 /* CardContentCommentListFooterView.swift in Sources */,
 				A7C0FDEB22B4C6C300BC1E86 /* CardContentCommentListFooterView.swift in Sources */,
@@ -6241,6 +6248,7 @@
 				A72A733522325A4B00B21995 /* AppDelegate+HandleOpen.swift in Sources */,
 				A72A733522325A4B00B21995 /* AppDelegate+HandleOpen.swift in Sources */,
 				A7FF156E228C6EAE00A85748 /* OrderDeliveryModeTableViewCell.swift in Sources */,
 				A7FF156E228C6EAE00A85748 /* OrderDeliveryModeTableViewCell.swift in Sources */,
 				BD0FAA6422C4C35E00DDFB37 /* AliyunCropThumbnailView.m in Sources */,
 				BD0FAA6422C4C35E00DDFB37 /* AliyunCropThumbnailView.m in Sources */,
+				BD37E38322CDF5BA003A14A2 /* CommunityVideoTopicView.swift in Sources */,
 				BD61230622C36C6900D3F513 /* AlivcPushBeautyParams.m in Sources */,
 				BD61230622C36C6900D3F513 /* AlivcPushBeautyParams.m in Sources */,
 				A72A72AC22321DE000B21995 /* Regex.swift in Sources */,
 				A72A72AC22321DE000B21995 /* Regex.swift in Sources */,
 				BD12B67422B4EC9700AEB10B /* KSMediaPickerController.swift in Sources */,
 				BD12B67422B4EC9700AEB10B /* KSMediaPickerController.swift in Sources */,

+ 408 - 22
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoCoverCollectionCell.swift

@@ -4,11 +4,19 @@
 //
 //
 //  Created by Christopher on 2019/7/3.
 //  Created by Christopher on 2019/7/3.
 //  Copyright © 2019 RainbowPlanet. All rights reserved.
 //  Copyright © 2019 RainbowPlanet. All rights reserved.
-//
+//  视频播放列表のCell
 
 
 import UIKit
 import UIKit
 import RxSwift
 import RxSwift
 
 
+enum videoBtnClickType {
+    case typeComment
+    case typeLike
+    case typeCollect
+    case typePerson
+    case typeFollow
+}
+
 class CommunityVideoCoverCollectionCell: UICollectionViewCell {
 class CommunityVideoCoverCollectionCell: UICollectionViewCell {
     
     
     let disposeBag = DisposeBag()
     let disposeBag = DisposeBag()
@@ -21,9 +29,14 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
         }
         }
     }
     }
     
     
+    typealias BackClosure = () -> Void
+    var backClosure : BackClosure?
+    
+    typealias ShareClosure = () -> Void
+    var shareClosure : ShareClosure?
     
     
-    typealias DelPicBlock = (_ idxRow:Int?) -> Void
-    var delPicBlock : DelPicBlock?
+    typealias ButtonClickClosure = (_ clickType: videoBtnClickType) -> Void
+    var buttonClickClosure : ButtonClickClosure?
     
     
     class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> CommunityVideoCoverCollectionCell {
     class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> CommunityVideoCoverCollectionCell {
         let ID = "CommunityVideoCoverCollectionCell"
         let ID = "CommunityVideoCoverCollectionCell"
@@ -51,51 +64,424 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
         fatalError("init(coder:) has not been implemented")
         fatalError("init(coder:) has not been implemented")
     }
     }
     
     
-    //MRAK: - 设置View
+    //MARK: - 设置View
     private func setupViews() {
     private func setupViews() {
-        self.backgroundColor = kf7f8faColor
         
         
+        // 视频播放
         addSubview(videoPlayView)
         addSubview(videoPlayView)
+        videoPlayView.addTapGesture(1, target: self, action: #selector(videoTapAction))
+        
+        // 顶部
+        addSubview(navBackView)
+        navBackView.addSubview(navBackBtn)
+        navBackView.addSubview(shareBtnRight)
+        navBackView.addSubview(shareBtnLeft)
+        
+        // 底部
+        addSubview(bottomCommentView)
+        bottomCommentView.addSubview(bottomSepView)
+        bottomCommentView.addSubview(commentBtn)
+        bottomCommentView.addSubview(collectBtn)
+        bottomCommentView.addSubview(likeBtn)
+        bottomCommentView.addSubview(commentView)
+        commentView.addSubview(commentLabel)
+        commentView.addSubview(textBtn)
+        
+        // 话题View
+        addSubview(topicView)
+        
+        addSubview(personBackView)
+        personBackView.addSubview(personIconBtn)
+        personBackView.addSubview(personLabel)
+        personBackView.addSubview(followButton)
+        
+        addSubview(rainbowBeanView)
+        rainbowBeanView.addSubview(beanIconImageView)
+        rainbowBeanView.addSubview(beanLabel)
+        
+        
+        addSubview(playStatusImageView)
+        
+        
         
         
-        addSubview(delButton)
     }
     }
     
     
     private func setupLayouts() {
     private func setupLayouts() {
         
         
+        // 视频播放
         videoPlayView.snp.makeConstraints { (make) in
         videoPlayView.snp.makeConstraints { (make) in
             make.edges.equalToSuperview()
             make.edges.equalToSuperview()
         }
         }
         
         
-        delButton.snp.makeConstraints { (make) in
-            make.top.right.equalToSuperview()
-            make.size.equalTo(18)
+        // 顶部
+        navBackView.snp.makeConstraints { (make) in
+            make.top.equalTo(20)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(44)
+        }
+        navBackBtn.snp.makeConstraints { (make) in
+            make.left.equalTo(5)
+            make.centerY.equalToSuperview()
+            make.size.equalTo(40)
+        }
+        shareBtnRight.snp.makeConstraints { (make) in
+            make.right.equalTo(-6)
+            make.centerY.equalToSuperview()
+            make.size.equalTo(39)
+        }
+        shareBtnLeft.snp.makeConstraints { (make) in
+            make.right.equalTo(-52)
+            make.bottom.equalTo(-8)
+            make.width.equalTo(123)
+            make.height.equalTo(35)
+        }
+        
+        // 底部
+        bottomCommentView.snp.makeConstraints { (make) in
+            make.bottom.equalTo(-kSafeTabBarHeight)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(60)
+        }
+        bottomSepView.snp.makeConstraints { (make) in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo(1)
+        }
+        
+        commentBtn.snp.makeConstraints { (make) in
+            make.right.equalToSuperview().offset(-14)
+            make.centerY.equalToSuperview()
+            make.height.equalTo(24)
+        }
+        commentBtn.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 5)
+        
+        collectBtn.snp.makeConstraints { (make) in
+            make.right.equalTo(commentBtn.snp_left).offset(-15)
+            make.centerY.equalToSuperview()
+            make.height.equalTo(37)
+        }
+        collectBtn.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 5)
+        
+        likeBtn.snp.makeConstraints { (make) in
+            make.right.equalTo(collectBtn.snp_left).offset(-15)
+            make.centerY.equalToSuperview()
+            make.height.equalTo(37)
+        }
+        likeBtn.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 5)
+        
+        commentView.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalToSuperview().offset(14)
+            make.right.equalTo(likeBtn.snp_left).offset(-10)
+            make.height.equalTo(28)
+        }
+        commentLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(15)
+            make.centerY.equalToSuperview()
+            make.width.equalTo(70)
+            make.height.equalTo(28)
+        }
+        textBtn.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
         }
         }
+        
+        // 话题View
+        topicView.snp.makeConstraints { (make) in
+            make.bottom.equalTo(bottomCommentView.snp_top)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(45)
+        }
+        
+        
+        // personView
+        personBackView.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.height.equalTo(30)
+            
+            // FIXME:待调整底约束
+            make.bottom.equalToSuperview().offset(-200)
+        }
+        personIconBtn.snp.makeConstraints { (make) in
+            make.left.top.equalToSuperview()
+            make.size.equalTo(30)
+        }
+        personLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(personIconBtn.snp_right).offset(10)
+            make.centerY.equalToSuperview()
+            make.height.equalTo(18)
+        }
+        followButton.snp.makeConstraints { (make) in
+            make.left.equalTo(personLabel.snp_right).offset(10)
+            make.centerY.equalToSuperview()
+            make.width.equalTo(64)
+            make.height.equalTo(20)
+        }
+        
+        // 彩虹豆View
+        rainbowBeanView.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.height.equalTo(24)
+            
+            // FIXME:待调整底约束
+            make.bottom.equalToSuperview().offset(-250)
+        }
+        beanIconImageView.snp.makeConstraints { (make) in
+            make.left.equalTo(6)
+            make.centerY.equalToSuperview()
+            make.size.equalTo(19)
+        }
+        beanLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(beanIconImageView.snp_right).offset(5)
+            make.top.bottom.equalToSuperview()
+            make.right.equalTo(-6)
+        }
+        
+        
+        
+        //
+        playStatusImageView.snp.makeConstraints { (make) in
+            make.center.equalToSuperview()
+            make.width.equalTo(50)
+            make.height.equalTo(60)
+        }
+        
     }
     }
     
     
+    // 视频播放View
     private lazy var videoPlayView: CommunityVideoPlayView = {
     private lazy var videoPlayView: CommunityVideoPlayView = {
         let videoPlayView = CommunityVideoPlayView()
         let videoPlayView = CommunityVideoPlayView()
         videoPlayView.isUserInteractionEnabled = true
         videoPlayView.isUserInteractionEnabled = true
         return videoPlayView
         return videoPlayView
     }()
     }()
     
     
-    private lazy var picImageView: UIImageView = {
-        let picImageView = UIImageView()
-        picImageView.cornerRadius = 4
-        picImageView.masksToBounds = true
-        return picImageView
+    private lazy var navBackView: UIView = {
+        let navBackView = UIView()
+        navBackView.backgroundColor = UIColor.clear
+        return navBackView
+    }()
+    
+    private lazy var navBackBtn: UIButton = {
+        let navBackBtn = UIButton(type: UIButton.ButtonType.custom)
+        navBackBtn.setImage(kImage(name: "navbar_back_white"), for: UIControl.State.normal)
+        navBackBtn.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            if let backClosure = self?.backClosure {
+                backClosure()
+            }
+        }).disposed(by: disposeBag)
+        return navBackBtn
+    }()
+    
+    private lazy var shareBtnRight: UIButton = {
+        let shareBtnRight = UIButton(type: UIButton.ButtonType.custom)
+        shareBtnRight.setImage(kImage(name: "nav_share_white"), for: UIControl.State.normal)
+        shareBtnRight.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            if let shareClosure = self?.shareClosure {
+                shareClosure()
+            }
+        }).disposed(by: disposeBag)
+        return shareBtnRight
     }()
     }()
     
     
-    private lazy var delButton: UIButton = {
-        let delButton = UIButton(type: UIButton.ButtonType.custom)
-        delButton.setImage(kImage(name: "common_sku_cancel"), for: UIControl.State.normal)
-        delButton.rx.tap.subscribe(onNext: {
+    private lazy var shareBtnLeft: UIButton = {
+        let shareBtnLeft = UIButton(type: UIButton.ButtonType.custom)
+        shareBtnLeft.setImage(kImage(name: "nav_share_poster"), for: UIControl.State.normal)
+        shareBtnLeft.rx.tap.subscribe(onNext: {
             [weak self] (data) in
             [weak self] (data) in
-            let idxPath = self?.indexPath
-            if let delPicBlock = self?.delPicBlock {
-                delPicBlock(idxPath?.row)
+            if let shareClosure = self?.shareClosure {
+                shareClosure()
             }
             }
         }).disposed(by: disposeBag)
         }).disposed(by: disposeBag)
-        return delButton
+        return shareBtnLeft
     }()
     }()
     
     
+    private lazy var bottomCommentView: UIView = {
+        let bottomCommentView = UIView()
+        bottomCommentView.backgroundColor = UIColor.clear
+        return bottomCommentView
+    }()
+    
+    private lazy var bottomSepView: UIView = {
+        let bottomSepView = UIView()
+        bottomSepView.backgroundColor = kDDDDDDColor
+        return bottomSepView
+    }()
+    
+    private lazy var commentBtn: UIButton = {
+        let commentBtn = UIButton(type: UIButton.ButtonType.custom)
+        commentBtn.setTitle("5178", for: UIControl.State.normal)
+        commentBtn.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        commentBtn.setImage(kImage(name: "video_btn_note_white"), for: UIControl.State.normal)
+        commentBtn.titleLabel?.font = kRegularFont14
+        commentBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
+            if let buttonClickClosure = self?.buttonClickClosure {
+                buttonClickClosure(videoBtnClickType.typeComment)
+            }
+        }).disposed(by: disposeBag)
+        return commentBtn
+    }()
+    
+    private lazy var collectBtn: UIButton = {
+        let collectBtn = UIButton(type: UIButton.ButtonType.custom)
+        collectBtn.setTitle("6124", for: UIControl.State.normal)
+        collectBtn.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        collectBtn.setImage(kImage(name: "video_btn_collect_white"), for: UIControl.State.normal)
+        collectBtn.setImage(kImage(name: "btn_collect_pre"), for: UIControl.State.selected)        
+        collectBtn.titleLabel?.font = kRegularFont14
+        collectBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
+            collectBtn.isSelected = !collectBtn.isSelected
+            if let buttonClickClosure = self?.buttonClickClosure {
+                buttonClickClosure(videoBtnClickType.typeCollect)
+            }
+        }).disposed(by: disposeBag)
+        return collectBtn
+    }()
+    
+    private lazy var likeBtn: UIButton = {
+        let likeBtn = UIButton(type: UIButton.ButtonType.custom)
+        likeBtn.setTitle("8844", for: UIControl.State.normal)
+        likeBtn.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        likeBtn.setImage(kImage(name: "video_btn_praise_white"), for: UIControl.State.normal)
+        likeBtn.setImage(kImage(name: "btn_praise_pre_36px"), for: UIControl.State.selected)
+        likeBtn.titleLabel?.font = kRegularFont14
+        likeBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
+            likeBtn.isSelected = !likeBtn.isSelected
+            if let buttonClickClosure = self?.buttonClickClosure {
+                buttonClickClosure(videoBtnClickType.typeLike)
+            }
+        }).disposed(by: disposeBag)
+        return likeBtn
+    }()
+    
+    private lazy var commentView: UIView = {
+        let commentView = UIView()
+        commentView.backgroundColor = kRGBAColor(r: 0/255.0, g: 0/255.0, b: 0/255.0, a: 0.3)
+        commentView.cornerRadius = 15
+        commentView.masksToBounds = true
+        return commentView
+    }()
+    
+    private lazy var commentLabel: UILabel = {
+        let commentLabel = UILabel()
+        commentLabel.text = "添加评论..."
+        commentLabel.textColor = kffffffColor
+        commentLabel.font = kRegularFont14
+        return commentLabel
+    }()
+    
+    private lazy var textBtn: UIButton = {
+        let textBtn = UIButton(type: UIButton.ButtonType.custom)
+        textBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
+            if let buttonClickClosure = self?.buttonClickClosure {
+                buttonClickClosure(videoBtnClickType.typeComment)
+            }
+        }).disposed(by: disposeBag)
+        return textBtn
+    }()
+    
+    private lazy var topicView: CommunityVideoTopicView = {
+        let topicView = CommunityVideoTopicView()
+        topicView.backgroundColor = UIColor.clear
+        return topicView
+    }()
+    
+    private lazy var personBackView: UIView = {
+        let personBackView = UIView()
+        personBackView.backgroundColor = UIColor.clear
+        return personBackView
+    }()
+    
+    private lazy var personIconBtn: UIButton = {
+        let personIconBtn = UIButton(type: UIButton.ButtonType.custom)
+        personIconBtn.setImage(kImage(name: "default_avatar"), for: UIControl.State.normal)
+        personIconBtn.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            if let buttonClickClosure = self?.buttonClickClosure {
+                buttonClickClosure(videoBtnClickType.typePerson)
+            }
+        }).disposed(by: disposeBag)
+        return personIconBtn
+    }()
+    
+    private lazy var personLabel: UILabel = {
+        let personLabel = UILabel()
+        personLabel.text = "林萌萌的萌萌哒"
+        personLabel.textColor = kffffffColor
+        personLabel.font = kRegularFont15
+        return personLabel
+    }()
+    
+    private lazy var followButton: UIButton = {
+        let followButton = UIButton(type: UIButton.ButtonType.custom)
+        followButton.titleLabel?.font = kMediumFont13
+        followButton.layer.cornerRadius = 13
+        followButton.layer.masksToBounds = true
+        followButton.layer.borderWidth = 1
+        followButton.rx.tap.subscribe(onNext: {[weak self] (data) in
+            if let buttonClickClosure = self?.buttonClickClosure {
+                buttonClickClosure(videoBtnClickType.typeFollow)
+            }
+        }).disposed(by: disposeBag)
+        return followButton
+    }()
+    
+    private lazy var rainbowBeanView: UIView = {
+        let rainbowBeanView = UIView()
+        rainbowBeanView.backgroundColor = kRGBAColor(r: 0/255.0, g: 0/255.0, b: 0/255.0, a: 0.3)
+        rainbowBeanView.cornerRadius = 12
+        rainbowBeanView.masksToBounds = true
+        return rainbowBeanView
+    }()
+    
+    private lazy var beanIconImageView: UIImageView = {
+        let beanIconImageView = UIImageView()
+        beanIconImageView.image = kImage(name: "ico_bean_white")
+        return beanIconImageView
+    }()
+    
+    private lazy var beanLabel: UILabel = {
+        let beanLabel = UILabel()
+        beanLabel.text = "xx彩虹豆待收获"
+        beanLabel.textColor = kffffffColor
+        beanLabel.font = kRegularFont13
+        return beanLabel
+    }()
+    
+    private lazy var videoTitleLabel: UILabel = {
+        let videoTitleLabel = UILabel()
+        videoTitleLabel.text = "我就是一个视频的Title"
+        videoTitleLabel.textColor = kffffffColor
+        videoTitleLabel.font = kMediumFont16
+        return videoTitleLabel
+    }()    
+    
+    
+    // 播放暂停icon
+    private lazy var playStatusImageView: UIImageView = {
+        let playStatusImageView = UIImageView()
+        playStatusImageView.image = kImage(name: "btn_pause")
+        return playStatusImageView
+    }()
+    
+    
+    
+    // MARK: - 播放动作
+    func play() {
+        playStatusImageView.isHidden = true
+        videoPlayView.play()
+    }
+    
+    func pause() {
+        playStatusImageView.isHidden = false
+        videoPlayView.pause()
+    }
+    
+    @objc func videoTapAction(_ tap: UITapGestureRecognizer?) {
+        if videoPlayView.pauseFlag {
+            self.play()
+        } else {
+            self.pause()
+        }
+    }
+    
 }
 }

+ 42 - 60
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoPlayView.swift

@@ -4,7 +4,7 @@
 //
 //
 //  Created by Christopher on 2019/7/3.
 //  Created by Christopher on 2019/7/3.
 //  Copyright © 2019 RainbowPlanet. All rights reserved.
 //  Copyright © 2019 RainbowPlanet. All rights reserved.
-//
+//  视频播放View
 
 
 import UIKit
 import UIKit
 
 
@@ -22,23 +22,34 @@ class CommunityVideoPlayView: UIView {
             playerLayer = AVPlayerLayer.init(player: player)
             playerLayer = AVPlayerLayer.init(player: player)
             playerLayer.videoGravity = .resizeAspectFill
             playerLayer.videoGravity = .resizeAspectFill
             self.layer.addSublayer(self.playerLayer)
             self.layer.addSublayer(self.playerLayer)
-            
         }
         }
     }
     }
+    
     private var asset: AVAsset?
     private var asset: AVAsset?
     private var playerItem: AVPlayerItem?
     private var playerItem: AVPlayerItem?
     private var playerLayer: AVPlayerLayer = AVPlayerLayer.init()
     private var playerLayer: AVPlayerLayer = AVPlayerLayer.init()
     private var player: AVPlayer?
     private var player: AVPlayer?
+//    private var indicatorView: UIActivityIndicatorView?
     
     
-    init() {
-        super.init(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenHeight))
-        initSubView()
+    // 暂停状态 Flag
+    var pauseFlag: Bool = false
+    
+    deinit {
+        if observe != nil {
+            NotificationCenter.default.removeObserver(observe!)
+        }
     }
     }
+    weak var observe : NSObjectProtocol?
     
     
-    override init(frame: CGRect) {
-        super.init(frame: frame)
+    init() {
+        super.init(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenHeight))
         initSubView()
         initSubView()
-    }
+        
+        observe = NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: playerItem, queue: OperationQueue.main, using: {
+            [weak self] (notification) in
+            self?.playerItemDidReachEnd(notification)
+        })
+    }    
     
     
     required init?(coder aDecoder: NSCoder) {
     required init?(coder aDecoder: NSCoder) {
         fatalError("init(coder:) has not been implemented")
         fatalError("init(coder:) has not been implemented")
@@ -58,59 +69,30 @@ class CommunityVideoPlayView: UIView {
         CATransaction.commit()
         CATransaction.commit()
     }
     }
     
     
+    // MARK: -
+    func play() {
+        pauseFlag = false
+        player?.play()
+    }
     
     
+    // 暂停
+    func pause() {
+        pauseFlag = true
+        player?.pause()
+    }
     
     
-//    func setupViews() {
-//        self.backgroundColor = kf7f8faColor
-//        addSubview(bgView)
-//        bgView.addSubview(picButton)
-//        bgView.addSubview(titleLabel)
-//    }
-//
-//    func setupLayouts() {
-//        bgView.snp_makeConstraints { (make) in
-//            make.top.equalTo(10)
-//            make.left.right.bottom.equalToSuperview()
-//        }
-//        picButton.snp_makeConstraints { (make) in
-//            make.top.equalTo(20)
-//            make.left.equalTo(15)
-//            make.right.equalTo(-15)
-//            make.height.equalTo(100 * kScaleWidth)
-//        }
-//        titleLabel.snp_makeConstraints { (make) in
-//            make.top.equalTo(picButton.snp_bottom).offset(20)
-//            make.left.equalTo(14)
-//            make.right.equalTo(-14)
-//            make.height.equalTo(25)
-//        }
-//    }
-//
-//    lazy var bgView: UIView = {
-//        let bgView = UIView()
-//        bgView.backgroundColor = .white
-//        return bgView
-//    }()
-//
-//    lazy var picButton: UIButton = {
-//        let picButton = UIButton(type: UIButton.ButtonType.custom)
-//        let configModel = ConfigModel.shared.object()
-//        picButton.kf.setBackgroundImage(with: kURLImage(name: configModel?.findFriendImg ?? ""), for: UIControl.State.normal, placeholder: kImage(name: "pic_preload"))
-//        picButton.cornerRadius = 5
-//        picButton.masksToBounds = true
-//        picButton.rx.tap.subscribe(onNext: { _ in
-//
-//        }).disposed(by: disposeBag)
-//        return picButton
-//    }()
-//
-//    lazy var titleLabel: UILabel = {
-//        let titleLabel = UILabel()
-//        titleLabel.font = kBoldFont18
-//        titleLabel.textColor = k333333Color
-//        titleLabel.text = "推荐关注"
-//        return titleLabel
-//    }()
-    
+    // 自动重播
+    func playerItemDidReachEnd(_ notification: Notification?) {
+        let item = notification?.object as? AVPlayerItem
+        if playerItem == item {
+            weak var weakSelf = self
+            DispatchQueue.main.async(execute: {
+                self.pause()
+                weakSelf?.player?.seek(to: .zero, toleranceBefore: .zero, toleranceAfter: .zero, completionHandler: { finished in
+                    weakSelf?.play()
+                })
+            })
+        }
+    }
     
     
 }
 }

+ 78 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoSelTopicCell.swift

@@ -0,0 +1,78 @@
+//
+//  CommunityVideoSelTopicCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/7/4.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  话题类别のCell
+
+import UIKit
+import RxSwift
+
+class CommunityVideoSelTopicCell: UICollectionViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> CommunityVideoSelTopicCell {
+        let ID = "CommunityVideoSelTopicCell"
+        collectionView.register(CommunityVideoSelTopicCell.self, forCellWithReuseIdentifier: ID)
+        let cell : CommunityVideoSelTopicCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! CommunityVideoSelTopicCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        backgroundColor = kRGBAColor(r: 0/255.0, g: 0/255.0, b: 0/255.0, a: 0.3)
+        cornerRadius = 12
+        masksToBounds = true
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        addSubview(iconImageView)
+        addSubview(titleLabel)
+    }
+    
+    private func setupLayouts() {
+        iconImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(5)
+            make.left.equalTo(6)
+            make.size.equalTo(16)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(3)
+            make.left.equalTo(iconImageView.snp_right).offset(5)
+            make.right.equalTo(-26)
+            make.height.equalTo(19)
+        }
+    }
+    
+    private lazy var iconImageView: UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "edit_ico_topic_pre")
+        return iconImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "运动健身"
+        titleLabel.textColor = kffffffColor
+        titleLabel.font = kRegularFont13
+        titleLabel.textAlignment = .left
+        return titleLabel
+    }()
+    
+}

+ 79 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoTopicView.swift

@@ -0,0 +1,79 @@
+//
+//  CommunityVideoTopicView.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/7/4.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  话题标签View
+
+import UIKit
+
+class CommunityVideoTopicView: BaseView {
+    
+    override func setupViews() {
+        addSubview(collectionView)
+    }
+    
+    override func setupLayouts() {
+        collectionView.snp.remakeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = .clear
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        collectionView.bounces = false
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewLeftAlignedLayout.init()
+        collectionViewLayout.minimumLineSpacing = 10
+        collectionViewLayout.minimumInteritemSpacing =  10
+        collectionViewLayout.scrollDirection = UICollectionView.ScrollDirection.horizontal
+        collectionViewLayout.estimatedItemSize = CGSize(width: ((kScreenWidth - 28) - 3*10)/4, height: 24)
+        return collectionViewLayout
+    }()
+    
+    //加载数据
+    func reloadData() {
+        //collectionView重新加载数据
+        self.collectionView.reloadData()
+        //更新collectionView的高度约束
+        let contentSize = self.collectionView.collectionViewLayout.collectionViewContentSize
+        collectionView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+            make.height.equalTo(contentSize.height)
+        }
+        self.collectionView.collectionViewLayout.invalidateLayout()
+    }
+}
+
+extension CommunityVideoTopicView: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return 5
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = CommunityVideoSelTopicCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        return cell
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 6, left: 14, bottom: 15, right: 14)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        print("点击了collection----\(indexPath.row)")
+    }
+    
+}

+ 84 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift

@@ -11,16 +11,45 @@ import RxSwift
 
 
 class CommunityVideoListController: BaseViewController {
 class CommunityVideoListController: BaseViewController {
     
     
+    override var prefersStatusBarHidden: Bool {
+        return true
+    }
     // 内容Id
     // 内容Id
     var contentId: Int?
     var contentId: Int?
     
     
     var videoItemList: Array<CommunityVideoItemModel>?
     var videoItemList: Array<CommunityVideoItemModel>?
     
     
+    private var prePlayCell: CommunityVideoCoverCollectionCell?
+    
+    deinit {
+        if observe != nil {
+            NotificationCenter.default.removeObserver(observe!)
+        }
+    }
+    weak var observe : NSObjectProtocol?
+    
     override func viewDidLoad() {
     override func viewDidLoad() {
         super.viewDidLoad()
         super.viewDidLoad()
         setupViews()
         setupViews()
         setupData()
         setupData()
+        setUpAppStatusNotification()
+    }
+    
+    func setUpAppStatusNotification() {
+        observe = NotificationCenter.default.addObserver(forName: UIApplication.willResignActiveNotification, object: nil, queue: OperationQueue.main, using: {
+            [weak self] (notification) in
+            self?.pauseCurrentVideo()
+        })
         
         
+        observe = NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: OperationQueue.main, using: {
+            [weak self] (notification) in
+            self?.startPlay(self?.prePlayCell)
+        })
+        
+        observe = NotificationCenter.default.addObserver(forName: UIApplication.didBecomeActiveNotification, object: nil, queue: OperationQueue.main, using: {
+            [weak self] (notification) in
+            self?.startPlay(self?.prePlayCell)
+        })
     }
     }
     
     
     override func setupViews() {        
     override func setupViews() {        
@@ -86,6 +115,31 @@ extension CommunityVideoListController: UICollectionViewDelegateFlowLayout,UICol
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
         let cell = CommunityVideoCoverCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
         let cell = CommunityVideoCoverCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
         cell.videoItemMdl = videoItemList?[indexPath.row]
         cell.videoItemMdl = videoItemList?[indexPath.row]
+        cell.backClosure = {
+            [weak self] in
+            self?.navigationController?.popViewController(animated: true)
+        }
+        cell.shareClosure = {
+            [weak self] in
+            print("------点击了[分享]")
+        }
+        cell.buttonClickClosure = {
+            [weak self] (clickType) in
+            switch clickType {
+            case videoBtnClickType.typeComment:
+                print("添加评论")
+            case videoBtnClickType.typeLike:
+                print("添加喜欢")
+            case videoBtnClickType.typeCollect:
+                print("添加收藏")
+            case videoBtnClickType.typePerson:
+                print("个人主页")
+            case videoBtnClickType.typeFollow:
+                print("关注动作")
+            default:
+                break
+            }
+        }
         return cell
         return cell
     }
     }
     
     
@@ -106,4 +160,34 @@ extension CommunityVideoListController: UICollectionViewDelegateFlowLayout,UICol
         return CGSize(width: kScreenWidth, height: 10)
         return CGSize(width: kScreenWidth, height: 10)
     }
     }
     
     
+    func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
+        prePlayCell = cell as? CommunityVideoCoverCollectionCell
+        self.pauseCurrentVideo()
+    }
+    
+    func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
+        let index = Int(collectionView.contentOffset.y / CGFloat(kScreenHeight))
+        let indexPath = IndexPath(item: index, section: 0)
+        let cell = collectionView.cellForItem(at: indexPath) as? CommunityVideoCoverCollectionCell
+        
+        if(cell != nil) {
+            self.startPlay(cell)
+        }
+    }
+    
+}
+
+// MARK: -
+extension CommunityVideoListController {
+    
+    func startPlay(_ cell: CommunityVideoCoverCollectionCell?) {
+        cell?.play()
+    }
+    
+    func pauseCurrentVideo() {
+        if prePlayCell != nil {
+            prePlayCell?.pause()
+        }
+    }
+    
 }
 }

+ 6 - 4
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/Controller/PublishEditController.swift

@@ -57,6 +57,12 @@ class PublishEditController: BaseViewController {
         super.viewDidLoad()
         super.viewDidLoad()
         setupViews()
         setupViews()
         setupData()
         setupData()
+        
+        if mediaType == .video {
+            subLabel.text = "视频正在上传中(0/1)..."
+            communityVideoUploadAuthApi()
+            print("----上传视频")
+        }
     }
     }
     
     
     override func viewWillAppear(_ animated: Bool) {
     override func viewWillAppear(_ animated: Bool) {
@@ -68,10 +74,6 @@ class PublishEditController: BaseViewController {
         if mediaType == .image {
         if mediaType == .image {
             subLabel.text = "图片正在上传中(0/\(imageArr?.count ?? 0))..."
             subLabel.text = "图片正在上传中(0/\(imageArr?.count ?? 0))..."
             uploadAllImages(totalTimes: 0)
             uploadAllImages(totalTimes: 0)
-        } else {
-            subLabel.text = "视频正在上传中(0/1)..."
-            communityVideoUploadAuthApi()
-            print("----上传视频")
         }
         }
         
         
         
         

+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_share_white.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "nav_share_white@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "nav_share_white@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_share_white.imageset/nav_share_white@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_share_white.imageset/nav_share_white@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/nav_share_poster.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "nav_share_poster@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "nav_share_poster@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/nav_share_poster.imageset/nav_share_poster@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/nav_share_poster.imageset/nav_share_poster@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_collect_white.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "video_btn_collect_white@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "video_btn_collect_white@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_collect_white.imageset/video_btn_collect_white@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_collect_white.imageset/video_btn_collect_white@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_note_white.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "video_btn_note_white@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "video_btn_note_white@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_note_white.imageset/video_btn_note_white@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_note_white.imageset/video_btn_note_white@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_praise_white.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "video_btn_praise_white@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "video_btn_praise_white@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_praise_white.imageset/video_btn_praise_white@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/video_btn_praise_white.imageset/video_btn_praise_white@3x.png