Parcourir la source

Merge branch 'feature/jeremy' into develop

南鑫林 il y a 5 ans
Parent
commit
c762924faa
35 fichiers modifiés avec 945 ajouts et 35 suppressions
  1. 52 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 23 1
      RainbowPlanet/RainbowPlanet/Model/ConfigModel/ConfigModel.swift
  3. 46 13
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/CardContent/User/CardContentUserDisLikeView.swift
  4. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Main/CommunityViewController.swift
  5. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/Controller/CommunityRecommendController.swift
  6. 36 0
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityReport/View/CommunityReportHeaderView.swift
  7. 74 0
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityReport/View/CommunityReportTableViewCell.swift
  8. 36 0
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityReport/View/CommunityReportView.swift
  9. 114 0
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityReport/ViewControllelr/CommunityReportViewController.swift
  10. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift
  11. 152 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/OtherPersonalCenter/View/OtherPersonalCenterReportView/OtherPersonalCenterReportSureView.swift
  12. 176 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/OtherPersonalCenter/View/OtherPersonalCenterReportView/OtherPersonalCenterReportView.swift
  13. 5 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/OtherPersonalCenter/ViewController/OtherPersonalCenterViewController.swift
  14. 15 1
      RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/ViewController/RegisterLoginViewController.swift
  15. 25 7
      RainbowPlanet/RainbowPlanet/Modules/ShareModules/ShareCommunityModule/ShareCommunity/ShareCommunityView.swift
  16. 11 0
      RainbowPlanet/RainbowPlanet/Router/CommunityRouterModuleType.swift
  17. 33 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift
  18. 28 4
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaServiceUserApi.swift
  19. 2 2
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift
  20. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navbar_edit.imageset/Contents.json
  21. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navbar_edit.imageset/navbar_edit@2x.png
  22. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navbar_edit.imageset/navbar_edit@3x.png
  23. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/edit_pic_report.imageset/Contents.json
  24. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/edit_pic_report.imageset/edit_pic_report@2x.png
  25. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/edit_pic_report.imageset/edit_pic_report@3x.png
  26. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/edit_pic_shield.imageset/Contents.json
  27. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/edit_pic_shield.imageset/edit_pic_shield@2x.png
  28. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/edit_pic_shield.imageset/edit_pic_shield@3x.png
  29. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/home_ico_report.imageset/Contents.json
  30. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/home_ico_report.imageset/home_ico_report@2x.png
  31. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/home_ico_report.imageset/home_ico_report@3x.png
  32. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/home_ico_shield.imageset/Contents.json
  33. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/home_ico_shield.imageset/home_ico_shield@2x.png
  34. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/home_ico_shield.imageset/home_ico_shield@3x.png
  35. 4 4
      RainbowPlanet/RainbowPlanet/ViewModel/Virus/VirusViewModel.swift

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

@@ -276,6 +276,11 @@
 		A77F2CC722320627001BD3F6 /* WRNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CC522320627001BD3F6 /* WRNavigationBar.swift */; };
 		A77F2CC822320627001BD3F6 /* WRCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CC622320627001BD3F6 /* WRCustomNavigationBar.swift */; };
 		A77F2CCA223209F2001BD3F6 /* BaseTabbarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CC9223209F2001BD3F6 /* BaseTabbarViewController.swift */; };
+		A7811C81231AB05300C2D8DE /* CommunityReportViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7811C7F231AB05300C2D8DE /* CommunityReportViewController.swift */; };
+		A7811C85231AB2F600C2D8DE /* CommunityReportHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7811C84231AB2F600C2D8DE /* CommunityReportHeaderView.swift */; };
+		A7811C87231AB49800C2D8DE /* CommunityReportTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7811C86231AB49800C2D8DE /* CommunityReportTableViewCell.swift */; };
+		A7811C89231ACC3900C2D8DE /* OtherPersonalCenterReportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7811C88231ACC3900C2D8DE /* OtherPersonalCenterReportView.swift */; };
+		A7811C8C231AD26300C2D8DE /* OtherPersonalCenterReportSureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7811C8B231AD26300C2D8DE /* OtherPersonalCenterReportSureView.swift */; };
 		A7824AFB2271EA2600ABA381 /* SelfMentionContactsListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7824AFA2271EA2600ABA381 /* SelfMentionContactsListView.swift */; };
 		A7824AFD2271EAC900ABA381 /* SelfMentionContactsListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7824AFC2271EAC900ABA381 /* SelfMentionContactsListTableViewCell.swift */; };
 		A7824B002271F0DD00ABA381 /* EditSelfMentionContactsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7824AFF2271F0DD00ABA381 /* EditSelfMentionContactsViewController.swift */; };
@@ -1008,6 +1013,11 @@
 		A77F2CC522320627001BD3F6 /* WRNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WRNavigationBar.swift; sourceTree = "<group>"; };
 		A77F2CC622320627001BD3F6 /* WRCustomNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WRCustomNavigationBar.swift; sourceTree = "<group>"; };
 		A77F2CC9223209F2001BD3F6 /* BaseTabbarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTabbarViewController.swift; sourceTree = "<group>"; };
+		A7811C7F231AB05300C2D8DE /* CommunityReportViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityReportViewController.swift; sourceTree = "<group>"; };
+		A7811C84231AB2F600C2D8DE /* CommunityReportHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityReportHeaderView.swift; sourceTree = "<group>"; };
+		A7811C86231AB49800C2D8DE /* CommunityReportTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityReportTableViewCell.swift; sourceTree = "<group>"; };
+		A7811C88231ACC3900C2D8DE /* OtherPersonalCenterReportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OtherPersonalCenterReportView.swift; sourceTree = "<group>"; };
+		A7811C8B231AD26300C2D8DE /* OtherPersonalCenterReportSureView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OtherPersonalCenterReportSureView.swift; sourceTree = "<group>"; };
 		A7824AFA2271EA2600ABA381 /* SelfMentionContactsListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelfMentionContactsListView.swift; sourceTree = "<group>"; };
 		A7824AFC2271EAC900ABA381 /* SelfMentionContactsListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelfMentionContactsListTableViewCell.swift; sourceTree = "<group>"; };
 		A7824AFF2271F0DD00ABA381 /* EditSelfMentionContactsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditSelfMentionContactsViewController.swift; sourceTree = "<group>"; };
@@ -1911,6 +1921,7 @@
 		A719EE6622AF4374001AAC98 /* CommunityModule */ = {
 			isa = PBXGroup;
 			children = (
+				A7811C7D231AAF6400C2D8DE /* CommunityReport */,
 				A719EE6722AF438E001AAC98 /* Community */,
 				A770E5FE22D6200100CBD0A4 /* CommunityShareActivity */,
 				A770E5F722D5E08700CBD0A4 /* CommunityShareContent */,
@@ -3431,6 +3442,41 @@
 			path = WRNavigationBar;
 			sourceTree = "<group>";
 		};
+		A7811C7D231AAF6400C2D8DE /* CommunityReport */ = {
+			isa = PBXGroup;
+			children = (
+				A7811C83231AB2DB00C2D8DE /* View */,
+				A7811C7E231AAFF600C2D8DE /* ViewControllelr */,
+			);
+			path = CommunityReport;
+			sourceTree = "<group>";
+		};
+		A7811C7E231AAFF600C2D8DE /* ViewControllelr */ = {
+			isa = PBXGroup;
+			children = (
+				A7811C7F231AB05300C2D8DE /* CommunityReportViewController.swift */,
+			);
+			path = ViewControllelr;
+			sourceTree = "<group>";
+		};
+		A7811C83231AB2DB00C2D8DE /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A7811C84231AB2F600C2D8DE /* CommunityReportHeaderView.swift */,
+				A7811C86231AB49800C2D8DE /* CommunityReportTableViewCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		A7811C8A231AD24000C2D8DE /* OtherPersonalCenterReportView */ = {
+			isa = PBXGroup;
+			children = (
+				A7811C88231ACC3900C2D8DE /* OtherPersonalCenterReportView.swift */,
+				A7811C8B231AD26300C2D8DE /* OtherPersonalCenterReportSureView.swift */,
+			);
+			path = OtherPersonalCenterReportView;
+			sourceTree = "<group>";
+		};
 		A7824AFE2271F0C500ABA381 /* EditSelfMentionContacts */ = {
 			isa = PBXGroup;
 			children = (
@@ -4211,6 +4257,7 @@
 		A7D07CD822B7DF6300186014 /* View */ = {
 			isa = PBXGroup;
 			children = (
+				A7811C8A231AD24000C2D8DE /* OtherPersonalCenterReportView */,
 				A7D07CDB22B7E00900186014 /* OtherPersonalCenterHeaderView */,
 			);
 			path = View;
@@ -6200,6 +6247,7 @@
 				A73A56DB22DC9AB5004920FE /* UpdateVersionModel.swift in Sources */,
 				A7D46090227617D200A5A54E /* SQLModel.swift in Sources */,
 				A790706522B9DFAD008CE279 /* TextLimitTool.m in Sources */,
+				A7811C81231AB05300C2D8DE /* CommunityReportViewController.swift in Sources */,
 				A72C01222275404A0065E0C3 /* ProvinceCityAreaModel.swift in Sources */,
 				A7FF1579228C82CE00A85748 /* OrderDetailViewController.swift in Sources */,
 				A7FF159C228D9E3D00A85748 /* OrderRefundDetailModel.swift in Sources */,
@@ -6225,6 +6273,7 @@
 				BDF47D852282C59F00941AB9 /* ShoppingCartListTableViewCell.swift in Sources */,
 				BD01B20122BC677900CE9F36 /* PublishFilterView.swift in Sources */,
 				BD5CA89522DDA2A100364A67 /* CustomSlider.swift in Sources */,
+				A7811C85231AB2F600C2D8DE /* CommunityReportHeaderView.swift in Sources */,
 				A75B782522DEC592007B986A /* SpecialOneTypeCollectionViewCell.swift in Sources */,
 				A76068F522E4BCF4008DF18F /* MJDIYHeader.swift in Sources */,
 				A77F2CCA223209F2001BD3F6 /* BaseTabbarViewController.swift in Sources */,
@@ -6307,6 +6356,7 @@
 				A7A98E4522804C63005306E9 /* ShoppingMallSepcialCollectionViewCell.swift in Sources */,
 				A7AA9F6722C640F10086498B /* CommunityRecommendFeedModel.swift in Sources */,
 				A7824B082271F53A00ABA381 /* EditSetDefaultTableViewCell.swift in Sources */,
+				A7811C89231ACC3900C2D8DE /* OtherPersonalCenterReportView.swift in Sources */,
 				A77F2CC3223203BA001BD3F6 /* AppDelegate+Window.swift in Sources */,
 				A7824B062271F25400ABA381 /* EditAddressTableViewCell.swift in Sources */,
 				BD12B69E22B4FAF000AEB10B /* KSMediaPickerNavigationView.swift in Sources */,
@@ -6362,6 +6412,7 @@
 				A7DF50D822A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift in Sources */,
 				A7C0FDE922B4BC5600BC1E86 /* CardContentCommentListContentTableViewCell.swift in Sources */,
 				A7EF3E0C23013EDE001E4D26 /* CommunityImageAuthModel.swift in Sources */,
+				A7811C8C231AD26300C2D8DE /* OtherPersonalCenterReportSureView.swift in Sources */,
 				BD12B67C22B4EE6D00AEB10B /* KSMediaPickerAlbumModel.swift in Sources */,
 				A72843FC224DB6B800F82F30 /* SwiftMoyaServiceUserApi.swift in Sources */,
 				BD6122AF22C3638300D3F513 /* AliyunEffectMvGroup.m in Sources */,
@@ -6719,6 +6770,7 @@
 				A72A72AC22321DE000B21995 /* Regex.swift in Sources */,
 				BD12B67422B4EC9700AEB10B /* KSMediaPickerController.swift in Sources */,
 				A770E5F922D5E0E500CBD0A4 /* CommunityShareContentViewController.swift in Sources */,
+				A7811C87231AB49800C2D8DE /* CommunityReportTableViewCell.swift in Sources */,
 				A7778CC52246035700C7C47A /* PhoneCountryAreaViewController.swift in Sources */,
 				A72A72CF22321E2700B21995 /* NotificationCenterMacro.swift in Sources */,
 				A72A72BF22321DE000B21995 /* Extension+UIButton.swift in Sources */,

+ 23 - 1
RainbowPlanet/RainbowPlanet/Model/ConfigModel/ConfigModel.swift

@@ -20,6 +20,7 @@ class ConfigModel : NSObject, Mappable{
     var virusAppId : String?
     var virusAppSecret : String?
     var virusUrl : String?
+    var reportCategory : [ReportCategory]?
     
     
     class func newInstance(map: Map) -> Mappable?{
@@ -39,7 +40,7 @@ class ConfigModel : NSObject, Mappable{
         virusAppId <- map["virus_app_id"]
         virusAppSecret <- map["virus_app_secret"]
         virusUrl <- map["virus_url"]
-        
+        reportCategory <- map["report_category"]
     }
     
     func saveObject(configModel: ConfigModel) {
@@ -88,3 +89,24 @@ class VirusModel : NSObject, Mappable{
     }
     
 }
+
+class ReportCategory : NSObject, Mappable{
+    
+    var id : Int?
+    var name : String?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return ReportCategory()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        id <- map["id"]
+        name <- map["name"]
+        
+    }
+    
+}

+ 46 - 13
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/CardContent/User/CardContentUserDisLikeView.swift

@@ -10,6 +10,7 @@ import UIKit
 import FWPopupView
 import RxSwift
 import RxCocoa
+import SwiftyMediator
 class CardContentUserDisLikeView: FWPopupView {
 
     let disposeBag = DisposeBag()
@@ -29,26 +30,33 @@ class CardContentUserDisLikeView: FWPopupView {
         self.masksToBounds = true
         self.isUserInteractionEnabled = true
         self.backgroundColor = UIColor.white
-        addTapGesture(1, target: self, action: #selector(hideView))
         addSubview(disLikeButton)
+        addSubview(lineLabel)
+        addSubview(reportButton)
     }
     
     func setupLayouts() {
         disLikeButton.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
+            make.top.equalToSuperview()
             make.left.equalTo(20)
+            make.height.equalTo(50)
+            make.right.equalToSuperview()
         }
         disLikeButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 10)
-    }
-    
-   @objc  func hideView() {
-        if self.isDisLike == 0 {
-            if let disLikeButtonClosure = self.disLikeButtonClosure {
-                disLikeButtonClosure()
-            }
-        }else {
-            self.hide()
+        lineLabel.snp.makeConstraints { (make) in
+            make.left.right.equalToSuperview()
+            make.top.equalTo(disLikeButton.snp.bottom)
+            make.height.equalTo(0.5)
         }
+        reportButton.snp.makeConstraints { (make) in
+            make.top.equalTo(lineLabel.snp.bottom)
+            make.left.equalTo(20)
+            make.right.equalToSuperview()
+            make.height.equalTo(50)
+        }
+        
+        reportButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 10)
+
     }
     
     typealias DisLikeButtonClosure = () -> Void
@@ -56,6 +64,7 @@ class CardContentUserDisLikeView: FWPopupView {
     
     lazy var disLikeButton: UIButton = {
         let disLikeButton = UIButton(type: UIButton.ButtonType.custom)
+        disLikeButton.contentHorizontalAlignment = .left
         disLikeButton.rx.tap.subscribe(onNext: { [weak self] (data) in
             if self?.isDisLike == 0 {
                 if let disLikeButtonClosure = self?.disLikeButtonClosure {
@@ -68,6 +77,24 @@ class CardContentUserDisLikeView: FWPopupView {
         return disLikeButton
     }()
     
+    lazy var lineLabel: UILabel = {
+        let lineLabel = UILabel()
+        lineLabel.backgroundColor = kE5E5E5Color
+        return lineLabel
+    }()
+    
+    lazy var reportButton: UIButton = {
+        let reportButton = UIButton(type: UIButton.ButtonType.custom)
+        reportButton.contentHorizontalAlignment = .left
+        reportButton.rx.tap.subscribe(onNext: { [weak self] (data) in
+            Mediator.push(CommunityRouterModuleType.pushReport(postId: self?.postId ?? 0))
+            self?.hide()
+        }).disposed(by: disposeBag)
+        return reportButton
+    }()
+    
+    var postId: Int?
+    
     var isDisLike : Int? {
         didSet {
             if isDisLike == 0 {
@@ -79,12 +106,18 @@ class CardContentUserDisLikeView: FWPopupView {
                 disLikeButton.setImage(kImage(name: "home_ico_dislike_pre"), for: UIControl.State.normal)
                 disLikeButton.setTitleColor(kThemeColor, for: UIControl.State.normal)
             }
+            
+            reportButton.setTitle("举报该内容", for: UIControl.State.normal)
+            reportButton.setImage(kImage(name: "home_ico_report"), for:UIControl.State.normal)
+            reportButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+
         }
     }
     
-    class func sheetDislike(dislike:Int,y:CGFloat,sureClosure:@escaping ((CardContentUserDisLikeView) -> Void)) {
-        let view = CardContentUserDisLikeView(frame: CGRect(x: 0, y: 0, width: kScreenWidth-28, height: 50))
+    class func sheetDislike(postId:Int?,dislike:Int,y:CGFloat,sureClosure:@escaping ((CardContentUserDisLikeView) -> Void)) {
+        let view = CardContentUserDisLikeView(frame: CGRect(x: 0, y: 0, width: kScreenWidth-28, height: 100.5))
         view.isDisLike = dislike
+        view.postId = postId
         let vProperty = FWPopupViewProperty()
         
         if y > kScreenHeight/2 {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Main/CommunityViewController.swift

@@ -277,7 +277,7 @@ class CommunityViewController: BaseViewController {
             title = contentStr ?? ""
         }
         let shareCommunityView =  ShareCommunityView.shareCommunityView(
-            uid: uid ?? 0,
+            postId: postId ?? 0, uid: uid ?? 0,
             h5Str: (H5UrlStr ?? "" + "\(UserModel.shared().getModel()?.inviteCode ?? "")"),
             thumbnailImg: UIImage.imageUrl(imgUrl),
             sharedTitle: String(title ?? ""),

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/Controller/CommunityRecommendController.swift

@@ -294,7 +294,7 @@ class CommunityRecommendController: BaseViewController {
             title = self.communityPostDetailModel?.content
         }
         let shareCommunityView =  ShareCommunityView.shareCommunityView(
-            uid: self.communityPostDetailModel?.uid ?? 0,
+            postId: self.communityPostDetailModel?.id ?? 0, uid: self.communityPostDetailModel?.uid ?? 0,
             h5Str: (self.communityPostDetailModel?.h5url ?? "" + "\(UserModel.shared().getModel()?.inviteCode ?? "")"),
             thumbnailImg: UIImage.imageUrl(self.communityPostDetailModel?.img),
             sharedTitle: String(title ?? ""),

+ 36 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityReport/View/CommunityReportHeaderView.swift

@@ -0,0 +1,36 @@
+//
+//  CommunityReportHeaderView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/8/31.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CommunityReportHeaderView: BaseView {
+
+    override func setupViews() {
+        backgroundColor = kf7f8faColor
+        addSubview(infoLabel)
+
+    }
+    
+    override func setupLayouts() {
+        infoLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.top.right.equalToSuperview()
+            make.height.equalTo(44)
+        }
+    }
+    
+    lazy var infoLabel: UILabel = {
+        let infoLabel = UILabel()
+        infoLabel.text = "请选择举报原因"
+        infoLabel.textColor = k333333Color
+        infoLabel.font = kRegularFont15
+        return infoLabel
+    }()
+    
+
+}

+ 74 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityReport/View/CommunityReportTableViewCell.swift

@@ -0,0 +1,74 @@
+//
+//  CommunityReportTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/8/31.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CommunityReportTableViewCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CommunityReportTableViewCell {
+        let ID = "CommunityReportTableViewCell"
+        tableView.register(CommunityReportTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : CommunityReportTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! CommunityReportTableViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        addSubview(infoLabel)
+        addSubview(lineLabel)
+    }
+    
+    private func setupLayouts() {
+        infoLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(14)
+        }
+        lineLabel.snp.makeConstraints { (make) in
+            make.bottom.right.equalToSuperview()
+            make.left.equalTo(14)
+            make.height.equalTo(0.5)
+        }
+    }
+    
+    lazy var infoLabel: UILabel = {
+        let infoLabel = UILabel()
+        infoLabel.textColor = k333333Color
+        infoLabel.font = kRegularFont16
+        return infoLabel
+    }()
+    
+    lazy var lineLabel: UILabel = {
+        let lineLabel = UILabel()
+        lineLabel.backgroundColor = kf5f5f5Color
+        return lineLabel
+    }()
+    
+    var reportCategory : ReportCategory? {
+        didSet{
+            infoLabel.text = reportCategory?.name
+        }
+    }
+    
+}

+ 36 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityReport/View/CommunityReportView.swift

@@ -0,0 +1,36 @@
+//
+//  CommunityReportView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/8/31.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CommunityReportView: BaseView {
+
+    override func setupViews() {
+        backgroundColor = kf7f8faColor
+        addSubview(infoLabel)
+
+    }
+    
+    override func setupLayouts() {
+        infoLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.top.right.equalToSuperview()
+            make.height.equalTo(44)
+        }
+    }
+    
+    lazy var infoLabel: UILabel = {
+        let infoLabel = UILabel()
+        infoLabel.text = "请选择举报原因"
+        infoLabel.textColor = k333333Color
+        infoLabel.font = kRegularFont15
+        return infoLabel
+    }()
+    
+
+}

+ 114 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityReport/ViewControllelr/CommunityReportViewController.swift

@@ -0,0 +1,114 @@
+//
+//  CommunityReportViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/8/31.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CommunityReportViewController: BaseViewController {
+
+    var reportCategorys : [ReportCategory]?
+    var postId : Int?
+    var uId : Int?
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        setupData()
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "举报"
+        view.addSubview(tableView)
+    }
+    
+    override func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalTo(kNavBarTotalHeight)
+            make.left.right.bottom.equalToSuperview()
+        }
+    }
+    
+    override func setupData() {
+        reportCategorys = ConfigModel.shared.object()?.reportCategory
+        if reportCategorys?.isEmpty ?? true {
+            DIYEmptyView.emptyNoDataTableView(tableView: tableView,imageStr:.one,detailStr:.one)
+        }
+        tableView.tableHeaderView = communityReportHeaderView
+        tableView.reloadData()
+    }
+    
+    private lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.rowHeight = 48
+        tableView.dataSource = self
+        tableView.delegate = self
+        return tableView
+    }()
+    
+    private lazy var communityReportHeaderView: CommunityReportHeaderView = {
+        let communityReportHeaderView = CommunityReportHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 44))
+        return communityReportHeaderView
+    }()
+    
+    func userMemberReportApi(reportCategoryId:Int?) {
+        SwiftMoyaNetWorkServiceUser.shared().userMemberReportApi(reportType: 1, postId: postId ?? 0, reportCategory: reportCategoryId ?? 0) {[weak self](data) -> (Void) in
+            self?.navigationController?.popViewController(animated: true)
+        }
+    }
+    
+    func userMemberReportUserApi(reportCategoryId:Int?) {
+        SwiftMoyaNetWorkServiceUser.shared().userMemberReportApi(reportType: 0, objectUid: uId ?? 0, reportCategory: reportCategoryId ?? 0) {[weak self](data) -> (Void) in
+            self?.navigationController?.popViewController(animated: true)
+        }
+    }
+
+}
+
+extension CommunityReportViewController : UITableViewDelegate,UITableViewDataSource {
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 1
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return reportCategorys?.count ?? 0
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = CommunityReportTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+        cell.reportCategory = reportCategorys?[indexPath.row]
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        let reportCategory = reportCategorys?[indexPath.row]
+        if uId != nil && uId != 0  {
+            userMemberReportUserApi(reportCategoryId: reportCategory?.id)
+        }else {
+            userMemberReportApi(reportCategoryId: reportCategory?.id)
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+}

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift

@@ -351,7 +351,7 @@ extension CommunityVideoListController {
             title = videoItemModel.content
         }
         let shareCommunityView =  ShareCommunityView.shareCommunityView(
-            uid: videoItemModel.uid ?? 0,
+            postId: videoItemModel.id ?? 0, uid: videoItemModel.uid ?? 0,
             h5Str: (videoItemModel.h5url ?? "" + "\(UserModel.shared().getModel()?.inviteCode ?? "")"),
             thumbnailImg: UIImage.imageUrl(videoItemModel.img),
             sharedTitle: String(title ?? ""),

+ 152 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/OtherPersonalCenter/View/OtherPersonalCenterReportView/OtherPersonalCenterReportSureView.swift

@@ -0,0 +1,152 @@
+//
+//  OtherPersonalCenterReportSureView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/9/1.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+import FWPopupView
+import RxSwift
+import SwiftyMediator
+
+class OtherPersonalCenterReportSureView: FWPopupView {
+    
+    let disposeBag = DisposeBag()
+    
+    var uid : Int?
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+    }
+    
+    init(uid:Int) {
+        self.init()
+        
+        self.uid = uid
+        
+        frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: 183 + kSafeTabBarHeight)
+        configRectCorner(corner: [.topLeft,.topRight], radii: CGSize(width: 8, height: 8))
+        setupViews()
+        setupLayouts()
+        setupData()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    func setupViews() {
+        addSubview(infoLabel)
+        addSubview(onelineLabel)
+        addSubview(sureButton)
+        addSubview(twolineLabel)
+        addSubview(cancelButton)
+        
+        
+    }
+    
+    func setupLayouts() {
+
+        infoLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(23)
+            make.left.equalTo(17.5)
+            make.right.equalTo(-17.5)
+            make.height.equalTo(40)
+
+        }
+        onelineLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(infoLabel.snp.bottom).offset(23)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(0.5)
+        }
+        sureButton.snp.makeConstraints { (make) in
+            make.top.equalTo(onelineLabel.snp.bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(48)
+        }
+        twolineLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(sureButton.snp.bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(0.5)
+        }
+        
+        cancelButton.snp.makeConstraints { (make) in
+            make.top.equalTo(twolineLabel.snp.bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(48)
+        }
+    }
+
+    
+    lazy var infoLabel: UILabel = {
+        let infoLabel = UILabel()
+        infoLabel.text = "你将无法看到该用户的内容,对方也无法为你的内容评论,收藏等。对方不会收到屏蔽通知。"
+        infoLabel.textColor = k999999Color
+        infoLabel.font = kRegularFont14
+        infoLabel.numberOfLines = 0
+        return infoLabel
+    }()
+    
+    lazy var onelineLabel: UILabel = {
+        let onelineLabel = UILabel()
+        onelineLabel.backgroundColor = keeeeeeColor
+        return onelineLabel
+    }()
+    
+    lazy var sureButton: UIButton = {
+        let sureButton = UIButton(type: UIButton.ButtonType.custom)
+        sureButton.setTitle("确定", for: UIControl.State.normal)
+        sureButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        sureButton.titleLabel?.font = kRegularFont16
+        return sureButton
+    }()
+    
+    lazy var twolineLabel: UILabel = {
+        let twolineLabel = UILabel()
+        twolineLabel.backgroundColor = keeeeeeColor
+        return twolineLabel
+    }()
+    
+    lazy var cancelButton: UIButton = {
+        let cancelButton = UIButton(type: UIButton.ButtonType.custom)
+        cancelButton.setTitle("取消", for: UIControl.State.normal)
+        cancelButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        cancelButton.titleLabel?.font = kRegularFont16
+        return cancelButton
+    }()
+    
+    func setupData() {
+        sureButton.rx.tap.subscribe(onNext: {
+            [weak self] _ in
+            self?.userMemberBlackListApi()
+        }).disposed(by: disposeBag)
+        cancelButton.rx.tap.subscribe(onNext: {
+            [weak self] _ in
+            self?.hide()
+        }).disposed(by: disposeBag)
+    }
+    
+    func userMemberBlackListApi() {
+        SwiftMoyaNetWorkServiceUser.shared().userMemberBlackListApi(objectUid: self.uid ?? 0) {[weak self](data) -> (Void) in
+            self?.hide()
+        }
+    }
+    
+    class func otherPersonalCenterReportSureView(uid:Int) {
+        let view = OtherPersonalCenterReportSureView(uid:uid)
+        view.uid = uid
+        let vProperty = FWPopupViewProperty()
+        vProperty.popupCustomAlignment = .bottomCenter
+        vProperty.popupViewEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
+        vProperty.popupAnimationType = .frame
+        vProperty.maskViewColor = UIColor(white: 0, alpha: 0.5)
+        vProperty.touchWildToHide = "1"
+        view.vProperty = vProperty
+        view.show()
+    }
+    
+}
+

+ 176 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/OtherPersonalCenter/View/OtherPersonalCenterReportView/OtherPersonalCenterReportView.swift

@@ -0,0 +1,176 @@
+//
+//  OtherPersonalCenter.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/8/31.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+import FWPopupView
+import RxSwift
+import SwiftyMediator
+
+class OtherPersonalCenterReportView: FWPopupView {
+    
+    let disposeBag = DisposeBag()
+    
+    let platformTitles = ["举报","屏蔽用户"]
+    let platformImages = ["edit_pic_report","edit_pic_shield"]
+    let platformTitles1 = ["举报","取消屏蔽"]
+    
+    var uid : Int?
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+    }
+    
+    init(uid:Int) {
+        self.init()
+       
+        self.uid = uid
+       
+        frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: 157 + kSafeTabBarHeight)
+        configRectCorner(corner: [.topLeft,.topRight], radii: CGSize(width: 8, height: 8))
+        setupViews()
+        setupLayouts()
+        setupData()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    func setupViews() {
+        addSubview(collectionView)
+        addSubview(lineLabel)
+        addSubview(cancelButton)
+        
+    }
+    
+    func setupLayouts() {
+        collectionView.snp.makeConstraints { (make) in
+            make.top.equalTo(30)
+            make.height.equalTo(69)
+            make.left.right.equalToSuperview()
+        }
+        lineLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(collectionView.snp.bottom).offset(10)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(0.5)
+        }
+        cancelButton.snp.makeConstraints { (make) in
+            make.top.equalTo(lineLabel.snp.bottom)
+            make.height.equalTo(44)
+            make.left.right.equalToSuperview()
+        }
+    }
+    
+
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = UIColor.white
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumLineSpacing = 20
+        collectionViewLayout.minimumInteritemSpacing = 0
+        collectionViewLayout.scrollDirection = .horizontal
+        return collectionViewLayout
+    }()
+    
+    lazy var lineLabel: UILabel = {
+        let lineLabel = UILabel()
+        lineLabel.backgroundColor = keeeeeeColor
+        return lineLabel
+    }()
+    
+    lazy var cancelButton: UIButton = {
+        let cancelButton = UIButton(type: UIButton.ButtonType.custom)
+        cancelButton.setTitle("取消", for: UIControl.State.normal)
+        cancelButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        cancelButton.titleLabel?.font = kRegularFont16
+        return cancelButton
+    }()
+    
+    func setupData() {
+        cancelButton.rx.tap.subscribe(onNext: {
+            [weak self] _ in
+            self?.hide()
+        }).disposed(by: disposeBag)
+    }
+    
+    class func otherPersonalCenterReportView(uid:Int) {
+        let view = OtherPersonalCenterReportView(uid:uid)
+        view.uid = uid
+        let vProperty = FWPopupViewProperty()
+        vProperty.popupCustomAlignment = .bottomCenter
+        vProperty.popupViewEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
+        vProperty.popupAnimationType = .frame
+        vProperty.maskViewColor = UIColor(white: 0, alpha: 0.5)
+        vProperty.touchWildToHide = "1"
+        view.vProperty = vProperty
+        view.show()
+    }
+    
+}
+
+extension OtherPersonalCenterReportView: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        if UserModel.shared().isEqualUid(uid: self.uid ?? 0) {
+            return platformTitles.count
+        }else {
+            return platformTitles1.count
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = ShareCommunityViewCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+//        if UserModel.shared().isEqualUid(uid: self.uid ?? 0) {
+            cell.titleIcon(title: platformTitles[indexPath.row], iconStr: platformImages[indexPath.row], textColor: k333333Color)
+            
+//        }else {
+//            cell.titleIcon(title: platformTitles1[indexPath.row], iconStr: platformImages[indexPath.row], textColor: k333333Color)
+//
+//        }
+        return cell
+        
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        switch indexPath.row {
+        case 0:
+            Mediator.push(CommunityRouterModuleType.pushReportUser(uid: self.uid ?? 0))
+            self.hide()
+            break
+        case 1:
+            self.hide()
+            OtherPersonalCenterReportSureView.otherPersonalCenterReportSureView(uid: self.uid ?? 0)
+            break
+        default:
+            break
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:50, height: 69)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 0, left: 23, bottom: 0, right: 23)
+    }
+    
+}
+

+ 5 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/OtherPersonalCenter/ViewController/OtherPersonalCenterViewController.swift

@@ -47,6 +47,7 @@ class OtherPersonalCenterViewController: BaseViewController {
     /// 设置navigationBar
     func setnavigationBar() {
         navigationBar.wr_setLeftButton(image: kImage(name: "navbar_back_white")!)
+        navigationBar.wr_setRightButton(image: kImage(name: "navbar_edit")!)
         navigationBar.addSubview(navigationBgView)
         navigationBar.addSubview(avatarButton)
         navigationBar.addSubview(nameButton)
@@ -81,6 +82,10 @@ class OtherPersonalCenterViewController: BaseViewController {
     override func setupData() {
         reloadData()
         userMemberDetailApi()
+        navigationBar.onClickRightButton = {
+            [weak self] in
+            OtherPersonalCenterReportView.otherPersonalCenterReportView(uid: self?.uid ?? 0)
+        }
     }
     
     

+ 15 - 1
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/ViewController/RegisterLoginViewController.swift

@@ -41,6 +41,7 @@ class RegisterLoginViewController: BaseViewController {
         view.addSubview(weixinLoginButton)
         view.addSubview(QQLoginButton)
         view.addSubview(agreementLabel)
+        view.addSubview(agreementButton)
         view.insertSubview(navigationBar, aboveSubview: playerView)
         view.insertSubview(navigationBar, aboveSubview: bgView)
 
@@ -86,9 +87,14 @@ class RegisterLoginViewController: BaseViewController {
         
         agreementLabel.snp.makeConstraints { (make) in
             make.bottom.equalTo(-(kSafeTabBarHeight+20))
-            make.centerX.equalToSuperview()
+            make.centerX.equalToSuperview().offset(25)
         }
         
+        agreementButton.snp.makeConstraints { (make) in
+            make.right.equalTo(agreementLabel.snp.left).offset(-5)
+            make.centerY.equalTo(agreementLabel)
+            make.size.equalTo(15)
+        }
         
     }
     
@@ -208,6 +214,14 @@ class RegisterLoginViewController: BaseViewController {
         return agreementLabel
     }()
     
+    private lazy var agreementButton: UIButton = {
+        let agreementButton = UIButton(type: UIButton.ButtonType.custom)
+        agreementButton.isSelected = true
+        agreementButton.setImage(kImage(name: "edit_topic_pitchon"), for: UIControl.State.normal)
+        agreementButton.setImage(kImage(name: "edit_topic_pitchon"), for: UIControl.State.normal)
+        return agreementButton
+    }()
+    
     private lazy var playerView: UIView = {
         let playerView = UIView()
         return playerView

+ 25 - 7
RainbowPlanet/RainbowPlanet/Modules/ShareModules/ShareCommunityModule/ShareCommunity/ShareCommunityView.swift

@@ -23,6 +23,9 @@ class ShareCommunityView: FWPopupView {
     let platformTitles = ["微信","朋友圈","QQ","微博","复制链接","保存图片","删除"]
     let platformImages = ["edit_pic_wechat","edit_pic_moments","edit_pic_qq","edit_pic_sina","edit_pic_link","edit_pic_download","edit_pic_delete"]
     
+    let platformTitles1 = ["微信","朋友圈","QQ","微博","复制链接","保存图片","举报"]
+    let platformImages1 = ["edit_pic_wechat","edit_pic_moments","edit_pic_qq","edit_pic_sina","edit_pic_link","edit_pic_download","edit_pic_report"]
+    
     private var title : String?
     private var detailTitle : String?
     private var sharedTitle : String?
@@ -31,6 +34,7 @@ class ShareCommunityView: FWPopupView {
     private var thumbnailImg : UIImage?
     private var shareCommunityViewType : ShareCommunityViewType?
     var uid : Int?
+    var postId : Int?
     
     override init(frame: CGRect) {
         super.init(frame: frame)
@@ -42,8 +46,9 @@ class ShareCommunityView: FWPopupView {
     var saveCompletion : SaveCompletion?
     typealias DeleteCompletion = (() -> Void)
     var deleteCompletion : DeleteCompletion?
-    init(uid:Int,title:String,detailTitle:String,h5Str:String,thumbnailImg:UIImage?,sharedTitle:String,sharedDetailTitle:String,shareCommunityViewType:ShareCommunityViewType) {
+    init(postId : Int = 0,uid:Int,title:String,detailTitle:String,h5Str:String,thumbnailImg:UIImage?,sharedTitle:String,sharedDetailTitle:String,shareCommunityViewType:ShareCommunityViewType) {
         self.init()
+        self.postId = postId
         self.uid = uid
         self.title = title
         self.detailTitle = detailTitle
@@ -161,8 +166,9 @@ class ShareCommunityView: FWPopupView {
     
     
     /// 分享内容
-    class func shareCommunityView(uid:Int,title:String = kCommunityPostTitle,detailTitle:String = kCommunityPostDetailTitle, h5Str:String,thumbnailImg:UIImage?,sharedTitle:String,sharedDetailTitle:String,shareCommunityViewType:ShareCommunityViewType,completion: @escaping Completion) -> ShareCommunityView {
+    class func shareCommunityView(postId:Int,uid:Int,title:String = kCommunityPostTitle,detailTitle:String = kCommunityPostDetailTitle, h5Str:String,thumbnailImg:UIImage?,sharedTitle:String,sharedDetailTitle:String,shareCommunityViewType:ShareCommunityViewType,completion: @escaping Completion) -> ShareCommunityView {
         let view = ShareCommunityView(
+            postId:postId,
             uid:uid,
             title:title,
             detailTitle: detailTitle,
@@ -189,7 +195,7 @@ class ShareCommunityView: FWPopupView {
     /// 邀请好友
     class func inviteGoodFriends() {
         let shareCommunityView =  ShareCommunityView.shareCommunityView(
-            uid:0,
+            postId: 0, uid:0,
             title: kInviteGoodFriendsTitle,
             detailTitle: kInviteGoodFriendsDetailTitle,
             h5Str: kH5InviteUrl + "\(UserModel.shared().getModel()?.inviteCode ?? "")",
@@ -214,13 +220,19 @@ extension ShareCommunityView: UICollectionViewDelegateFlowLayout,UICollectionVie
         if UserModel.shared().isEqualUid(uid: self.uid ?? 0) {
             return platformTitles.count
         }else {
-            return platformTitles.prefix(6).count
+            return platformTitles1.count
         }
     }
     
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
         let cell = ShareCommunityViewCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
-        cell.titleIcon(title: platformTitles[indexPath.row], iconStr: platformImages[indexPath.row], textColor: k333333Color)
+        if UserModel.shared().isEqualUid(uid: self.uid ?? 0) {
+            cell.titleIcon(title: platformTitles[indexPath.row], iconStr: platformImages[indexPath.row], textColor: k333333Color)
+
+        }else {
+            cell.titleIcon(title: platformTitles1[indexPath.row], iconStr: platformImages[indexPath.row], textColor: k333333Color)
+
+        }
         return cell
         
     }
@@ -269,8 +281,14 @@ extension ShareCommunityView: UICollectionViewDelegateFlowLayout,UICollectionVie
             }
             break
         case 6:
-            if let deleteCompletion = self.deleteCompletion {
-                deleteCompletion()
+            
+            if UserModel.shared().isEqualUid(uid: self.uid ?? 0) {
+                if let deleteCompletion = self.deleteCompletion {
+                    deleteCompletion()
+                }
+                
+            }else {
+                Mediator.push(CommunityRouterModuleType.pushReport(postId: self.postId ?? 0))
             }
             break
         default:

+ 11 - 0
RainbowPlanet/RainbowPlanet/Router/CommunityRouterModuleType.swift

@@ -15,11 +15,14 @@ import SwiftyMediator
 /// - pushPostDetailVoide: 跳转视频内容
 /// - pushFeaturedTopics: 话题内容
 /// - pushFindFriends: 找朋友
+/// - pushReport: 举报
 public enum CommunityRouterModuleType: MediatorTargetType {
     case pushPostDetailContent(postId: String)
     case pushPostDetailVoide(postId: String, departType: DepartureVCType,topicId:Int)
     case pushFeaturedTopics(id : Int)
     case pushFindFriends
+    case pushReport(postId: Int)
+    case pushReportUser(uid: Int)
 }
 
 extension CommunityRouterModuleType: MediatorSourceType {
@@ -42,6 +45,14 @@ extension CommunityRouterModuleType: MediatorSourceType {
         case .pushFindFriends:
             let vc = CommunityFindFriendsViewController()
             return vc
+        case .pushReport(let postId):
+            let vc = CommunityReportViewController()
+            vc.postId = postId
+            return vc
+        case .pushReportUser(let id):
+            let vc = CommunityReportViewController()
+            vc.uId = id
+            return vc
         }
         
         

+ 33 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift

@@ -864,5 +864,38 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
             (loadingStatus) in
         }
     }
+    
+    // MARK: - 举报
+    /// 举报
+    ///
+    /// - Parameter completion: 回调
+    func userMemberReportApi(reportType:Int = 0,objectUid:Int = 0,postId:Int = 0,reportCategory:Int = 0,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(reportType, forKey: "report_type")
+        parameters.updateValue(objectUid, forKey: "object_uid")
+        parameters.updateValue(postId, forKey: "post_id")
+        parameters.updateValue(reportCategory, forKey: "report_category")
+        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceUserApi.userMemberReport(parameters: parameters)), completion: { (data) in
+            SwiftProgressHUD.shared().showText(data as! String)
+            completion("")
+        }) {
+            (loadingStatus) in
+        }
+    }
+    
+    // MARK: - 拉黑
+    /// 拉黑
+    ///
+    /// - Parameter completion: 回调
+    func userMemberBlackListApi(objectUid:Int = 0,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(objectUid, forKey: "object_uid")
+        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceUserApi.userMemberBlackList(parameters: parameters)), completion: { (data) in
+            SwiftProgressHUD.shared().showText(data as! String)
+            completion("")
+        }) {
+            (loadingStatus) in
+        }
+    }
 
 }

+ 28 - 4
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaServiceUserApi.swift

@@ -157,6 +157,14 @@ public let kUserMemberGetTotalBeanApi = "/user/v2/member/getTotalBean"
 /// 手机号码一键登录
 public let kUserMobileAuthorizationLoginApi = "/user/mobileAuthorizationLogin"
 
+// MARK: - 举报
+/// 举报
+public let kUserMemberReportApi = "/user/v2/member/report"
+
+// MARK: - 拉黑(屏蔽)
+/// 拉黑(屏蔽)
+public let kUserMemberBlackListApi = "/user/v2/member/blacklist"
+
 
 /// 用户
 ///
@@ -197,6 +205,8 @@ public let kUserMobileAuthorizationLoginApi = "/user/mobileAuthorizationLogin"
 /// - userMemberSearchMember: 用户搜索列表
 /// - userMemberGetTotalBean: 获取用户U米总额
 /// - userMobileAuthorizationLogin: 手机号码一键登录
+/// - userMemberReport: 举报
+/// - userMemberBlackList: 拉黑(屏蔽)
 public enum SwiftMoyaServiceUserApi {
     case userLogout(parameters:Dictionary<String, Any>)
     case userRefresh(parameters:Dictionary<String, Any>)
@@ -235,6 +245,8 @@ public enum SwiftMoyaServiceUserApi {
     case userMemberSearchMember(parameters:Dictionary<String, Any>)
     case userMemberGetTotalBean(parameters:Dictionary<String, Any>)
     case userMobileAuthorizationLogin(parameters:Dictionary<String, Any>)
+    case userMemberReport(parameters:Dictionary<String, Any>)
+    case userMemberBlackList(parameters:Dictionary<String, Any>)
     
 }
 
@@ -278,7 +290,9 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userMemberReadMessage,
              .userMemberSearchMember,
              .userMemberGetTotalBean,
-             .userMobileAuthorizationLogin
+             .userMobileAuthorizationLogin,
+             .userMemberReport,
+             .userMemberBlackList
             :
             return URL(string: kApiDataPrefix())!
         }
@@ -360,6 +374,10 @@ extension SwiftMoyaServiceUserApi: TargetType {
             return kUserMemberGetTotalBeanApi
         case .userMobileAuthorizationLogin:
             return kUserMobileAuthorizationLoginApi
+        case .userMemberReport:
+            return kUserMemberReportApi
+        case .userMemberBlackList:
+            return kUserMemberBlackListApi
         }
     }
 
@@ -380,7 +398,9 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userSaveExpreesContacts,
              .userAddSelfAddress,
              .userFollow,
-             .userMobileAuthorizationLogin
+             .userMobileAuthorizationLogin,
+             .userMemberReport,
+             .userMemberBlackList
             :
             return .post
         case .userAddressIsDefault,
@@ -454,7 +474,9 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userMemberMessageList(var parameters),
              .userMemberReadMessage(var parameters),
              .userMemberSearchMember(var parameters),
-             .userMemberGetTotalBean(var parameters)
+             .userMemberGetTotalBean(var parameters),
+             .userMemberReport(var parameters),
+             .userMemberBlackList(var parameters)
             :
             let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
             parameters.updateValue(sign, forKey: "sign")
@@ -512,7 +534,9 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userMemberMessageList,
              .userMemberReadMessage,
              .userMemberSearchMember,
-             .userMemberGetTotalBean
+             .userMemberGetTotalBean,
+             .userMemberReport,
+             .userMemberBlackList
             :
             return (headerParameters(headerType: .tokenHeader) as! [String : String])
         case .userLogout,

+ 2 - 2
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift

@@ -11,8 +11,8 @@ import Foundation
 /// Service
 let kPersonalService = false
 let kDevelopSever = false
-let kBetaSever = false
-let kProductSever = true
+let kBetaSever = true
+let kProductSever = false
 
 
 // MARK: - 数据服务器

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

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

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


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


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

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

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


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


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

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

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


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


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

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

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


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


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

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

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


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


+ 4 - 4
RainbowPlanet/RainbowPlanet/ViewModel/Virus/VirusViewModel.swift

@@ -57,7 +57,7 @@ extension VirusViewModel {
     func like(communityRecommendDataModel: CommunityRecommendDataModel,y:CGFloat,tableView:UITableView) {
         if communityRecommendDataModel.isDislike == 0 {//喜欢
             
-            CardContentUserDisLikeView.sheetDislike(dislike: 0, y: y) {
+            CardContentUserDisLikeView.sheetDislike(postId:communityRecommendDataModel.id,dislike: 0, y: y) {
                 [weak self,weak tableView] (view:CardContentUserDisLikeView) in
                 self?.virueRecordAddApiLike(communityRecommendDataModel: communityRecommendDataModel, completion: { [weak tableView] (isDislike) in
                     communityRecommendDataModel.isDislike = isDislike
@@ -65,7 +65,7 @@ extension VirusViewModel {
                 })
             }
         }else {//不喜欢
-            CardContentUserDisLikeView.sheetDislike(dislike: 1, y: y) {
+            CardContentUserDisLikeView.sheetDislike(postId: communityRecommendDataModel.id, dislike: 1, y: y) {
                 (view:CardContentUserDisLikeView) in
                 
             }
@@ -239,7 +239,7 @@ extension VirusViewModel {
     func like(communityFollowDataModel:CommunityFollowDataModel?,y:CGFloat,tableView:UITableView) {
         if communityFollowDataModel?.relateData?.isDislike == 0 {//喜欢
             
-            CardContentUserDisLikeView.sheetDislike(dislike: 0, y: y) {
+            CardContentUserDisLikeView.sheetDislike(postId: communityFollowDataModel?.relateData?.id,dislike: 0, y: y) {
                 [weak self,weak tableView] (view:CardContentUserDisLikeView) in
                 self?.virueRecordAddApiLike(communityFollowDataModel: communityFollowDataModel, completion: { [weak tableView] (isFollow) in
                     communityFollowDataModel?.relateData?.isDislike = isFollow
@@ -247,7 +247,7 @@ extension VirusViewModel {
                 })
             }
         }else {//不喜欢
-            CardContentUserDisLikeView.sheetDislike(dislike: 1, y: y) {
+            CardContentUserDisLikeView.sheetDislike(postId: communityFollowDataModel?.relateData?.id, dislike: 1, y: y) {
                 (view:CardContentUserDisLikeView) in
                 
             }