南鑫林 5 роки тому
батько
коміт
e49f8b7b2a
15 змінених файлів з 151 додано та 81 видалено
  1. 8 4
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 0 21
      RainbowPlanet/RainbowPlanet/Macro/HTMLURLMacro.swift
  3. 1 0
      RainbowPlanet/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h
  4. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Planet/CommunityPlanet/CommunityPlanetViewController.swift
  5. 6 14
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFindFriends/ViewController/CommunityFindFriendsViewController.swift
  6. 37 14
      RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/ViewController/MyFollowAndFanViewController.swift
  7. 2 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherHeaderView.swift
  8. 11 2
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/View/RainbowBeanPhysical/RainbowBeanPhysicalView.swift
  9. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/Set/ViewController/SetViewController.swift
  10. 1 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/AliyunPathManager.m
  11. 1 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/PublishVideoView.swift
  12. 26 0
      RainbowPlanet/RainbowPlanet/Service/Model/UserModel/FollowStatusModel.swift
  13. 4 21
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift
  14. 22 2
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift
  15. 30 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/SwiftMoyaNetWorkH5Manager.swift

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

@@ -126,7 +126,6 @@
 		A72A72C622321DE000B21995 /* WebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72A122321DE000B21995 /* WebView.swift */; };
 		A72A72CF22321E2700B21995 /* NotificationCenterMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72C722321E2500B21995 /* NotificationCenterMacro.swift */; };
 		A72A72D022321E2700B21995 /* FontMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72C822321E2500B21995 /* FontMacro.swift */; };
-		A72A72D122321E2700B21995 /* HTMLURLMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72C922321E2600B21995 /* HTMLURLMacro.swift */; };
 		A72A72D222321E2700B21995 /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72CA22321E2600B21995 /* Common.swift */; };
 		A72A72D522321E2700B21995 /* ColorMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72A72CD22321E2600B21995 /* ColorMacro.swift */; };
 		A72A72F022321E8800B21995 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A72A72EF22321E8800B21995 /* CoreMotion.framework */; };
@@ -168,6 +167,8 @@
 		A75414FD224B5F28002480B5 /* MobileLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75414FB224B5F28002480B5 /* MobileLoginViewController.swift */; };
 		A7541502224C5ECB002480B5 /* BaiduMapManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7541501224C5ECA002480B5 /* BaiduMapManager.swift */; };
 		A754150F224CACF9002480B5 /* SwiftSign.swift in Sources */ = {isa = PBXBuildFile; fileRef = A754150B224CACF9002480B5 /* SwiftSign.swift */; };
+		A757849D22C1CBF400D4DB61 /* SwiftMoyaNetWorkH5Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A757849C22C1CBF400D4DB61 /* SwiftMoyaNetWorkH5Manager.swift */; };
+		A757849F22C1CEA900D4DB61 /* FollowStatusModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A757849E22C1CEA900D4DB61 /* FollowStatusModel.swift */; };
 		A757C92E22744ACE00226355 /* AddressManagerListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A757C92D22744ACE00226355 /* AddressManagerListModel.swift */; };
 		A757C9302274839900226355 /* SelfMentionAddressListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A757C92F2274839900226355 /* SelfMentionAddressListModel.swift */; };
 		A757C9342274882E00226355 /* UIScrollView+MJRefreshEX.m in Sources */ = {isa = PBXBuildFile; fileRef = A757C9322274882E00226355 /* UIScrollView+MJRefreshEX.m */; };
@@ -685,7 +686,6 @@
 		A72A72A122321DE000B21995 /* WebView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebView.swift; sourceTree = "<group>"; };
 		A72A72C722321E2500B21995 /* NotificationCenterMacro.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationCenterMacro.swift; sourceTree = "<group>"; };
 		A72A72C822321E2500B21995 /* FontMacro.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FontMacro.swift; sourceTree = "<group>"; };
-		A72A72C922321E2600B21995 /* HTMLURLMacro.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTMLURLMacro.swift; sourceTree = "<group>"; };
 		A72A72CA22321E2600B21995 /* Common.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = "<group>"; };
 		A72A72CD22321E2600B21995 /* ColorMacro.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorMacro.swift; sourceTree = "<group>"; };
 		A72A72EF22321E8800B21995 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
@@ -729,6 +729,8 @@
 		A75414FB224B5F28002480B5 /* MobileLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MobileLoginViewController.swift; sourceTree = "<group>"; };
 		A7541501224C5ECA002480B5 /* BaiduMapManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaiduMapManager.swift; sourceTree = "<group>"; };
 		A754150B224CACF9002480B5 /* SwiftSign.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftSign.swift; sourceTree = "<group>"; };
+		A757849C22C1CBF400D4DB61 /* SwiftMoyaNetWorkH5Manager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftMoyaNetWorkH5Manager.swift; sourceTree = "<group>"; };
+		A757849E22C1CEA900D4DB61 /* FollowStatusModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FollowStatusModel.swift; sourceTree = "<group>"; };
 		A757C92D22744ACE00226355 /* AddressManagerListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddressManagerListModel.swift; sourceTree = "<group>"; };
 		A757C92F2274839900226355 /* SelfMentionAddressListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelfMentionAddressListModel.swift; sourceTree = "<group>"; };
 		A757C9322274882E00226355 /* UIScrollView+MJRefreshEX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+MJRefreshEX.m"; sourceTree = "<group>"; };
@@ -1762,6 +1764,7 @@
 				A7284403224DBFBD00F82F30 /* UserModel.swift */,
 				A7D5F25622C05BE900F8E9AF /* UserDetailModel.swift */,
 				A7D5F26022C0C2F300F8E9AF /* UserFollowsModel.swift */,
+				A757849E22C1CEA900D4DB61 /* FollowStatusModel.swift */,
 				A7D5F26222C0CF8600F8E9AF /* UserFansModel.swift */,
 				A7CC74E52270628B003C4F38 /* DeliveryMethodTypeModel.swift */,
 				A757C92D22744ACE00226355 /* AddressManagerListModel.swift */,
@@ -1775,6 +1778,7 @@
 			isa = PBXGroup;
 			children = (
 				A72A7384223396CB00B21995 /* ApiMacro.swift */,
+				A757849C22C1CBF400D4DB61 /* SwiftMoyaNetWorkH5Manager.swift */,
 				A7A17E5E22A0CEF200B7A77E /* SwiftMoyaNetWorkManagerTools.swift */,
 				A72A7382223396CB00B21995 /* SwiftMoyaNetWorkManager.swift */,
 			);
@@ -1898,7 +1902,6 @@
 				A72A72CD22321E2600B21995 /* ColorMacro.swift */,
 				A72A72C822321E2500B21995 /* FontMacro.swift */,
 				A743229322B88ED30017C367 /* EnumMacro.swift */,
-				A72A72C922321E2600B21995 /* HTMLURLMacro.swift */,
 				A72A72C722321E2500B21995 /* NotificationCenterMacro.swift */,
 				A72A726022321D3400B21995 /* RainbowPlanet-Bridging-Header.h */,
 			);
@@ -5076,7 +5079,6 @@
 				A7FF1594228C919A00A85748 /* OrderRefunddetailsTipsTableViewCell.swift in Sources */,
 				A7B4E73A228192D20012914A /* CMSTemplateModel.swift in Sources */,
 				A72A72C622321DE000B21995 /* WebView.swift in Sources */,
-				A72A72D122321E2700B21995 /* HTMLURLMacro.swift in Sources */,
 				BD1FC1A622B1075F00D55081 /* LxButton.m in Sources */,
 				BD12B66922B47D4800AEB10B /* RecommendSubCommentCollectionCell.swift in Sources */,
 				BDF862A1228E41CC000DEF84 /* OrderLogisticsController.swift in Sources */,
@@ -5173,6 +5175,7 @@
 				A71AF0A6226EDDC8001730FE /* SearchViewController.swift in Sources */,
 				BD20F1CF2283CE2300677D8E /* OrderFinishPayView.swift in Sources */,
 				BD13B6DC22BA03BC008BB323 /* SearchAddrNavigationbarView.swift in Sources */,
+				A757849D22C1CBF400D4DB61 /* SwiftMoyaNetWorkH5Manager.swift in Sources */,
 				A7A98E4322804851005306E9 /* ShoppingMallSepcialFlowLayout.swift in Sources */,
 				BD12B69422B4F68400AEB10B /* KSMediaPickerCollectionView.m in Sources */,
 				BD12204122AF8E320051C7C2 /* MessagePlanetNotiTableCell.swift in Sources */,
@@ -5180,6 +5183,7 @@
 				BD7AB838228420310030646A /* ShoppingCartPayOrderHeader.swift in Sources */,
 				A7824B002271F0DD00ABA381 /* EditSelfMentionContactsViewController.swift in Sources */,
 				A7E19FAE22BA2D16009BCCE1 /* SearchContentListViewController.swift in Sources */,
+				A757849F22C1CEA900D4DB61 /* FollowStatusModel.swift in Sources */,
 				A7CC751F227190C5003C4F38 /* AccountSecurityViewController.swift in Sources */,
 				BD13B6C422BA034D008BB323 /* PublishEditDefaultCollectionCell.swift in Sources */,
 				BD10CCFB22BE75080040796E /* PublishChooseVideoCover.swift in Sources */,

+ 0 - 21
RainbowPlanet/RainbowPlanet/Macro/HTMLURLMacro.swift

@@ -1,21 +0,0 @@
-//
-//  HTMLURLMacro.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2018/10/17.
-//  Copyright © 2018 南鑫林. All rights reserved.
-//
-
-import Foundation
-
-let kH5DevelopSever = true
-let kH5BetaSever = false
-let kH5ProductSever = false
-
-
-
-let kHTMLCommunityPlanetUrl = "http://h5.dev.caihongxingqiu.com/planet"
-
-//let kHTMLCommunityPlanetUrl = "http://h5.dev.caihongxingqiu.com/planet"
-
-

+ 1 - 0
RainbowPlanet/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h

@@ -29,6 +29,7 @@
 //靠左
 #import "UICollectionViewLeftAlignedLayout.h"
 
+
 // FIXME: 自定义键盘--待转swift
 #import "LXKeyBoard.h"
 

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Planet/CommunityPlanet/CommunityPlanetViewController.swift

@@ -18,7 +18,7 @@ class CommunityPlanetViewController: BaseJSWebViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
         
-        self.URLString = "http://192.168.23.134:8820/planet"
+        self.URLString = kH5PlanetUrl
         setupViews()
         setupData()
         

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

@@ -71,26 +71,18 @@ extension CommunityFindFriendsViewController {
     
     /// 关注
     func userFollow(followUid:Int,completion: @escaping (Int) -> Void) {
-        SwiftMoyaNetWorkServiceUser.shared().userFollowApi(followUid: followUid) {[weak self] (data) -> (Void) in
-            self?.userFollowCheckStatus(followUid: followUid, completion: completion)
+        SwiftMoyaNetWorkServiceUser.shared().userFollowApi(followUid: followUid) { (followStatusModel) -> (Void) in
+            let followStatusModel = followStatusModel as? FollowStatusModel
+            completion(followStatusModel?.isFollowStatus ?? 0)
         }
     }
     
     /// 取消关注
     func userCancelFollow(followUid:Int,completion: @escaping (Int) -> Void) {
         SwiftMoyaNetWorkServiceUser.shared().userCancelFollowApi(followUid: followUid) {
-            [weak self] (data) -> (Void) in
-            self?.userFollowCheckStatus(followUid: followUid, completion: completion)
-        }
-    }
-    
-    /// 检查用户关注状态
-    func userFollowCheckStatus(followUid:Int,completion: @escaping (Int) -> Void) {
-        let userModel = UserModel.shared().getModel()
-
-        SwiftMoyaNetWorkServiceUser.shared().userFollowCheckStatus(followUid: followUid, uid: userModel?.uid ?? 0) {(isFollow) -> (Void) in
-            let isFollow = isFollow as? Int
-            completion(isFollow ?? 0)
+            (followStatusModel) -> (Void) in
+            let followStatusModel = followStatusModel as? FollowStatusModel
+            completion(followStatusModel?.isFollowStatus ?? 0)
         }
     }
 }

+ 37 - 14
RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/ViewController/MyFollowAndFanViewController.swift

@@ -15,7 +15,6 @@ enum MyFollowAndFanType {
 
 class MyFollowAndFanViewController: BaseViewController {
 
-    
     /// 类型
     var myfollowAndFanType : MyFollowAndFanType?
     /// 关注数组
@@ -173,26 +172,21 @@ extension MyFollowAndFanViewController {
     
     /// 关注
     func userFollow(followUid:Int,completion: @escaping (Int) -> Void) {
-        SwiftMoyaNetWorkServiceUser.shared().userFollowApi(followUid: followUid) {[weak self] (data) -> (Void) in
-            self?.userFollowCheckStatus(followUid: followUid, uid: self?.userDetailModel?.uid ?? 0, completion: completion)
+        SwiftMoyaNetWorkServiceUser.shared().userFollowApi(followUid: followUid) {(followStatusModel) -> (Void) in
+            let followStatusModel = followStatusModel as? FollowStatusModel
+            completion(followStatusModel?.isFollowStatus ?? 0)
         }
     }
     
     /// 取消关注
     func userCancelFollow(followUid:Int,completion: @escaping (Int) -> Void) {
         SwiftMoyaNetWorkServiceUser.shared().userCancelFollowApi(followUid: followUid) {
-            [weak self] (data) -> (Void) in
-            self?.userFollowCheckStatus(followUid: followUid, uid: self?.userDetailModel?.uid ?? 0, completion: completion)
+            (followStatusModel) -> (Void) in
+            let followStatusModel = followStatusModel as? FollowStatusModel
+            completion(followStatusModel?.isFollowStatus ?? 0)
         }
     }
     
-    /// 检查用户关注状态
-    func userFollowCheckStatus(followUid:Int,uid:Int,completion: @escaping (Int) -> Void) {
-        SwiftMoyaNetWorkServiceUser.shared().userFollowCheckStatus(followUid: followUid, uid: uid) {(isFollow) -> (Void) in
-            let isFollow = isFollow as? Int
-            completion(isFollow ?? 0)
-        }
-    }
 }
 
 // MARK: - tableView dataSource && delegate
@@ -224,12 +218,12 @@ extension MyFollowAndFanViewController: UITableViewDataSource, UITableViewDelega
             if self?.myfollowAndFanType == .follow {
                 if cell.userFollowModel?.isFollowStatus == 0 { //加关注
                     self?.userFollow(followUid: cell.userFollowModel?.followUid ?? 0, completion: { (isFollow) -> Void in
-                        cell.userFanModel?.isFollowStatus = isFollow
+                        cell.userFollowModel?.isFollowStatus = isFollow
                         self?.tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none)
                     })
                 }else { //取消关注
                     self?.userCancelFollow(followUid: cell.userFollowModel?.followUid ?? 0, completion: { (isFollow) -> Void in
-                        cell.userFanModel?.isFollowStatus = isFollow
+                        cell.userFollowModel?.isFollowStatus = isFollow
                         self?.tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none)
                     })
                 }
@@ -251,6 +245,35 @@ extension MyFollowAndFanViewController: UITableViewDataSource, UITableViewDelega
         return cell
     }
     
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        tableView.deselectRow(at: indexPath, animated: true)
+        let userModel = UserModel.shared().getModel()
+
+        if myfollowAndFanType == .follow {
+            let userFollowModel = self.userFollowModels[indexPath.row]
+            if userModel?.uid == userFollowModel.followUid {
+                let vc = UserPersonalCenterViewController()
+                vc.jumpModeType = .push
+                self.navigationController?.pushViewController(vc, animated: true)
+            }else {
+                let vc = OtherPersonalCenterViewController()
+                vc.uid = userFollowModel.followUid ?? 0
+                self.navigationController?.pushViewController(vc, animated: true)
+            }
+        }else if myfollowAndFanType == .fan {
+            let userFanModel = self.userFanModels[indexPath.row]
+            if userModel?.uid == userFanModel.fanUid {
+                let vc = UserPersonalCenterViewController()
+                vc.jumpModeType = .push
+                self.navigationController?.pushViewController(vc, animated: true)
+            }else {
+                let vc = OtherPersonalCenterViewController()
+                vc.uid = userFanModel.fanUid ?? 0
+                self.navigationController?.pushViewController(vc, animated: true)
+            }
+        }
+    }
+    
     func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
         return 0
     }

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherHeaderView.swift

@@ -118,6 +118,7 @@ class PersonViewUserAndOtherHeaderView: BaseView {
             [weak self] (data) in
             let vc = MyFollowAndFanViewController()
             vc.myfollowAndFanType = .follow
+            vc.userDetailModel = self?.userDetailModel
             let currentVC = followNumberButton.findViewController() as? BaseViewController
             if self?.personViewUserAndOtherHeaderViewType == .user {
 
@@ -141,6 +142,7 @@ class PersonViewUserAndOtherHeaderView: BaseView {
             [weak self] (data) in
             let vc = MyFollowAndFanViewController()
             vc.myfollowAndFanType = .fan
+            vc.userDetailModel = self?.userDetailModel
             let currentVC = fanNumberButton.findViewController() as? BaseViewController
             if self?.personViewUserAndOtherHeaderViewType == .user {
                 vc.navigationBar.title = "我的粉丝"

+ 11 - 2
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/View/RainbowBeanPhysical/RainbowBeanPhysicalView.swift

@@ -40,7 +40,7 @@ class RainbowBeanPhysicalView: BaseView {
     
     var userDetailModel: UserDetailModel? {
         didSet {
-            
+            collectionView.reloadData()
         }
     }
     
@@ -57,12 +57,21 @@ extension RainbowBeanPhysicalView: UICollectionViewDelegateFlowLayout,UICollecti
     
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
         let cell = RainbowBeanPhysicalCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        cell.userDetailModel = userDetailModel
         return cell
         
     }
     
     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        
+        collectionView.deselectItem(at: indexPath, animated: true)
+        let vc = BaseWebViewController()
+        if indexPath.row == 0 {
+            vc.URLString = kH5ContentId2Url
+        }else  if indexPath.row == 1 {
+            vc.URLString = kH5ContentId5Url
+        }
+        let currentVC = findViewController()
+        currentVC?.navigationController?.pushViewController(vc, animated: true)
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {

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

@@ -51,7 +51,7 @@ class SetViewController: BaseViewController {
                 // 用户协议
                 case 0:
                     let vc = BaseWebViewController()
-                    vc.URLString = "https://www.baidu.com"
+                    vc.URLString = kH5ContentId6Url
                     self?.navigationController?.pushViewController(vc, animated: true)
                     break
                 // AppStore

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/AliyunPathManager.m

@@ -7,6 +7,7 @@
 //
 
 #import "AliyunPathManager.h"
+//#import "PublishFilterView.swift"
 
 @implementation AliyunPathManager
 

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishTakeVideo/PublishVideoView.swift

@@ -40,7 +40,7 @@ class PublishVideoView: BaseView {
     }
     
     // 是否正在录制
-    var recording: Bool = false
+    @objc var recording: Bool = false
     
     override func setupViews() {
         self.backgroundColor = kffffffColor

+ 26 - 0
RainbowPlanet/RainbowPlanet/Service/Model/UserModel/FollowStatusModel.swift

@@ -0,0 +1,26 @@
+//
+//	FollowStatusModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class FollowStatusModel : NSObject, Mappable{
+
+	var isFollowStatus : Int?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return FollowStatusModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		isFollowStatus <- map["is_follow_status"]
+		
+	}
+
+}

+ 4 - 21
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift

@@ -629,9 +629,9 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
         var parameters = Dictionary<String,Any>()
         parameters.updateValue(followUid, forKey: "follow_uid")
         SwiftProgressHUD.shared().showWait()
-        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceUserApi.userFollow(parameters: parameters))) { (data) in
+        SwiftMoyaNetWorkManager.shared.requestObject(FollowStatusModel.self,target: MultiTarget(SwiftMoyaServiceUserApi.userFollow(parameters: parameters))) { (followStatusModel) in
             SwiftProgressHUD.shared().showText("已关注")
-            completion("")
+            completion(followStatusModel)
         }
     }
     
@@ -646,26 +646,9 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
         var parameters = Dictionary<String,Any>()
         parameters.updateValue(followUid, forKey: "follow_uid")
         SwiftProgressHUD.shared().showWait()
-        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceUserApi.userCancelFollow(parameters: parameters))) { (data) in
+        SwiftMoyaNetWorkManager.shared.requestObject(FollowStatusModel.self,target: MultiTarget(SwiftMoyaServiceUserApi.userCancelFollow(parameters: parameters))) { (followStatusModel) in
             SwiftProgressHUD.shared().showText("已取消关注")
-            completion("")
-        }
-    }
-    
-    
-    /// 检查用户关注状态
-    ///
-    /// - Parameters:
-    ///   - followUid: 被关注人id
-    ///   - uid: 用户Id
-    ///   - completion: 回调
-    func userFollowCheckStatus(followUid:Int,uid:Int,completion: @escaping apiCallBack) {
-        var parameters = Dictionary<String,Any>()
-        parameters.updateValue(followUid, forKey: "follow_uid")
-        parameters.updateValue(uid, forKey: "uid")
-        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceUserApi.userFollowCheckStatus(parameters: parameters))) { (data) in
-            NXLLog(data)
-            completion(data)
+            completion(followStatusModel)
         }
     }
 

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

@@ -8,10 +8,12 @@
 
 import Foundation
 
+let kPersonalService = false
 let kDevelopSever = true
 let kBetaSever = false
 let kProductSever = false
 
+
 // MARK: - 数据服务器
 public func kApiDataPrefix() -> String {
     if kDevelopSever /** 接口前缀-开发服务器*/ {
@@ -24,8 +26,26 @@ public func kApiDataPrefix() -> String {
         return ""
     }
 }
-// MARK: - 图片服务器
-public let kApiPicPrefix = ""
+
+let kH5PersonalService = true
+let kH5DevelopSever = false
+let kH5BetaSever = false
+let kH5ProductSever = false
+
+// MARK: - H5
+public func kApiH5Prefix() -> String {
+    if kH5PersonalService /** 接口前缀-开发服务器*/ {
+        return "http://192.168.23.115:8820"
+    }else if kH5DevelopSever /** 接口前缀-开发服务器*/ {
+        return "https://api.dev.caihongxingqiu.com"
+    } else if kH5BetaSever /** 接口前缀-测试服务器*/{
+        return "https://api.dev.caihongxingqiu.com/beta"
+    }else if kH5ProductSever /** 接口前缀-生产服务器*/ {
+        return ""
+    }else {
+        return ""
+    }
+}
 
 
 /// 头部类型

+ 30 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/SwiftMoyaNetWorkH5Manager.swift

@@ -0,0 +1,30 @@
+//
+//  SwiftMoyaNetWorkH5Manager.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/25.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import Foundation
+
+/// 星球
+let kH5PlanetUrl = kApiH5Prefix() + "/planet"
+
+/// 小贴士
+let kH5ContentId1Url = kApiH5Prefix() + "/content?id=1"
+
+/// 什么是彩虹豆
+let kH5ContentId2Url = kApiH5Prefix() + "/content?id=2"
+
+/// 什么是彩虹星球
+let kH5ContentId3Url = kApiH5Prefix() + "/content?id=3"
+
+/// 赚豆秘籍
+let kH5ContentId4Url = kApiH5Prefix() + "/content?id=4"
+
+/// 什么是体力值
+let kH5ContentId5Url = kApiH5Prefix() + "/content?id=5"
+
+/// 用户协议
+let kH5ContentId6Url = kApiH5Prefix() + "/content?id=6"