瀏覽代碼

修复了部分bug

南鑫林 5 年之前
父節點
當前提交
4d6372b3c1
共有 35 個文件被更改,包括 222 次插入228 次删除
  1. 0 4
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 2 2
      RainbowPlanet/RainbowPlanet/Manager/ATAuthSDKManager/ATAuthSDKManager.swift
  3. 9 1
      RainbowPlanet/RainbowPlanet/Manager/AliyunVodManager/AliyunVodUpToyoPublishManager/AliyunVodupToyoPublishManager.swift
  4. 1 2
      RainbowPlanet/RainbowPlanet/Manager/RegisterLoginManager/RegisterLoginManager.swift
  5. 0 12
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/View/CommunityFeaturedTopicsHeaderView.swift
  6. 22 8
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/ViewController/CommunityFeaturedTopicsViewController.swift
  7. 6 6
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFindFriends/ViewController/CommunityFindFriendsViewController.swift
  8. 9 5
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/Controller/CommunityRecommendController.swift
  9. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/RecommendNoneCommentCell.swift
  10. 15 11
      RainbowPlanet/RainbowPlanet/Modules/MineModule/ModifyData/ViewController/ModifyDataViewController.swift
  11. 9 3
      RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/ViewController/MyFollowAndFanViewController.swift
  12. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/Set/View/SetView.swift
  13. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/Set/ViewController/SetViewController.swift
  14. 3 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCoverPick/View/AliyunCoverPickView.m
  15. 0 14
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/Controller/PublishEditController.swift
  16. 1 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/View/PublishEditTitleCell.swift
  17. 4 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMediaPicker/Controller/KSMediaPickerController.swift
  18. 3 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMediaPicker/View/KSMediaPickerPreviewView.swift
  19. 2 2
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMediaPicker/View/KSMediaPickerViewImageCell.swift
  20. 0 33
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishAgreementController.swift
  21. 7 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishMusicChooseView.swift
  22. 6 6
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishMusicListCell.swift
  23. 0 18
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishMusicVolumnView.swift
  24. 4 6
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishRecommendMusicController.swift
  25. 6 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishRecordMusicView.swift
  26. 3 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishViewController.swift
  27. 1 1
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/RedemptionArea/View/Banner/RedemptionAreaBannerCollectionViewCell.swift
  28. 3 3
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchUser/View/SearchUserLitTableViewCell.swift
  29. 1 1
      RainbowPlanet/RainbowPlanet/Router/H5RouterModuleType.swift
  30. 19 19
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift
  31. 二進制
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/ico_bean_org.imageset/ico_bean_org@2x.png
  32. 二進制
      RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/ico_bean_org.imageset/ico_bean_org@3x.png
  33. 11 51
      RainbowPlanet/RainbowPlanet/Supporting Files/Info.plist
  34. 45 14
      RainbowPlanet/RainbowPlanet/Tools/PhotoAndCameraManager/PhotoAndCameraManager.swift
  35. 27 0
      RainbowPlanet/RainbowPlanet/ViewModel/Community/CommunityFollowUserViewModel.swift

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

@@ -597,7 +597,6 @@
 		BD4B50AC22BC7DEA0073B516 /* FilterResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BD4B50AB22BC7DEA0073B516 /* FilterResource.bundle */; };
 		BD4B50AE22BC815F0073B516 /* PublishFilterCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD4B50AD22BC815F0073B516 /* PublishFilterCollectionCell.swift */; };
 		BD50F47022E157F50077D4BF /* PublishRecordMusicView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD50F46F22E157F50077D4BF /* PublishRecordMusicView.swift */; };
-		BD50F47222E158FB0077D4BF /* PublishAgreementController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD50F47122E158FB0077D4BF /* PublishAgreementController.swift */; };
 		BD5CA89222DD73A500364A67 /* PublishMusicVolumnView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD5CA89122DD73A500364A67 /* PublishMusicVolumnView.swift */; };
 		BD5CA89522DDA2A100364A67 /* CustomSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD5CA89422DDA2A100364A67 /* CustomSlider.swift */; };
 		BD61225422C355C800D3F513 /* AliyunMagicCameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BD61225322C355C800D3F513 /* AliyunMagicCameraViewController.m */; };
@@ -1349,7 +1348,6 @@
 		BD4B50AB22BC7DEA0073B516 /* FilterResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = FilterResource.bundle; sourceTree = "<group>"; };
 		BD4B50AD22BC815F0073B516 /* PublishFilterCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishFilterCollectionCell.swift; sourceTree = "<group>"; };
 		BD50F46F22E157F50077D4BF /* PublishRecordMusicView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishRecordMusicView.swift; sourceTree = "<group>"; };
-		BD50F47122E158FB0077D4BF /* PublishAgreementController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishAgreementController.swift; sourceTree = "<group>"; };
 		BD5CA89122DD73A500364A67 /* PublishMusicVolumnView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishMusicVolumnView.swift; sourceTree = "<group>"; };
 		BD5CA89422DDA2A100364A67 /* CustomSlider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomSlider.swift; sourceTree = "<group>"; };
 		BD61225222C355C800D3F513 /* AliyunMagicCameraViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AliyunMagicCameraViewController.h; sourceTree = "<group>"; };
@@ -5331,7 +5329,6 @@
 				BDD9377422DEF371002D11B3 /* PublishMusicListCell.swift */,
 				BD5CA89122DD73A500364A67 /* PublishMusicVolumnView.swift */,
 				BDBC0AF522DDEA4E00CA788E /* PublishRecommendMusicController.swift */,
-				BD50F47122E158FB0077D4BF /* PublishAgreementController.swift */,
 			);
 			path = PublishMusicAbout;
 			sourceTree = "<group>";
@@ -6490,7 +6487,6 @@
 				BD12203622AF807C0051C7C2 /* MessagePlanetActivityController.swift in Sources */,
 				BD13B6C222BA034D008BB323 /* PublishEditAddImgCollectionCell.swift in Sources */,
 				A7778CAB2244B12500C7C47A /* CountDownManager.swift in Sources */,
-				BD50F47222E158FB0077D4BF /* PublishAgreementController.swift in Sources */,
 				A76068F322E4B11B008DF18F /* UIImage+Gif.swift in Sources */,
 				A775CBFE2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift in Sources */,
 				A71AA5212272E527008FF1A5 /* Extension+UINavigationController.swift in Sources */,

+ 2 - 2
RainbowPlanet/RainbowPlanet/Manager/ATAuthSDKManager/ATAuthSDKManager.swift

@@ -73,8 +73,8 @@ class ATAuthSDKManager: NSObject {
                         SwiftMoyaNetWorkServiceUser.shared().userMobileAuthorizationLoginApi(token: atAuthSDKModel?.token ?? "", completion: {
                             [weak vc] (userModel) -> (Void) in
                             TXCommonHandler.sharedInstance().cancelLoginVC(animated: true, complete: {
-                                //                                RegisterLoginManager.registerLoginSuccessApi(vc: vc)
-
+                                [weak vc] in
+                                RegisterLoginManager.registerLoginSuccessApi(vc: vc)
                             })
                         })
                         break

+ 9 - 1
RainbowPlanet/RainbowPlanet/Manager/AliyunVodManager/AliyunVodUpToyoPublishManager/AliyunVodupToyoPublishManager.swift

@@ -71,7 +71,15 @@ class AliyunVodUpToyoPublishManager: NSObject {
 extension AliyunVodUpToyoPublishManager {
     // 获取视频上传地址和凭证(视频)
     func videoUploadAuth() {
-        SwiftMoyaNetWorkServiceCommunity.shared().communityVideoUploadAuthApi(title: self.aliyunVodUpToYoPublishModel?.title ?? "", filename: "\(self.aliyunVodUpToYoPublishModel?.videoPath?.suffix(20) ?? "")", cover_url: self.aliyunVodUpToYoPublishModel?.videoCoverImageUrlPath ?? "", completion: {
+        
+        var title = ""
+        if self.aliyunVodUpToYoPublishModel?.title == nil || self.aliyunVodUpToYoPublishModel?.title == "" {
+            title = self.aliyunVodUpToYoPublishModel?.content ?? ""
+        }else {
+            title = self.aliyunVodUpToYoPublishModel?.title ?? ""
+        }
+
+        SwiftMoyaNetWorkServiceCommunity.shared().communityVideoUploadAuthApi(title:title, filename: "\(self.aliyunVodUpToYoPublishModel?.videoPath?.suffix(20) ?? "")", cover_url: self.aliyunVodUpToYoPublishModel?.videoCoverImageUrlPath ?? "", completion: {
             [weak self] (communityVideoAuthModel) -> (Void) in
             let communityVideoAuthModel = communityVideoAuthModel as? CommunityVideoAuthModel
             self?.aliyunVodUpToYoPublishModel?.pushVideoId = communityVideoAuthModel?.videoId

+ 1 - 2
RainbowPlanet/RainbowPlanet/Manager/RegisterLoginManager/RegisterLoginManager.swift

@@ -13,11 +13,10 @@ class RegisterLoginManager: NSObject {
     class func registerLoginSuccessApi(vc:UIViewController?) {
         // 设置友盟别名
         UMManager.shared.addAlias()
+        weak var vc = vc
         if UserModel.shared().getModel()?.isFollowSuggestTopic == 0 || UserModel.shared().getModel()?.isFollowSuggestTopic == nil  { //设置性别
-            weak var vc = vc
             vc?.navigationController?.pushViewController(GenderSelectionViewController(), animated: true)
         }else {// 设置首页
-            weak var vc = vc
             vc?.navigationController?.dismiss(animated: false, completion: {})
             kAppDelegate.setTabbarController()
         }

+ 0 - 12
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/View/CommunityFeaturedTopicsHeaderView.swift

@@ -16,7 +16,6 @@ class CommunityFeaturedTopicsHeaderView: BaseView {
         addSubview(numberPeopleLabel)
         addSubview(topicLabel)
         addSubview(focusButton)
-        addSubview(bottomView)
     }
     
     override func setupLayouts() {
@@ -78,17 +77,6 @@ class CommunityFeaturedTopicsHeaderView: BaseView {
         return focusButton
     }()
     
-    private lazy var bottomView: UIView = {
-        let bottomView = UIView(frame: CGRect(x: 0, y: 180+kSafeStatusBarHeight, width: kScreenWidth, height: 20))
-        bottomView.backgroundColor = .white
-        let shapeLayer = CAShapeLayer()
-        bottomView.layer.mask = nil
-        let bezierPath = UIBezierPath(roundedRect: bottomView.bounds,byRoundingCorners: [.topLeft,.topRight],cornerRadii: CGSize(width: 8,height: 8))
-        shapeLayer.path = bezierPath.cgPath
-        bottomView.layer.mask = shapeLayer
-        return bottomView
-    }()
-    
     var communityTopicDetailModel : CommunityTopicDetailModel? {
         didSet {
             numberPeopleLabel.text = "\(communityTopicDetailModel?.followCount ?? "0")位老板在此话题下讨论"

+ 22 - 8
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/ViewController/CommunityFeaturedTopicsViewController.swift

@@ -12,6 +12,7 @@ import Kingfisher
 class CommunityFeaturedTopicsViewController: BaseViewController {
     
     deinit {
+        NXLLog("deinit")
         if observe != nil {
             NotificationCenter.default.removeObserver(observe!)
         }
@@ -106,6 +107,7 @@ class CommunityFeaturedTopicsViewController: BaseViewController {
     private lazy var bgImageView: UIImageView = {
         let bgImageView = UIImageView()
         bgImageView.contentMode = .scaleAspectFill
+        bgImageView.clipsToBounds = true
         return bgImageView
     }()
     
@@ -116,7 +118,7 @@ class CommunityFeaturedTopicsViewController: BaseViewController {
     }()
     
     private lazy var communityFeaturedTopicsHeaderView: CommunityFeaturedTopicsHeaderView = {
-        let communityFeaturedTopicsHeaderView = CommunityFeaturedTopicsHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 200 + kSafeStatusBarHeight))
+        let communityFeaturedTopicsHeaderView = CommunityFeaturedTopicsHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 180 + kSafeStatusBarHeight))
         return communityFeaturedTopicsHeaderView
     }()
     
@@ -383,18 +385,29 @@ extension CommunityFeaturedTopicsViewController : UITableViewDelegate,UITableVie
         case 0:
             let cell = CardContentUserTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
             cell.communityRecommendDataModel = communityRecommendDataModel
+            let shapeLayer = CAShapeLayer()
+            cell.layer.mask = nil
+            if indexPath.section == 0 {
+                let bezierPath = UIBezierPath(roundedRect: cell.bounds,byRoundingCorners: [.topLeft,.topRight],cornerRadii: CGSize(width: 8,height: 8))
+                shapeLayer.path = bezierPath.cgPath
+                cell.layer.mask = shapeLayer
+            }else {
+                let bezierPath = UIBezierPath(roundedRect: cell.bounds,byRoundingCorners: [.allCorners],cornerRadii: CGSize(width: 0,height: 0))
+                shapeLayer.path = bezierPath.cgPath
+                cell.layer.mask = shapeLayer
+            }
             cell.followClosure = {
                 [weak self] in
-                CommunityFollowUserViewModel.shared.follow(communityRecommendDataModel: communityRecommendDataModel, communityRecommendDataModels: (self?.communityRecommendDataModels)!, tableView: tableView)
+                CommunityFollowUserViewModel.shared.follow(communityRecommendDataModel: communityRecommendDataModel, communityRecommendDataModels: (self?.communityRecommendDataModels)!, tableView: (self?.tableView)!)
             }
-            cell.likeClosure = { y in
+            cell.likeClosure = {[weak self]  y in
                 if UserModel.shared().isEqualUid(uid: communityRecommendDataModel.uid ?? 0) {
                     CardContentUserDeleteView.sheetDeleteView(y: y, sureClosure: { [weak self] (cardContentUserDeleteView) in
                         self?.communityDeleteApi(postId: communityRecommendDataModel.id ?? 0, section: indexPath.section)
 
                     })
                 }else {
-                    VirusViewModel.shared.like(communityRecommendDataModel: communityRecommendDataModel, y: y, tableView: tableView)
+                    VirusViewModel.shared.like(communityRecommendDataModel: communityRecommendDataModel, y: y, tableView: (self?.tableView)!)
                     
                 }
             }
@@ -414,12 +427,13 @@ extension CommunityFeaturedTopicsViewController : UITableViewDelegate,UITableVie
         case 3:
             let cell = CardContentActionTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
             cell.communityRecommendDataModel = communityRecommendDataModel
-            cell.praiseClosureName = { (button:UIButton)  in
-                VirusViewModel.shared.praise(communityRecommendDataModel: communityRecommendDataModel, tableView: tableView)
+            cell.praiseClosureName = {
+                 [weak self] (button:UIButton)  in
+                VirusViewModel.shared.praise(communityRecommendDataModel: communityRecommendDataModel, tableView: (self?.tableView)!)
             }
             cell.collectClosureName = {
-                (button:UIButton) in
-                VirusViewModel.shared.collection(communityRecommendDataModel: communityRecommendDataModel, tableView: tableView)
+                [weak self] (button:UIButton) in
+                VirusViewModel.shared.collection(communityRecommendDataModel: communityRecommendDataModel, tableView: (self?.tableView)!)
             }
 
             return cell

+ 6 - 6
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFindFriends/ViewController/CommunityFindFriendsViewController.swift

@@ -136,15 +136,15 @@ extension CommunityFindFriendsViewController: UITableViewDataSource, UITableView
         let cell = SearchUserLitTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
         cell.cmsMemberModel = self.cmsMemberModels[indexPath.row]
         cell.followButtonClosure = {
-            [weak self] in
-            if cell.cmsMemberModel?.followStatus == 0 { //加关注
-                self?.userFollow(followUid: cell.cmsMemberModel?.uid ?? 0, completion: { (isFollow) -> Void in
-                    cell.cmsMemberModel?.followStatus = isFollow
+            [weak self,weak cell] in
+            if cell?.cmsMemberModel?.followStatus == 0 { //加关注
+                self?.userFollow(followUid: cell?.cmsMemberModel?.uid ?? 0, completion: { [weak self,weak cell] (isFollow) -> Void in
+                    cell?.cmsMemberModel?.followStatus = isFollow
                     self?.tableView.reloadData()
                 })
             }else { //取消关注
-                self?.userCancelFollow(followUid: cell.cmsMemberModel?.uid ?? 0, completion: { (isFollow) -> Void in
-                    cell.cmsMemberModel?.followStatus = isFollow
+                self?.userCancelFollow(followUid: cell?.cmsMemberModel?.uid ?? 0, completion: { [weak self,weak cell] (isFollow) -> Void in
+                    cell?.cmsMemberModel?.followStatus = isFollow
                     self?.tableView.reloadData()
                 })
             }

+ 9 - 5
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/Controller/CommunityRecommendController.swift

@@ -44,9 +44,6 @@ class CommunityRecommendController: BaseViewController {
     /// 最后滚动的位置
     var lastContentOffset : CGFloat = 0
     
-    var emptyView : DIYEmptyView?
-
-    
     override func viewDidLoad() {
         super.viewDidLoad()
         setupViews()
@@ -130,7 +127,6 @@ class CommunityRecommendController: BaseViewController {
     }()
     
     lazy var tableView: UITableView = {
-        [unowned self] in
         let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
         tableView.separatorStyle = .none
         tableView.backgroundColor = kf7f8faColor
@@ -401,7 +397,15 @@ extension CommunityRecommendController {
             self?.tableView.reloadData()
             self?.readVirueRecordAddApi()
         }) { [weak self] loadingStatus in
-            MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)
+            if loadingStatus == .noData {
+                DIYEmptyView.emptyNoDataActionTableView(tableView: self?.tableView, imageStr: .three, detailStr: .three, btnTitleStr: .two, btnClickBlock: {
+                    [weak self] in
+                    self?.tabBarController?.selectedIndex = 0
+                    self?.navigationController?.popToRootViewController(animated: true)
+                })
+            }else {
+                MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)
+            }
 
         }
     }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/RecommendNoneCommentCell.swift

@@ -140,7 +140,7 @@ class RecommendNoneCommentCell: UITableViewCell {
     
     private lazy var commentBtn: UIButton = {
         let commentBtn = UIButton(type: UIButton.ButtonType.custom)
-        commentBtn.backgroundColor = k62CC74Color
+        commentBtn.backgroundColor = kThemeColor
         commentBtn.setTitle("我要留言", for: .normal)
         commentBtn.setTitleColor(kffffffColor, for: .normal)
         commentBtn.titleLabel?.font = kRegularFont14

+ 15 - 11
RainbowPlanet/RainbowPlanet/Modules/MineModule/ModifyData/ViewController/ModifyDataViewController.swift

@@ -43,21 +43,12 @@ class ModifyDataViewController: BaseViewController {
             [weak self] in
             self?.userMemberDetailUpDateApi()
         }
-    }
-    
-    lazy var modifyDataAvatarView: ModifyDataAvatarView = {
-        let modifyDataAvatarView = ModifyDataAvatarView(frame: CGRect(x: 0, y: 10+kNavBarTotalHeight, width: kScreenWidth, height: 148))
-        modifyDataAvatarView.userDetailModel = userDetailModel
+        
         modifyDataAvatarView.imageUrlClosureName = {
             [weak self] avatar in
             self?.avatar = avatar
         }
-        return modifyDataAvatarView
-    }()
-    
-    lazy var modifyDataNickNameSignView: ModifyDataNickNameSignView = {
-        let modifyDataNickNameSignView = ModifyDataNickNameSignView(frame: CGRect(x: 0, y: 10+148+10+kNavBarTotalHeight, width: kScreenWidth, height: 112))
-        modifyDataNickNameSignView.userDetailModel = userDetailModel
+        
         modifyDataNickNameSignView.nickNameClosureName = {
             [weak self] userName in
             self?.userName = userName
@@ -66,6 +57,19 @@ class ModifyDataViewController: BaseViewController {
             [weak self] signature in
             self?.signature = signature
         }
+    }
+    
+    lazy var modifyDataAvatarView: ModifyDataAvatarView = {
+        let modifyDataAvatarView = ModifyDataAvatarView(frame: CGRect(x: 0, y: 10+kNavBarTotalHeight, width: kScreenWidth, height: 148))
+        modifyDataAvatarView.userDetailModel = userDetailModel
+       
+        return modifyDataAvatarView
+    }()
+    
+    lazy var modifyDataNickNameSignView: ModifyDataNickNameSignView = {
+        let modifyDataNickNameSignView = ModifyDataNickNameSignView(frame: CGRect(x: 0, y: 10+148+10+kNavBarTotalHeight, width: kScreenWidth, height: 112))
+        modifyDataNickNameSignView.userDetailModel = userDetailModel
+        
         return modifyDataNickNameSignView
     }()
 

+ 9 - 3
RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/ViewController/MyFollowAndFanViewController.swift

@@ -95,6 +95,7 @@ extension MyFollowAndFanViewController {
             userFollows(page: page)
             
         }else if myfollowAndFanType == .fan {
+            self.tableView.tableHeaderView = fanHeaderView
             userFans(page: page)
         }
     }
@@ -112,6 +113,9 @@ extension MyFollowAndFanViewController {
                 self?.tableView.resetNoMoreData()
             }
             self?.userFollowModels = (self?.userFollowModels)! + (userFollowsModel?.data!)!
+            if !(self?.userFanModels.isEmpty ?? true) {
+                self?.tableView.tableHeaderView = self?.followHeaderView
+            }
             self?.tableView.reloadData()
             MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination:userFollowsModel?.pagination)
 
@@ -145,12 +149,14 @@ extension MyFollowAndFanViewController {
                 
             }
             self?.userFanModels = (self?.userFanModels)! + (userFansModel?.data!)!
+            if !(self?.userFanModels.isEmpty ?? true) {
+                self?.tableView.tableHeaderView = self?.followHeaderView
+            }
             self?.tableView.reloadData()
             MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: userFansModel?.pagination)
         }, fail: {
             [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)
-
             
         })
     }
@@ -252,11 +258,11 @@ extension MyFollowAndFanViewController: UITableViewDataSource, UITableViewDelega
     }
     
     func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
-        return 0
+        return 0.000001
     }
     
     func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
-        return 0
+        return 0.000001
     }
     
     func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/Set/View/SetView.swift

@@ -20,7 +20,7 @@ class SetView: BaseView {
     typealias DidSelectRowClosure = (_ indexPath: IndexPath) -> Void
     var didSelectRowClosure : DidSelectRowClosure?
     
-    let sections = [["账号与绑定","推送通知设置"],
+    let sections = [["账号与绑定"],
                     ["用户协议","为由你APP评分","投诉与建议","分享由你APP","版本号"],
                     ["退出登录"]]
     

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/Set/ViewController/SetViewController.swift

@@ -40,7 +40,7 @@ class SetViewController: BaseViewController {
                 // 帐号绑定
                 case 0:
 
-                   Mediator.present(MineRouterModuleType.pushAccountSecurity)
+                   Mediator.push(MineRouterModuleType.pushAccountSecurity)
 
                     break
                 default:

+ 3 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCoverPick/View/AliyunCoverPickView.m

@@ -46,12 +46,15 @@
              initWithFrame:CGRectMake(0, 0, ScreenWidth-28,
                                       CGRectGetHeight(self.frame))
       collectionViewLayout:followLayout];
+    _collectionView.layer.cornerRadius = 4;
+    _collectionView.layer.masksToBounds = YES;
     _collectionView.dataSource = (id<UICollectionViewDataSource>)self;
     [_collectionView registerClass:[UICollectionViewCell class]
       forCellWithReuseIdentifier:@"cell"];
     [self addSubview:_collectionView];
     UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth-28, CGRectGetHeight(self.frame))];
     view.backgroundColor = [UIColor clearColor];
+
     [self addSubview:view];
     
     _progressView = [[UIView alloc] init];

+ 0 - 14
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/Controller/PublishEditController.swift

@@ -298,23 +298,9 @@ extension PublishEditController {
             aliyunVodUpToYoPublishModel.images = self.imageArr
         }
         
-        
-        
-        
         NotificationCenter.default.post(name: NSNotification.Name(rawValue: "DismissFromPublishEditVc"), object: aliyunVodUpToYoPublishModel)
         BaseTabbarViewController.shared.esTabBarController.selectedIndex = 0
         self.dismissToWindowRootViewController(animated: false, completion: nil)
-//
-//
-//
-//        PublishUploadManager.shared().setPublishParas(self.selTopicIdArr, self.pubTitle, self.pubContent, self.locationStr)
-//
-//        if self.mediaType == .video {
-//            PublishUploadManager.shared().setVideoPath(self.mediaType, self.videoPath, self.coverImagePath, self.videoImage!)
-//        }
-//        if self.mediaType == .image {
-//            self.writePhotosToFileAndSetPath()
-//        }
 
 
     }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/View/PublishEditTitleCell.swift

@@ -74,7 +74,7 @@ class PublishEditTitleCell: UITableViewCell {
         editTextField.font = kRegularFont14
         editTextField.tintColor = kEnabledButtonColor
         editTextField.clearButtonMode = .whileEditing
-        editTextField.attributedPlaceholder = NSAttributedString.init(string:"标题好,能收获更多U米哦", attributes: [NSAttributedString.Key.font:kRegularFont14 as Any, NSAttributedString.Key.foregroundColor:kDDDDDDColor])
+        editTextField.attributedPlaceholder = NSAttributedString.init(string:"标题好,能收获更多U米哦(标题最多20字)", attributes: [NSAttributedString.Key.font:kRegularFont14 as Any, NSAttributedString.Key.foregroundColor:kDDDDDDColor])
         editTextField.delegate = self
         return editTextField
     }()

+ 4 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMediaPicker/Controller/KSMediaPickerController.swift

@@ -25,6 +25,10 @@ import JXSegmentedView
 
 open class KSMediaPickerController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource {
     
+    deinit {
+        NXLLog("deinit")
+    }
+    
     typealias DismissClosure = () -> Void
     var dismissClosure: DismissClosure?
     

+ 3 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMediaPicker/View/KSMediaPickerPreviewView.swift

@@ -6,6 +6,7 @@
 //
 
 import UIKit
+import Kingfisher
 
 extension KSMediaPickerPreviewView {
     
@@ -364,6 +365,8 @@ open class KSMediaPickerPreviewView: UIView {
                 _scrollview.imageView.image = itemModel.original
                 PHImageManager.default().requestImage(for: asset, targetSize: mainSize, contentMode: .aspectFit, options: KSMediaPickerItemModel.pictureOptions) {[weak self] (image, info) in
                     self?._scrollview.imageView.image = image
+                    KingfisherManager.shared.cache.clearMemoryCache()
+
                 }
             }
         }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMediaPicker/View/KSMediaPickerViewImageCell.swift

@@ -97,14 +97,14 @@ open class KSMediaPickerViewImageCell: UICollectionViewCell {
             let thumb = itemModel.thumb
             let original = itemModel.original
             if thumb == nil {
-                PHImageManager.default().requestImage(for: itemModel.asset, targetSize: KSMediaPickerItemModel.thumbSize, contentMode:.aspectFit , options: KSMediaPickerItemModel.pictureViewerOptions) {[weak self] (image, info) in
+                PHCachingImageManager.default().requestImage(for: itemModel.asset, targetSize: KSMediaPickerItemModel.thumbSize, contentMode:.aspectFit , options: KSMediaPickerItemModel.pictureViewerOptions) {[weak self] (image, info) in
                     self?._updateThumb(image)
                 }
             } else {
                 imageView.image = thumb
             }
             if original == nil {
-                PHImageManager.default().requestImage(for: itemModel.asset, targetSize: KSMediaPickerItemModel.originalSize, contentMode:.aspectFit , options: KSMediaPickerItemModel.pictureViewerOptions) {[weak self] (image, info) in
+                PHCachingImageManager.default().requestImage(for: itemModel.asset, targetSize: KSMediaPickerItemModel.originalSize, contentMode:.aspectFit , options: KSMediaPickerItemModel.pictureViewerOptions) {[weak self] (image, info) in
                     self?.itemModel.original = image
                 }
             }

+ 0 - 33
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishAgreementController.swift

@@ -1,33 +0,0 @@
-//
-//  PublishAgreementController.swift
-//  RainbowPlanet
-//
-//  Created by Christopher on 2019/7/19.
-//  Copyright © 2019 RainbowPlanet. All rights reserved.
-//
-
-import UIKit
-
-class PublishAgreementController: BaseViewController {
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        setupViews()
-        setupLayouts()
-    }
-    
-    override func setupViews() {
-        statusBarStyle = .lightContent
-        view.backgroundColor = UIColor.black
-        navigationBar.barBackgroundColor = UIColor.black
-        navigationBar.title = "内容授权协议"
-        navigationBar.titleLabelColor = kffffffColor
-        navigationBar.wr_setLeftButton(image: kImage(name: "navbar_back_white")!)
-        
-    }
-    
-    override func setupLayouts() {
-        
-    }
-    
-}

+ 7 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishMusicChooseView.swift

@@ -119,6 +119,13 @@ class PublishMusicChooseView: BaseView {
     func setupSegmentedView() {
         addSubview(segmentedView)
         addSubview(listContainerView)
+        listContainerView.snp.makeConstraints { (make) in
+            make.top.equalTo(48+44)
+            make.left.right.equalToSuperview()
+            make.bottom.equalTo(recommendButton.snp.top).offset(-20)
+        }
+//        listContainerView.frame = CGRect(x: 0, y: 48+44, width: kScreenWidth, height: kScreenHeight - kSafeTabBarHeight - kSafeStatusBarHeight - 103 - 114)
+
     }
     
     // MARK: - 视图创建
@@ -241,7 +248,6 @@ class PublishMusicChooseView: BaseView {
         let listContainerView = JXSegmentedListContainerView(dataSource: self)
         listContainerView.didAppearPercent = 0.01
         listContainerView.defaultSelectedIndex = 0
-        listContainerView.frame = CGRect(x: 0, y: 48+44, width: kScreenWidth, height: kScreenHeight - kSafeTabBarHeight - kSafeStatusBarHeight - 103 - 114)
         return listContainerView
     }()
 }

+ 6 - 6
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishMusicListCell.swift

@@ -16,6 +16,12 @@ class PublishMusicListCell: UITableViewCell {
         didSet {
             titleLabel.text = self.musicItemMdl?.name
             
+            // 不选择音乐
+            if self.musicItemMdl?.id == -1 {
+                iconImageView.isHidden = true
+                curPlayImageView.isHidden = true
+                useButton.isHidden = true
+            }
             if self.musicItemMdl?.isPlaying == true {
                 iconImageView.image = kImage(name: "music_btn_pause")
                 useButton.isHidden = false
@@ -24,12 +30,6 @@ class PublishMusicListCell: UITableViewCell {
                 useButton.isHidden = true
             }
             
-            // 不选择音乐
-            if self.musicItemMdl?.id == -1 {
-                iconImageView.isHidden = true
-                curPlayImageView.isHidden = true
-                useButton.isHidden = true
-            }
         }
     }
     

+ 0 - 18
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishMusicVolumnView.swift

@@ -48,7 +48,6 @@ class PublishMusicVolumnView: FWPopupView {
         
         configRectCorner(corner: [.topLeft,.topRight], radii: CGSize(width: 8, height: 8))
         
-        addSubview(cancelButton)
         addSubview(applyButton)
         
         addSubview(originLabel)
@@ -63,11 +62,6 @@ class PublishMusicVolumnView: FWPopupView {
     
     func setupLayouts() {
         
-        cancelButton.snp.makeConstraints { (make) in
-            make.top.equalTo(2)
-            make.left.equalTo(3)
-            make.size.equalTo(44)
-        }
         applyButton.snp.makeConstraints { (make) in
             make.top.equalTo(2)
             make.right.equalTo(-3)
@@ -119,12 +113,6 @@ class PublishMusicVolumnView: FWPopupView {
         }
     }
     
-    lazy var cancelButton: UIButton = {
-        let cancelButton = UIButton(type: UIButton.ButtonType.custom)
-        cancelButton.setImage(kImage(name: "video_btn_close_white"), for: .normal)
-        return cancelButton
-    }()
-    
     lazy var applyButton: UIButton = {
         let applyButton = UIButton(type: UIButton.ButtonType.custom)
         applyButton.setImage(kImage(name: "nav_finish_white"), for: .normal)
@@ -240,12 +228,6 @@ class PublishMusicVolumnView: FWPopupView {
         view.vProperty = vProperty
         view.show()
         
-        view.cancelButton.rx.tap.subscribe(onNext: { (data) in
-            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "EditCloseChooseVolumnNoti"), object: "1")
-            view.hide()
-            
-        }).disposed(by: view.disposeBag)
-        
         view.applyButton.rx.tap.subscribe(onNext: {(data) in
             var paraDic = Dictionary<String, Any>()
             paraDic.updateValue(view.originVolumn!, forKey: "origin")

+ 4 - 6
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishRecommendMusicController.swift

@@ -8,6 +8,7 @@
 
 import UIKit
 import IQKeyboardManagerSwift
+import SwiftyMediator
 
 class PublishRecommendMusicController: BaseViewController {
     
@@ -30,9 +31,7 @@ class PublishRecommendMusicController: BaseViewController {
         navigationBar.wr_setRightButton(title: "提交", titleColor: kffffffColor)
         navigationBar.rightButton.titleLabel!.font = kRegularFont14
         navigationBar.onClickRightButton = {
-            [weak self] in
-            print("----点击了-提交")
-            
+            [weak self] in            
             let name = self?.nameTextView.text
             let url  = self?.linkTextView.text
             
@@ -147,9 +146,8 @@ class PublishRecommendMusicController: BaseViewController {
         recommendButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
         recommendButton.titleLabel?.font = kMediumFont12
         recommendButton.rx.tap.subscribe(onNext: {
-            [weak self] (data) in            
-            let vc = PublishAgreementController()            
-            self?.navigationController?.pushViewController(vc, animated: true)
+            [weak self] (data) in
+            Mediator.push(H5RouterModuleType.pushContentId7)
         }).disposed(by: disposeBag)
         return recommendButton
     }()

+ 6 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMusicAbout/PublishRecordMusicView.swift

@@ -84,6 +84,12 @@ class PublishRecordMusicView: BaseView {
     func setupSegmentedView() {
         addSubview(segmentedView)
         addSubview(listContainerView)
+        listContainerView.snp.makeConstraints { (make) in
+            make.top.equalTo(48+44)
+            make.left.right.equalToSuperview()
+            make.bottom.equalTo(recommendButton.snp.top).offset(-20)
+        }
+
     }
     
     // MARK: - 视图创建
@@ -169,7 +175,6 @@ class PublishRecordMusicView: BaseView {
         let listContainerView = JXSegmentedListContainerView(dataSource: self)
         listContainerView.didAppearPercent = 0.01
         listContainerView.defaultSelectedIndex = 0
-        listContainerView.frame = CGRect(x: 0, y: 48+44, width: kScreenWidth, height: kScreenHeight - kSafeTabBarHeight - kSafeStatusBarHeight - 55 - 114)
         return listContainerView
     }()
 }

+ 3 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishViewController.swift

@@ -11,6 +11,9 @@ import JXSegmentedView
 
 class PublishViewController: BaseViewController {
     
+    deinit {
+        NXLLog("deinit")
+    }
     
     // 视频选择页参数配置类
     var mediaConfig: AliyunMediaConfig {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/RedemptionArea/View/Banner/RedemptionAreaBannerCollectionViewCell.swift

@@ -18,7 +18,7 @@ class RedemptionAreaBannerCollectionViewCell: UICollectionViewCell {
     }
     let images = ["exchange_ico_cheats","exchange_ico_detail","exchange_ico_indent"]
     
-    let titles = ["赚豆攻略","赚豆明细","我的订单"]
+    let titles = ["收米攻略","U米明细","我的订单"]
     //MARK: - indexPath
     var indexPath: IndexPath?{
         didSet {

+ 3 - 3
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchUser/View/SearchUserLitTableViewCell.swift

@@ -169,7 +169,7 @@ class SearchUserLitTableViewCell: UITableViewCell {
     
     var userFanModel: UserFanModel? {
         didSet {
-            CommunityFollowUserViewModel.setFollowType(followButton: followButton, followType: FollowType(rawValue: userFanModel?.isFollowStatus ?? 0))
+            CommunityFollowUserViewModel.setFollowListType(followButton: followButton, followType: FollowType(rawValue: userFanModel?.isFollowStatus ?? 0))
 
             avatarButton.kf.setImage(with: kURLThumbnailsImage(name: userFanModel?.fanAvatar ?? "",size: kSize44x44Image), for: UIControl.State.normal, placeholder: kImage(name: "default_avatar"))
             ImageCache.default.clearMemoryCache()
@@ -193,7 +193,7 @@ class SearchUserLitTableViewCell: UITableViewCell {
     
     var cmsMemberModel: CMSMemberModel? {
         didSet {
-            CommunityFollowUserViewModel.setFollowType(followButton: followButton, followType: FollowType(rawValue: cmsMemberModel?.followStatus ?? 0))
+            CommunityFollowUserViewModel.setFollowListType(followButton: followButton, followType: FollowType(rawValue: cmsMemberModel?.followStatus ?? 0))
 
             avatarButton.kf.setImage(with: kURLThumbnailsImage(name: cmsMemberModel?.avatar ?? "",size: kSize44x44Image), for: UIControl.State.normal, placeholder: kImage(name: "default_avatar"))
             ImageCache.default.clearMemoryCache()
@@ -218,7 +218,7 @@ class SearchUserLitTableViewCell: UITableViewCell {
     
     var searchMemberModel: SearchMemberModel? {
         didSet {
-            CommunityFollowUserViewModel.setFollowType(followButton: followButton, followType: FollowType(rawValue: searchMemberModel?.followStatus ?? 0))
+            CommunityFollowUserViewModel.setFollowListType(followButton: followButton, followType: FollowType(rawValue: searchMemberModel?.followStatus ?? 0))
 
             avatarButton.kf.setImage(with: kURLThumbnailsImage(name: searchMemberModel?.avatar ?? "",size: kSize40x40Image), for: UIControl.State.normal, placeholder: kImage(name: "default_avatar"))
             ImageCache.default.clearMemoryCache()

+ 1 - 1
RainbowPlanet/RainbowPlanet/Router/H5RouterModuleType.swift

@@ -58,7 +58,7 @@ extension H5RouterModuleType: MediatorSourceType {
             let vc = H5CommonViewController()
             vc.URLString = kH5ContentId6Url
             return vc
-        case .pushContentId7: //赚豆秘籍
+        case .pushContentId7: //内容协议
             let vc = H5CommonViewController()
             vc.URLString = kH5ContentId7Url
             return vc

+ 19 - 19
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift

@@ -211,25 +211,25 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
                 self?.userBindTripartiteApi(loginType:loginType, mobile: UserModel.shared().getModel()?.mobile ?? "", umLoginModel: umLoginModel, completion: completion)
                 
             }else if rootModel.code == 1 {
-                
-                var nameStr : String = "微信"
-                if loginType == .weixin {
-                    nameStr = "微信"
-                }else if loginType == .qq {
-                    nameStr = "QQ"
-                }
-                
-                AlertSheetView.alert(title: rootModel.msg ?? "此\(nameStr)号被其他账号绑定,是否要将此\(nameStr)号绑定至本账号,并解绑另一起账号?", cancelTitle: "取消", sureTitle: "确认", cancelBlock: { (popupView, index, string) in
-                    
-                }, confirmBlock: { (popupView, index, string) in
-                    AlertSheetView.alert(title: "确认后,原账号将无法以此\(nameStr)登录,请确保原账号有其他登录方式,否则原账号将无法登录", cancelTitle: "取消", sureTitle: "确认", cancelBlock: { (popupView, index, string) in
-                        
-                    }, confirmBlock: {
-                        [weak self] (popupView, index, string) in
-                        self?.userBindTripartiteApi(loginType:loginType,mobile: UserModel.shared().getModel()?.mobile ?? "", umLoginModel: umLoginModel, completion: completion)
-                        
-                    })
-                })
+//                var nameStr : String = "微信"
+//                if loginType == .weixin {
+//                    nameStr = "微信"
+//                }else if loginType == .qq {
+//                    nameStr = "QQ"
+//                }
+//
+//                AlertSheetView.alert(title: rootModel.msg ?? "此\(nameStr)号被其他账号绑定,是否要将此\(nameStr)号绑定至本账号,并解绑另一起账号?", cancelTitle: "取消", sureTitle: "确认", cancelBlock: { (popupView, index, string) in
+//
+//                }, confirmBlock: { (popupView, index, string) in
+//                    AlertSheetView.alert(title: "确认后,原账号将无法以此\(nameStr)登录,请确保原账号有其他登录方式,否则原账号将无法登录", cancelTitle: "取消", sureTitle: "确认", cancelBlock: { (popupView, index, string) in
+//
+//                    }, confirmBlock: {
+//                        [weak self] (popupView, index, string) in
+//                        self?.userBindTripartiteApi(loginType:loginType,mobile: UserModel.shared().getModel()?.mobile ?? "", umLoginModel: umLoginModel, completion: completion)
+//
+//                    })
+//                })
+                SwiftProgressHUD.shared().showText(rootModel.msg ?? "信息有误")
             }else {
                 SwiftProgressHUD.shared().showText(rootModel.msg ?? "信息有误")
             }

二進制
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/ico_bean_org.imageset/ico_bean_org@2x.png


二進制
RainbowPlanet/RainbowPlanet/Supporting Files/CommunityModule.xcassets/ico_bean_org.imageset/ico_bean_org@3x.png


+ 11 - 51
RainbowPlanet/RainbowPlanet/Supporting Files/Info.plist

@@ -18,63 +18,13 @@
 		<string>zh</string>
 	</array>
 	<key>CFBundleName</key>
-	<string>$(PRODUCT_NAME)</string>
+	<string>由你</string>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
 	<string>1.0.0</string>
 	<key>CFBundleURLTypes</key>
 	<array>
-		<dict>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-			<key>CFBundleURLName</key>
-			<string>weibochxq</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>wb4123861024</string>
-			</array>
-		</dict>
-		<dict>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-			<key>CFBundleURLName</key>
-			<string>tencentchxq</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>tencent101565722</string>
-			</array>
-		</dict>
-		<dict>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-			<key>CFBundleURLName</key>
-			<string>QQchxq</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>QQ060dc51a</string>
-			</array>
-		</dict>
-		<dict>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-			<key>CFBundleURLName</key>
-			<string>weixinchxq</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>wx163e76382d53654b</string>
-			</array>
-		</dict>
-		<dict>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-			<key>CFBundleURLName</key>
-			<string>chxq</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>rainbowplanet</string>
-			</array>
-		</dict>
 		<dict>
 			<key>CFBundleTypeRole</key>
 			<string>Editor</string>
@@ -125,6 +75,16 @@
 				<string>uptoyo</string>
 			</array>
 		</dict>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLName</key>
+			<string>chxq</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>rainbowplanet</string>
+			</array>
+		</dict>
 	</array>
 	<key>CFBundleVersion</key>
 	<string>1</string>

+ 45 - 14
RainbowPlanet/RainbowPlanet/Tools/PhotoAndCameraManager/PhotoAndCameraManager.swift

@@ -27,15 +27,21 @@ class PhotoAndCameraManager: NSObject {
     /// 相册
     func authorizePhoto() {
 
-        LBXPermissions.authorizePhotoWith {
-            [weak self] (granted) in
-            guard let strongSelf = self else { return }
-
+        weak var weakself = self
+        LBXPermissions.authorizePhotoWith { (granted) in
             if granted {
                 let picker = UIImagePickerController()
                 picker.sourceType = UIImagePickerController.SourceType.photoLibrary
-                picker.delegate = strongSelf
-                picker.allowsEditing = strongSelf.isEditedImage
+                picker.delegate = weakself
+                picker.allowsEditing = weakself?.isEditedImage ?? true
+                picker.navigationController?.navigationBar.isTranslucent = false
+                if #available(iOS 11.0, *) {
+                    UIScrollView.appearance().contentInsetAdjustmentBehavior = .automatic
+                } else {
+                    if self.responds(to: #selector(setter: picker.automaticallyAdjustsScrollViewInsets)) {
+                        picker.automaticallyAdjustsScrollViewInsets = true
+                    }
+                }
                 getCurrentVC()?.present(picker, animated: true, completion: nil)
             } else {
                 LBXPermissions.jumpToSystemPrivacySetting()
@@ -46,14 +52,21 @@ class PhotoAndCameraManager: NSObject {
 
     /// 相机
     func authorizeCamera() {
-        LBXPermissions.authorizeCameraWith {
-            [weak self] (granted) in
-            guard let strongSelf = self else { return }
+        weak var weakself = self
+        LBXPermissions.authorizeCameraWith { (granted) in
             if granted {
                 let picker = UIImagePickerController()
                 picker.sourceType = UIImagePickerController.SourceType.camera
-                picker.delegate = strongSelf;
-                picker.allowsEditing = strongSelf.isEditedImage
+                picker.delegate = weakself
+                picker.allowsEditing = weakself?.isEditedImage ?? true
+                picker.navigationController?.navigationBar.isTranslucent = false
+                if #available(iOS 11.0, *) {
+                    UIScrollView.appearance().contentInsetAdjustmentBehavior = .automatic
+                } else {
+                    if self.responds(to: #selector(setter: picker.automaticallyAdjustsScrollViewInsets)) {
+                        picker.automaticallyAdjustsScrollViewInsets = true
+                    }
+                }
                 getCurrentVC()?.present(picker, animated: true, completion: nil)
             } else {
                 LBXPermissions.jumpToSystemPrivacySetting()
@@ -64,6 +77,13 @@ class PhotoAndCameraManager: NSObject {
 
 extension PhotoAndCameraManager : UIImagePickerControllerDelegate,UINavigationControllerDelegate {
     func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
+        if #available(iOS 11.0, *) {
+            UIScrollView.appearance().contentInsetAdjustmentBehavior = .never
+        } else {
+            if self.responds(to: #selector(setter: picker.automaticallyAdjustsScrollViewInsets)) {
+                picker.automaticallyAdjustsScrollViewInsets = false
+            }
+        }
         //查看info对象
         //显示的图片
         var image : UIImage? = info[.editedImage] as? UIImage
@@ -83,10 +103,21 @@ extension PhotoAndCameraManager : UIImagePickerControllerDelegate,UINavigationCo
 
         //图片控制器退出
         picker.dismiss(animated: true, completion: {
-            () -> Void in
-            if self.photoAndCameraManagerImageBlock != nil {
-                self.photoAndCameraManagerImageBlock!(image!)
+            [weak self] () -> Void in
+            if self?.photoAndCameraManagerImageBlock != nil {
+                self?.photoAndCameraManagerImageBlock!(image!)
             }
         })
     }
+    
+    func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
+        if #available(iOS 11.0, *) {
+            UIScrollView.appearance().contentInsetAdjustmentBehavior = .never
+        } else {
+            if self.responds(to: #selector(setter: picker.automaticallyAdjustsScrollViewInsets)) {
+                picker.automaticallyAdjustsScrollViewInsets = false
+            }
+        }
+    }
+    
 }

+ 27 - 0
RainbowPlanet/RainbowPlanet/ViewModel/Community/CommunityFollowUserViewModel.swift

@@ -65,6 +65,33 @@ class CommunityFollowUserViewModel: NSObject {
         }
     }
     
+    /// 设置feed关注
+    ///
+    /// - Parameters:
+    ///   - followButton: 关注button
+    ///   - followType: 关注类型
+    class func setFollowListType(followButton:UIButton? = nil,followType: FollowType? = nil) {
+        switch followType {
+        case .futureFollow?:
+            followButton?.setTitle("关注", for: UIControl.State.normal)
+            followButton?.setTitleColor(kffffffColor, for: UIControl.State.normal)
+            followButton?.setBackgroundImage(UIImage.imageWithColor(color: kThemeColor), for: UIControl.State.normal)
+            break
+        case .alreadyFollow?:
+            followButton?.setTitle("已关注", for: UIControl.State.normal)
+            followButton?.setTitleColor(kThemeColor, for: UIControl.State.normal)
+            followButton?.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+            break
+        case .mutualFollow?:
+            followButton?.setTitle("已互关", for: UIControl.State.normal)
+            followButton?.setTitleColor(kThemeColor, for: UIControl.State.normal)
+            followButton?.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+            break
+        default:
+            break
+        }
+    }
+    
     
     
     /// 设置推荐关注