Sfoglia il codice sorgente

回到问题完成一半

南鑫林 5 anni fa
parent
commit
16fd50f891
17 ha cambiato i file con 1231 aggiunte e 21 eliminazioni
  1. 60 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 4 1
      RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift
  3. 2 0
      RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift
  4. 2 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleModel.swift
  5. 78 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleQuestionsAnswersModel.swift
  6. 45 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleEssenceView.swift
  7. 256 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleHeaderView.swift
  8. 44 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView.swift
  9. 176 5
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/ViewController/CircleViewController.swift
  10. 68 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleQuestionsAnswers/View/CircleQuestionsAnswersTableViewCell.swift
  11. 116 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleQuestionsAnswers/ViewController/CircleQuestionsAnswersViewController.swift
  12. 257 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleShareContent/CircleShareContentViewController.swift
  13. 49 1
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaNetWorkServiceCommunity.swift
  14. 40 6
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift
  15. 13 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift
  16. 17 4
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaServiceUserApi.swift
  17. 4 4
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift

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

@@ -463,6 +463,13 @@
 		A7F577CD22FECD7C00E2D757 /* AliyunVodupToyoPublishManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F577CC22FECD7C00E2D757 /* AliyunVodupToyoPublishManager.swift */; };
 		A7F577D122FECE8700E2D757 /* AliyunVodUpToYoPublishModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F577D022FECE8700E2D757 /* AliyunVodUpToYoPublishModel.swift */; };
 		A7F577D722FED3A100E2D757 /* PathManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F577D622FED3A100E2D757 /* PathManager.swift */; };
+		A7F688E523556077000C313F /* CircleHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F688E423556077000C313F /* CircleHeaderView.swift */; };
+		A7F688E723556EA1000C313F /* CircleEssenceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F688E623556EA1000C313F /* CircleEssenceView.swift */; };
+		A7F688E923556F6E000C313F /* CircleLeavingMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F688E823556F6E000C313F /* CircleLeavingMessageView.swift */; };
+		A7F688EC2355AA66000C313F /* CircleShareContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F688EB2355AA66000C313F /* CircleShareContentViewController.swift */; };
+		A7F688EF2355C194000C313F /* CircleQuestionsAnswersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F688EE2355C194000C313F /* CircleQuestionsAnswersViewController.swift */; };
+		A7F688F12355C3E9000C313F /* CommunityCircleQuestionsAnswersModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F688F02355C3E9000C313F /* CommunityCircleQuestionsAnswersModel.swift */; };
+		A7F688F52355D933000C313F /* CircleQuestionsAnswersTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F688F42355D933000C313F /* CircleQuestionsAnswersTableViewCell.swift */; };
 		A7FF1577228C824300A85748 /* OrderModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7FF1576228C824300A85748 /* OrderModule.xcassets */; };
 		A7FF1598228D092A00A85748 /* OrderListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1597228D092A00A85748 /* OrderListModel.swift */; };
 		A7FF159C228D9E3D00A85748 /* OrderRefundDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF159B228D9E3C00A85748 /* OrderRefundDetailModel.swift */; };
@@ -1159,6 +1166,13 @@
 		A7F577CC22FECD7C00E2D757 /* AliyunVodupToyoPublishManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AliyunVodupToyoPublishManager.swift; sourceTree = "<group>"; };
 		A7F577D022FECE8700E2D757 /* AliyunVodUpToYoPublishModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AliyunVodUpToYoPublishModel.swift; sourceTree = "<group>"; };
 		A7F577D622FED3A100E2D757 /* PathManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PathManager.swift; sourceTree = "<group>"; };
+		A7F688E423556077000C313F /* CircleHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleHeaderView.swift; sourceTree = "<group>"; };
+		A7F688E623556EA1000C313F /* CircleEssenceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleEssenceView.swift; sourceTree = "<group>"; };
+		A7F688E823556F6E000C313F /* CircleLeavingMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleLeavingMessageView.swift; sourceTree = "<group>"; };
+		A7F688EB2355AA66000C313F /* CircleShareContentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleShareContentViewController.swift; sourceTree = "<group>"; };
+		A7F688EE2355C194000C313F /* CircleQuestionsAnswersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleQuestionsAnswersViewController.swift; sourceTree = "<group>"; };
+		A7F688F02355C3E9000C313F /* CommunityCircleQuestionsAnswersModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityCircleQuestionsAnswersModel.swift; sourceTree = "<group>"; };
+		A7F688F42355D933000C313F /* CircleQuestionsAnswersTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleQuestionsAnswersTableViewCell.swift; sourceTree = "<group>"; };
 		A7FF1576228C824300A85748 /* OrderModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = OrderModule.xcassets; sourceTree = "<group>"; };
 		A7FF1597228D092A00A85748 /* OrderListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderListModel.swift; sourceTree = "<group>"; };
 		A7FF159B228D9E3C00A85748 /* OrderRefundDetailModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderRefundDetailModel.swift; sourceTree = "<group>"; };
@@ -3312,6 +3326,8 @@
 		A784F2C223544B0800E49140 /* CircleModule */ = {
 			isa = PBXGroup;
 			children = (
+				A7F688ED2355C17B000C313F /* CircleQuestionsAnswers */,
+				A7F688EA2355AA45000C313F /* CircleShareContent */,
 				A784F2C323544B1B00E49140 /* Circle */,
 			);
 			path = CircleModule;
@@ -3337,6 +3353,9 @@
 		A784F2CA23544F0100E49140 /* View */ = {
 			isa = PBXGroup;
 			children = (
+				A7F688E423556077000C313F /* CircleHeaderView.swift */,
+				A7F688E623556EA1000C313F /* CircleEssenceView.swift */,
+				A7F688E823556F6E000C313F /* CircleLeavingMessageView.swift */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -4097,6 +4116,7 @@
 		A7D5F25D22C0612A00F8E9AF /* CommunityModel */ = {
 			isa = PBXGroup;
 			children = (
+				A7F688F02355C3E9000C313F /* CommunityCircleQuestionsAnswersModel.swift */,
 				A784F2CB23547C9600E49140 /* CommunityCircleModel.swift */,
 				A7811C99231F908C00C2D8DE /* CommunityRecommendCategorysModel.swift */,
 				A7D5F25E22C0614400F8E9AF /* CommunityTopicCategoryModel.swift */,
@@ -4492,6 +4512,39 @@
 			path = PathManager;
 			sourceTree = "<group>";
 		};
+		A7F688EA2355AA45000C313F /* CircleShareContent */ = {
+			isa = PBXGroup;
+			children = (
+				A7F688EB2355AA66000C313F /* CircleShareContentViewController.swift */,
+			);
+			path = CircleShareContent;
+			sourceTree = "<group>";
+		};
+		A7F688ED2355C17B000C313F /* CircleQuestionsAnswers */ = {
+			isa = PBXGroup;
+			children = (
+				A7F688F32355CBF3000C313F /* View */,
+				A7F688F22355CBEB000C313F /* ViewController */,
+			);
+			path = CircleQuestionsAnswers;
+			sourceTree = "<group>";
+		};
+		A7F688F22355CBEB000C313F /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A7F688EE2355C194000C313F /* CircleQuestionsAnswersViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A7F688F32355CBF3000C313F /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A7F688F42355D933000C313F /* CircleQuestionsAnswersTableViewCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		BD01B1F722BC673900CE9F36 /* PublishTakePhoto */ = {
 			isa = PBXGroup;
 			children = (
@@ -5697,6 +5750,7 @@
 				A7BB68672269B1DD00AB07A2 /* AddressPOIViewController.swift in Sources */,
 				A7284A7322546460000BAEC4 /* SwiftMoyaServicePayApi.swift in Sources */,
 				BDE3045D22851E4F001D050F /* ProductCartListModel.swift in Sources */,
+				A7F688E523556077000C313F /* CircleHeaderView.swift in Sources */,
 				A73A56D322DC59A3004920FE /* PushModel.swift in Sources */,
 				BD5CA89222DD73A500364A67 /* PublishMusicVolumnView.swift in Sources */,
 				BD12B68822B4F28F00AEB10B /* KSExtension.swift in Sources */,
@@ -5779,6 +5833,7 @@
 				A7CC7528227196C4003C4F38 /* AccountSecuritySetTableViewCell.swift in Sources */,
 				A7F2D6E122B25EF30093000B /* CardContentPicVideoModel.swift in Sources */,
 				BD0FAA5622C4752C00DDFB37 /* AliyunPublishTopView.m in Sources */,
+				A7F688F52355D933000C313F /* CircleQuestionsAnswersTableViewCell.swift in Sources */,
 				A74322A922B900180017C367 /* CommunityFindFriendsViewController.swift in Sources */,
 				A7F304BE2333640F00A4850F /* PushNotificationSettingsViewController.swift in Sources */,
 				BD13B6E222BA03BC008BB323 /* PublishTopicTypeCell.swift in Sources */,
@@ -5816,6 +5871,7 @@
 				A7778CB82244E97A00C7C47A /* BindPhoneNumberViewController.swift in Sources */,
 				A754150F224CACF9002480B5 /* SwiftSign.swift in Sources */,
 				A71AF0BA226F00F8001730FE /* SearchResultView.swift in Sources */,
+				A7F688EF2355C194000C313F /* CircleQuestionsAnswersViewController.swift in Sources */,
 				A7D77DEB22DDC5900048D5F6 /* RedemptionAreaFSPagerViewCell.swift in Sources */,
 				A7D07CD622B78BC300186014 /* PersonViewUserAndOtherListCollectionViewCell.swift in Sources */,
 				A75B782322DEC2F8007B986A /* RedemptionAreaSpecialOneTableViewCell.swift in Sources */,
@@ -5887,6 +5943,7 @@
 				A797FDEB22C5AC6A0076DCB3 /* CacheManager.swift in Sources */,
 				A7CC753A2271B98B003C4F38 /* AddressManagerAddTableViewCell.swift in Sources */,
 				A71AF0AC226EDE37001730FE /* SearchNavigationbarView.swift in Sources */,
+				A7F688EC2355AA66000C313F /* CircleShareContentViewController.swift in Sources */,
 				A76893962339C28800819EC3 /* StartupPageView.swift in Sources */,
 				A70B2C6D2288815E00B2449F /* PickViewOneComponentsView.swift in Sources */,
 				A7D77DE722DDBE4D0048D5F6 /* RedemptionAreaBannerCollectionViewCell.swift in Sources */,
@@ -5925,6 +5982,7 @@
 				A72A72AA22321DE000B21995 /* Log.swift in Sources */,
 				A7464B6C23386521003CE3A0 /* PushConfigModel.swift in Sources */,
 				A784F2C623544B4A00E49140 /* CircleViewController.swift in Sources */,
+				A7F688E923556F6E000C313F /* CircleLeavingMessageView.swift in Sources */,
 				BD61226A22C3595B00D3F513 /* AlivcEditUIConfig.m in Sources */,
 				A7D77DF122DDE6600048D5F6 /* UserMemberTotalBeanViewModel.swift in Sources */,
 				A7AA9F6522C63DCD0086498B /* CommunityFollowFeedModel.swift in Sources */,
@@ -6038,12 +6096,14 @@
 				BD13B6C322BA034D008BB323 /* PublishEditDescribeCell.swift in Sources */,
 				A7CC752C2271A1AE003C4F38 /* SetPasswordViewController.swift in Sources */,
 				BD10FBFE22C6F7D90096A34E /* AliyunPublishService.m in Sources */,
+				A7F688F12355C3E9000C313F /* CommunityCircleQuestionsAnswersModel.swift in Sources */,
 				A75B783022DF2CBF007B986A /* Extension+WKWebView.swift in Sources */,
 				A7C0FDEE22B6516A00BC1E86 /* CommunityBannerTableViewCell.swift in Sources */,
 				A738D202225AD6AD00EEE860 /* Extension+UICollectionView.swift in Sources */,
 				BDAF83AA22B388F20004BCC3 /* RecommendDefaultBackCell.swift in Sources */,
 				A71CAB3922C9DF0600D908A8 /* CommunityTopicDetailModel.swift in Sources */,
 				BD37E38522CDF91A003A14A2 /* CommunityVideoSelTopicCell.swift in Sources */,
+				A7F688E723556EA1000C313F /* CircleEssenceView.swift in Sources */,
 				BD108C9622A60C2100837DAB /* HGImagePickerCell.swift in Sources */,
 				A7C0FDEB22B4C6C300BC1E86 /* CardContentCommentListFooterView.swift in Sources */,
 				BD3AA45822AE63EC00EF4F20 /* MessageMainViewController.swift in Sources */,

+ 4 - 1
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift

@@ -288,7 +288,10 @@ extension ESTabBar {
         
         let view  = super.hitTest(point, with: event)
         if view == nil {
-            if UserModel.isTokenNil() && LoginNowView.shared.loginNowView != nil && !(UIViewController.topMost is BrowsePicturesViewController)  && !(UIViewController.topMost is H5CommonViewController){
+            if UserModel.isTokenNil() && LoginNowView.shared.loginNowView != nil
+                && !(UIViewController.topMost is BrowsePicturesViewController)
+                && !(UIViewController.topMost is H5CommonViewController)
+                && !(UIViewController.topMost is CommunityFeaturedTopicsViewController) {
                 for subView in subviews {
                     if !subView.subviews.isEmpty {
                         for subView in subView.subviews {

+ 2 - 0
RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift

@@ -159,3 +159,5 @@ let kFF5E5EColor = UIColor(hexString: "FF5E5E")
 let kE5E5E5Color = UIColor(hexString: "E5E5E5")
 
 let kA8ACBCColor = UIColor(hexString: "A8ACBC")
+
+let k584F60Color = UIColor(hexString: "584F60")

+ 2 - 0
RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleModel.swift

@@ -8,6 +8,7 @@ import ObjectMapper
 
 class CommunityCircleModel : NSObject, Mappable{
 
+    var answerCount : Int?
 	var chatroom : CommunityCircleFunctionsModel?
 	var id : Int?
 	var image : String?
@@ -27,6 +28,7 @@ class CommunityCircleModel : NSObject, Mappable{
 
 	func mapping(map: Map)
 	{
+        answerCount <- map["answer_count"]
 		chatroom <- map["chatroom"]
 		id <- map["id"]
 		image <- map["image"]

+ 78 - 0
RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleQuestionsAnswersModel.swift

@@ -0,0 +1,78 @@
+//
+//	CommunityCircleQuestionsAnswersModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class CommunityCircleQuestionsAnswersModel : NSObject, Mappable{
+
+	var answerCount : Int?
+	var id : Int?
+	var joinQuestion : [CircleJoinQuestionModel]?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return CommunityCircleQuestionsAnswersModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		answerCount <- map["answer_count"]
+		id <- map["id"]
+		joinQuestion <- map["join_question"]
+		
+	}
+
+}
+
+class CircleJoinQuestionModel : NSObject, Mappable{
+    
+    var answer : [CircleAnswerModel]?
+    var id : Int?
+    var question : String?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CircleJoinQuestionModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        answer <- map["answer"]
+        id <- map["id"]
+        question <- map["question"]
+        
+    }
+    
+}
+
+class CircleAnswerModel : NSObject, Mappable{
+    
+    var id : Int?
+    var right : Bool?
+    var text : String?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CircleAnswerModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        id <- map["id"]
+        right <- map["right"]
+        text <- map["text"]
+        
+    }
+    
+}
+
+

+ 45 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleEssenceView.swift

@@ -0,0 +1,45 @@
+//
+//  CircleEssenceView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/15.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import JXPagingView
+
+class CircleEssenceView: BaseView {
+    
+    deinit {
+        listViewDidScrollCallback = nil
+        if observe != nil {
+            NotificationCenter.default.removeObserver(observe!)
+        }
+    }
+    weak var observe : NSObjectProtocol?
+    var listViewDidScrollCallback: ((UIScrollView) -> ())?
+
+    /*
+    // Only override draw() if you perform custom drawing.
+    // An empty implementation adversely affects performance during animation.
+    override func draw(_ rect: CGRect) {
+        // Drawing code
+    }
+    */
+
+}
+
+extension CircleEssenceView : JXPagingViewListViewDelegate {
+    public func listView() -> UIView {
+        return self
+    }
+    
+    public func listViewDidScrollCallback(callback: @escaping (UIScrollView) -> ()) {
+        self.listViewDidScrollCallback = callback
+    }
+    
+    public func listScrollView() -> UIScrollView {
+        return UIScrollView()
+    }
+}

+ 256 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleHeaderView.swift

@@ -0,0 +1,256 @@
+//
+//  CircleHeaderView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/15.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+
+class CircleHeaderView: BaseView {
+    
+    var imageViewFrame = CGRect(x: 0, y: 0, width: kScreenWidth, height: 114 + kNavBarTotalHeight + 8)
+    
+    override func setupViews() {
+        addSubview(bgImageView)
+        addSubview(bgView)
+        bgView.addSubview(titleLabel)
+        addSubview(midBgView)
+        addSubview(avatarImageView)
+        midBgView.addSubview(circleButton)
+        midBgView.addSubview(chatRootButton)
+        midBgView.addSubview(memberNameLabel)
+        midBgView.addSubview(memberNumberLabel)
+        midBgView.addSubview(albumNameLabel)
+        midBgView.addSubview(albumNumberLabel)
+    }
+    
+    override func setupLayouts() {
+        titleLabel.snp.makeConstraints { (make) in
+            make.bottom.equalTo(-50)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+        }
+        avatarImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(midBgView).offset(-30)
+            make.left.equalTo(14)
+            make.size.equalTo(80)
+        }
+        circleButton.snp.makeConstraints { (make) in
+            make.top.equalTo(20)
+            make.right.equalTo(-14)
+            make.width.equalTo(110)
+            make.height.equalTo(30)
+        }
+        chatRootButton.snp.makeConstraints { (make) in
+            make.top.equalTo(20)
+            make.right.equalTo(circleButton.snp.left).offset(-10)
+            make.width.equalTo(64)
+            make.height.equalTo(30)
+        }
+        
+        memberNameLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(avatarImageView.snp.bottom).offset(22)
+            make.left.equalTo(14)
+        }
+        
+        memberNumberLabel.snp.makeConstraints { (make) in
+            make.centerY.equalTo(memberNameLabel)
+            make.left.equalTo(memberNameLabel.snp.right).offset(8)
+        }
+        
+        albumNameLabel.snp.makeConstraints { (make) in
+            make.centerY.equalTo(memberNameLabel)
+            make.left.equalTo(memberNumberLabel.snp.right).offset(30)
+        }
+        
+        albumNumberLabel.snp.makeConstraints { (make) in
+            make.centerY.equalTo(memberNameLabel)
+            make.left.equalTo(albumNameLabel.snp.right).offset(8)
+        }
+    }
+    
+    override func setupData() {
+        chatRootButton.rx.tap.subscribe(onNext: { [weak self] (_) in
+            if self?.communityCircleModel?.chatroom?.isOpen == 1 {
+                self?.userChatroomValidRoomApi()
+            }else {
+                SwiftProgressHUD.shared().showText("这个圈子没有聊天室哦~")
+            }
+        }).disposed(by: disposeBag)
+        
+        circleButton.rx.tap.subscribe(onNext: { [weak self] (_) in
+            if self?.circleButton.isSelected ?? false { //退出圈子
+                self?.communityCircleJoinDeleteApi()
+            }else { //加入圈子
+                // 是否答题
+                if self?.communityCircleModel?.joinLimit == 0 { //不需要
+                   self?.communityCircleJoinPostApi()
+                } else if self?.communityCircleModel?.joinLimit == 1 { //需要
+                    let vc = CircleQuestionsAnswersViewController()
+                    vc.circleId = self?.communityCircleModel?.id ?? 0
+                    UIViewController.topMost?.navigationController?.pushViewController(vc, animated: true)
+                }
+            }
+        }).disposed(by: disposeBag)
+        
+        
+    }
+    
+    private lazy var bgImageView: UIImageView = {
+        let bgImageView = UIImageView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 114 + kNavBarTotalHeight + 8))
+        bgImageView.image = kImage(name: "default_pic")
+        bgImageView.contentMode = .scaleAspectFill
+        bgImageView.layer.masksToBounds = true
+        return bgImageView
+    }()
+    
+    private lazy var bgView: UIView = {
+        let bgView = UIView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 114 + kNavBarTotalHeight + 8))
+        bgView.backgroundColor = UIColor(hexString: "000000", alpha: 0.5)
+        return bgView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "昵称"
+        titleLabel.textColor = .white
+        titleLabel.font = kMediumFont23
+        return titleLabel
+    }()
+    
+    private lazy var midBgView: UIView = {
+        let midBgView = UIView(frame: CGRect(x: 0, y: 114 + kNavBarTotalHeight, width: kScreenWidth, height: 104))
+        midBgView.backgroundColor = .white
+        midBgView.configRectCorner(corner: [.topRight,.topLeft], radii: CGSize(width: 8, height: 8))
+        return midBgView
+    }()
+    
+    lazy var avatarImageView: UIImageView = {
+        let avatarImageView = UIImageView()
+        avatarImageView.image = kImage(name: "default_avatar")
+        avatarImageView.cornerRadius = 40
+        avatarImageView.masksToBounds = true
+        return avatarImageView
+    }()
+    
+    lazy var circleButton: UIButton = {
+        let circleButton = UIButton(type: UIButton.ButtonType.custom)
+        circleButton.setBackgroundImage(UIImage.imageWithColor(color: kThemeColor), for: UIControl.State.normal)
+        circleButton.setBackgroundImage(UIImage.imageWithColor(color: .white), for: UIControl.State.selected)
+        circleButton.setTitle("加入圈子", for: UIControl.State.normal)
+        circleButton.setTitle("退出圈子", for: UIControl.State.selected)
+        circleButton.setTitleColor(.white, for: UIControl.State.normal)
+        circleButton.setTitleColor(kThemeColor, for: UIControl.State.selected)
+        circleButton.titleLabel?.font = kRegularFont14
+        circleButton.layer.borderColor = kThemeColor.cgColor
+        circleButton.layer.borderWidth = 1
+        circleButton.cornerRadius = 15
+        circleButton.masksToBounds = true
+        return circleButton
+    }()
+    
+    lazy var chatRootButton: UIButton = {
+        let chatRootButton = UIButton(type: UIButton.ButtonType.custom)
+        chatRootButton.setBackgroundImage(UIImage.imageWithColor(color: .white), for: UIControl.State.normal)
+        chatRootButton.setTitle("聊天室", for: UIControl.State.normal)
+        chatRootButton.setTitleColor(k584F60Color, for: UIControl.State.normal)
+        chatRootButton.titleLabel?.font = kRegularFont14
+        chatRootButton.layer.borderColor = k584F60Color.cgColor
+        chatRootButton.layer.borderWidth = 1
+        chatRootButton.cornerRadius = 15
+        chatRootButton.masksToBounds = true
+        return chatRootButton
+    }()
+    
+    lazy var memberNameLabel: UILabel = {
+        let memberNameLabel = UILabel()
+        memberNameLabel.text = "成员"
+        memberNameLabel.textColor = .black
+        memberNameLabel.font = kRegularFont14
+        return memberNameLabel
+    }()
+    
+    lazy var memberNumberLabel: UILabel = {
+        let memberNumberLabel = UILabel()
+        memberNumberLabel.text = "0"
+        memberNumberLabel.textColor = .black
+        memberNumberLabel.font = kMediumFont16
+        return memberNumberLabel
+    }()
+    
+    lazy var albumNameLabel: UILabel = {
+        let albumNameLabel = UILabel()
+        albumNameLabel.text = "相册"
+        albumNameLabel.textColor = .black
+        albumNameLabel.font = kRegularFont14
+        return albumNameLabel
+    }()
+    
+    lazy var albumNumberLabel: UILabel = {
+        let albumNumberLabel = UILabel()
+        albumNumberLabel.text = "0"
+        albumNumberLabel.textColor = .black
+        albumNumberLabel.font = kMediumFont16
+        return albumNumberLabel
+    }()
+    
+    var communityCircleModel :CommunityCircleModel? {
+        didSet {
+            bgImageView.kf.setImage(with: kURLImage(name: communityCircleModel?.image ?? "default_pic"), placeholder: kImage(name: "default_pic"))
+            titleLabel.text = communityCircleModel?.name
+            avatarImageView.kf.setImage(with: kURLImage(name: communityCircleModel?.image ?? "default_avatar"), placeholder: kImage(name: "default_avatar"))
+            memberNumberLabel.text = communityCircleModel?.members?.extra
+            albumNumberLabel.text = communityCircleModel?.pictures?.extra
+            
+            if communityCircleModel?.isJoin == 0 {
+                circleButton.isSelected = false
+            }else if communityCircleModel?.isJoin == 1 {
+                circleButton.isSelected = true
+            }
+        }
+    }
+    
+    
+    /// 验证聊天室是否开启了
+    func userChatroomValidRoomApi() {
+        SwiftMoyaNetWorkServiceUser.shared().userChatroomValidRoomApi(ChatroomId: communityCircleModel?.chatroom?.extra ?? "0") { [weak self] data in
+            Mediator.push(RongCloudIMRouterModuleType.IMChatRoom(targetId: self?.communityCircleModel?.chatroom?.extra ?? "0", messageCount: 50, roomName: self?.communityCircleModel?.name ?? ""))
+            
+        }
+    }
+    
+    /// 加入圈子
+    func communityCircleJoinPostApi() {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleJoinPostApi(circleId:  communityCircleModel?.id ?? 0) {[weak self]  (_) -> (Void) in
+            self?.circleButton.isSelected = true
+            self?.communityCircleModel?.isJoin = 1
+             SwiftProgressHUD.shared().showText("加入圈子成功")
+        }
+    }
+    
+    
+    /// 退出圈子
+    func communityCircleJoinDeleteApi() {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleJoinDeleteApi(circleId:  communityCircleModel?.id ?? 0) {[weak self]  (_) -> (Void) in
+            self?.circleButton.isSelected = false
+            self?.communityCircleModel?.isJoin = 0
+            SwiftProgressHUD.shared().showText("退出圈子成功")
+        }
+    }
+    
+    func scrollViewDidScroll(contentOffsetY: CGFloat) {
+        if contentOffsetY < 0 {
+            var frame = imageViewFrame
+            frame.size.height -= contentOffsetY
+            frame.origin.y = contentOffsetY
+            bgImageView.frame = frame
+            bgView.frame = frame
+        }
+    }
+    
+    
+    
+}

+ 44 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView.swift

@@ -0,0 +1,44 @@
+//
+//  CircleLeavingMessageView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/15.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import JXPagingView
+
+class CircleLeavingMessageView: BaseView {
+
+    deinit {
+        listViewDidScrollCallback = nil
+        if observe != nil {
+            NotificationCenter.default.removeObserver(observe!)
+        }
+    }
+    weak var observe : NSObjectProtocol?
+    var listViewDidScrollCallback: ((UIScrollView) -> ())?
+    /*
+    // Only override draw() if you perform custom drawing.
+    // An empty implementation adversely affects performance during animation.
+    override func draw(_ rect: CGRect) {
+        // Drawing code
+    }
+    */
+
+}
+
+extension CircleLeavingMessageView : JXPagingViewListViewDelegate {
+    public func listView() -> UIView {
+        return self
+    }
+    
+    public func listViewDidScrollCallback(callback: @escaping (UIScrollView) -> ()) {
+        self.listViewDidScrollCallback = callback
+    }
+    
+    public func listScrollView() -> UIScrollView {
+        return UIScrollView()
+    }
+}

+ 176 - 5
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/ViewController/CircleViewController.swift

@@ -26,8 +26,10 @@ class CircleViewController: BaseViewController {
     }
     
     var circleId : Int?
-    let JXTableHeaderViewHeight: Int = Int(140 + kNavBarTotalHeight)
+    let JXTableHeaderViewHeight: Int = Int(114 + kNavBarTotalHeight + 104)
     let JXHeightForHeaderInSection: Int = 44
+    var communityCircleModel : CommunityCircleModel?
+    var cmsTemplateTitles = ["精选", "留言"]
     
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -37,6 +39,10 @@ class CircleViewController: BaseViewController {
     }
     
     override func setupViews() {
+        circleContainerView.addSubview(circleHeaderView)
+        view.addSubview(segmentedView)
+        view.addSubview(pagingView)
+        view.insertSubview(navigationBar, aboveSubview: pagingView)
         setnavigationBar()
     }
     
@@ -58,16 +64,30 @@ class CircleViewController: BaseViewController {
     override func setupData() {
         navigationBar.onClickRightButton = {
             [weak self] in
+            if UserModel.isTokenNil() {
+                kAppDelegate.setLogin()
+            }else {
+                let vc = CircleShareContentViewController()
+                vc.imgUrl = self?.communityCircleModel?.image
+                vc.circleNameStr = self?.communityCircleModel?.name ?? ""
+                self?.navigationController?.pushViewController(vc, animated: true)
+            }
             
         }
-        loadCircle()
-        
+        reloadData()
+        loadCircleData()
     }
     
     
     /// 加载圈子详情
-    func loadCircle() {
-        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleApi(id: circleId ?? 0, completion: { (communityCircleModel) -> (Void) in
+    func loadCircleData() {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleApi(id: circleId ?? 0, completion: {
+            [weak self](communityCircleModel) -> (Void) in
+            self?.communityCircleModel = communityCircleModel as? CommunityCircleModel
+            self?.navigationBar.backgroundImageView.kf.setImage(with: kURLImage(name: self?.communityCircleModel?.image ?? "default_pic"), placeholder: kImage(name: "default_pic"))
+            self?.avatarButton.kf.setImage(with: kURLImage(name: self?.communityCircleModel?.image ?? ""), for: UIControl.State.normal, placeholder: kImage(name: "default_avatar"))
+            self?.nameButton.setTitle(self?.communityCircleModel?.name, for: UIControl.State.normal)
+            self?.circleHeaderView.communityCircleModel = self?.communityCircleModel
             
         }) { (loadingStatus) in
             
@@ -94,6 +114,16 @@ class CircleViewController: BaseViewController {
         statusBarStyle = .lightContent
     }
     
+    /// 刷新页面
+    func reloadData() {
+        segmentedDataSource.titles = cmsTemplateTitles
+        segmentedView.indicators = [indicator]
+        self.segmentedDataSource.reloadData(selectedIndex: 0)
+        self.segmentedView.defaultSelectedIndex = 0
+        self.segmentedView.reloadData()
+        self.pagingView.reloadData()
+    }
+    
     lazy var avatarButton: UIButton = {
         let avatarButton = UIButton(type: UIButton.ButtonType.custom)
         avatarButton.setImage(kImage(name: "default_avatar"), for: UIControl.State.normal)
@@ -118,4 +148,145 @@ class CircleViewController: BaseViewController {
         navigationBgView.alpha = 0
         return navigationBgView
     }()
+    
+    //1.初始化JXSegmentedView
+    lazy var segmentedView: JXSegmentedView = {
+        let segmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: CGFloat(JXHeightForHeaderInSection)))
+        segmentedView.delegate = self
+        segmentedView.dataSource = segmentedDataSource
+        segmentedView.contentScrollView = pagingView.listContainerView.collectionView
+        segmentedView.contentEdgeInsetLeft = 14
+        segmentedView.contentEdgeInsetRight = 14
+        return segmentedView
+    }()
+    
+    //2.初始化dataSource
+    lazy var segmentedDataSource: JXSegmentedTitleDataSource = {
+        let segmentedDataSource = JXSegmentedTitleDataSource()
+        segmentedDataSource.isTitleColorGradientEnabled = true
+        segmentedDataSource.isItemSpacingAverageEnabled = false
+        segmentedDataSource.isTitleZoomEnabled = true
+        segmentedDataSource.titleNormalColor = k999999Color
+        segmentedDataSource.titleSelectedColor = k333333Color
+        segmentedDataSource.titleNormalFont = kMediumFont18!
+        segmentedDataSource.titleSelectedFont = kMediumFont18
+        segmentedDataSource.titleSelectedZoomScale = 1.0
+        segmentedDataSource.itemSpacing = 30
+        
+        //reloadData(selectedIndex:)方法一定要调用,方法内部会刷新数据源数组
+        segmentedDataSource.reloadData(selectedIndex: 0)
+        return segmentedDataSource
+    }()
+    //3.初始化指示器indicator
+    lazy var indicator: JXSegmentedIndicatorLineView = {
+        let indicator = JXSegmentedIndicatorLineView()
+        indicator.indicatorColor = kThemeColor
+        indicator.indicatorHeight = 3
+        indicator.indicatorWidth = 14
+        indicator.verticalOffset = 5
+        return indicator
+    }()
+    
+    //4.pagingView
+    lazy var pagingView: JXPagingView = {
+        let pagingView = JXPagingView(delegate: self)
+        pagingView.frame = self.view.frame
+        return pagingView
+    }()
+    // 5.头部headerView
+    lazy var circleContainerView: UIView = {
+        let circleContainerView = UIView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: CGFloat(JXTableHeaderViewHeight)))
+        return circleContainerView
+    }()
+    
+    /// 6.包含头部
+    lazy var circleHeaderView: CircleHeaderView = {
+        var circleHeaderView =  CircleHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: CGFloat(JXTableHeaderViewHeight)))
+        return circleHeaderView
+    }()
+    
+    override func viewDidLayoutSubviews() {
+        super.viewDidLayoutSubviews()
+        pagingView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenHeight)
+        
+    }
+}
+
+extension CircleViewController : JXSegmentedViewDelegate {
+    //点击选中或者滚动选中都会调用该方法。适用于只关心选中事件,而不关心具体是点击还是滚动选中的情况。
+    func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
+//        self.otherPersonalCenterVCType = index
+    }
+    
+    // 点击选中的情况才会调用该方法
+    func segmentedView(_ segmentedView: JXSegmentedView, didClickSelectedItemAt index: Int) {
+    }
+    
+    // 滚动选中的情况才会调用该方法
+    func segmentedView(_ segmentedView: JXSegmentedView, didScrollSelectedItemAt index: Int) {
+    }
+    
+    // 正在滚动中的回调
+    func segmentedView(_ segmentedView: JXSegmentedView, scrollingFrom leftIndex: Int, to rightIndex: Int, percent: CGFloat) {
+    }
+    
+    /// 是否允许点击选中目标index的item
+    func segmentedView(_ segmentedView: JXSegmentedView, canClickItemAt index: Int) -> Bool {
+        return true
+    }
+}
+
+extension CircleViewController : JXPagingViewDelegate {
+    func tableHeaderViewHeight(in pagingView: JXPagingView) -> Int {
+        return JXTableHeaderViewHeight
+    }
+    
+    func tableHeaderView(in pagingView: JXPagingView) -> UIView {
+        return circleContainerView
+    }
+    
+    func heightForPinSectionHeader(in pagingView: JXPagingView) -> Int {
+        return JXHeightForHeaderInSection
+    }
+    
+    func viewForPinSectionHeader(in pagingView: JXPagingView) -> UIView {
+        pagingView.pinSectionHeaderVerticalOffset = Int(kNavBarTotalHeight)
+        return segmentedView
+    }
+    
+    func numberOfLists(in pagingView: JXPagingView) -> Int {
+        return cmsTemplateTitles.count
+    }
+    
+    func pagingView(_ pagingView: JXPagingView, initListAtIndex index: Int) -> JXPagingViewListViewDelegate {
+        switch index {
+        case 0:
+            let view = CircleEssenceView()
+            return view
+        default:
+            let view = CircleLeavingMessageView()
+            return view
+        }
+    }
+    
+    func mainTableViewDidScroll(_ scrollView: UIScrollView) {
+        circleHeaderView.scrollViewDidScroll(contentOffsetY: scrollView.contentOffset.y)
+        
+        let offsetY = scrollView.contentOffset.y
+        if (offsetY > kSafeStatusBarHeight) {
+            let alpha = (offsetY - kSafeStatusBarHeight) / CGFloat(kNavBarTotalHeight)
+            navigationBar.wr_setBackgroundAlpha(alpha: alpha)
+            avatarButton.alpha = alpha
+            nameButton.alpha = alpha
+            navigationBgView.alpha = alpha
+            circleHeaderView.alpha = 1 - alpha
+            
+        } else {
+            navigationBar.wr_setBackgroundAlpha(alpha: 0)
+            avatarButton.alpha = 0
+            nameButton.alpha = 0
+            navigationBgView.alpha = 0
+            circleHeaderView.alpha = 1
+        }
+    }
 }

+ 68 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleQuestionsAnswers/View/CircleQuestionsAnswersTableViewCell.swift

@@ -0,0 +1,68 @@
+//
+//  CircleQuestionsAnswersTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/15.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CircleQuestionsAnswersTableViewCell: UITableViewCell {
+
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CircleQuestionsAnswersTableViewCell {
+        let ID = "CircleQuestionsAnswersTableViewCell"
+        tableView.register(CircleQuestionsAnswersTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : CircleQuestionsAnswersTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! CircleQuestionsAnswersTableViewCell
+        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 {
+            
+        }
+    }
+    
+    func setupViews() {
+        addSubview(titleLable)
+    }
+    
+    func setupLayouts() {
+        titleLable.snp.makeConstraints { (make) in
+            make.top.equalToSuperview()
+            make.left.equalTo(25)
+            make.right.equalTo(-25)
+            make.height.equalTo(40)
+        }
+    }
+    
+    lazy var titleLable: UILabel = {
+        let titleLable = UILabel()
+        titleLable.backgroundColor = kf7f8faColor
+        titleLable.textColor = k333333Color
+        titleLable.layer.cornerRadius = 20
+        titleLable.layer.masksToBounds = true
+        titleLable.textAlignment = .center
+        return titleLable
+    }()
+    
+    var circleAnswerModel : CircleAnswerModel? {
+        didSet {
+            let num = 65 + (indexPath?.row ?? 0)
+            let ch:Character = Character(UnicodeScalar(num)!)
+            titleLable.text = "\(ch). \(circleAnswerModel?.text ?? "")"
+        }
+    }
+
+}

+ 116 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleQuestionsAnswers/ViewController/CircleQuestionsAnswersViewController.swift

@@ -0,0 +1,116 @@
+//
+//  CircleQuestionsAnswersViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/15.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CircleQuestionsAnswersViewController: BaseViewController {
+    
+    var circleId : Int?
+    var communityCircleQuestionsAnswersModel : CommunityCircleQuestionsAnswersModel?
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        setupData()
+        // Do any additional setup after loading the view.
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "加入小组测试题"
+        navigationBar.addSubview(subtitleLabel)
+        view.addSubview(tableView)
+        
+    }
+    
+    override func setupLayouts() {
+        navigationBar.titleLabel.snp.remakeConstraints { (make) in
+            make.top.equalTo(kSafeStatusBarHeight + 4)
+            make.centerX.equalToSuperview()
+        }
+        subtitleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(navigationBar.titleLabel.snp.bottom)
+            make.centerX.equalToSuperview()
+        }
+    }
+    
+    override func setupData() {
+        communityCircleQuestionApi()
+    }
+    
+    lazy var subtitleLabel : UILabel = {
+        let subtitleLabel = UILabel()
+        subtitleLabel.textColor = kbbbbbbColor
+        subtitleLabel.font = kRegularFont11
+        subtitleLabel.text = "今日剩余 0 次答题机会"
+        return subtitleLabel
+    }()
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect(x: 0, y: kNavBarTotalHeight, width: kScreenWidth, height: kScreenHeight - kNavBarTotalHeight - 76 - kSafeTabBarHeight), style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = UIColor.white
+        tableView.dataSource = self
+        tableView.delegate = self
+        return tableView
+    }()
+    
+    func communityCircleQuestionApi() {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleQuestionApi(circleId: circleId ?? 0, completion: {
+            [weak self] (communityCircleQuestionsAnswersModel) -> (Void) in
+            self?.communityCircleQuestionsAnswersModel = communityCircleQuestionsAnswersModel as? CommunityCircleQuestionsAnswersModel
+            self?.subtitleLabel.text = "今日剩余 \( self?.communityCircleQuestionsAnswersModel?.answerCount ?? 0) 次答题机会"
+            self?.tableView.reloadData()
+        }) { (loadingStatus) in
+            
+        }
+    }
+    
+}
+
+extension CircleQuestionsAnswersViewController : UITableViewDelegate, UITableViewDataSource {
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return communityCircleQuestionsAnswersModel?.joinQuestion?.count ?? 0
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return communityCircleQuestionsAnswersModel?.joinQuestion?[section].answer?.count ?? 0
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        
+        let cell = CircleQuestionsAnswersTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+        cell.circleAnswerModel = communityCircleQuestionsAnswersModel?.joinQuestion?[indexPath.section].answer?[indexPath.row]
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        if ((communityCircleQuestionsAnswersModel?.joinQuestion?[indexPath.section].answer?.count ?? 1) - 1) == indexPath.row {
+            return 45
+        }else {
+            return 50
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+}
+

+ 257 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleShareContent/CircleShareContentViewController.swift

@@ -0,0 +1,257 @@
+//
+//  CircleShareContentViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/15.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import EFQRCode
+import Kingfisher
+
+class CircleShareContentViewController: BaseViewController {
+
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+        KingfisherManager.shared.cache.clearDiskCache()
+        KingfisherManager.shared.cache.clearMemoryCache()
+    }
+    
+    var imgUrl : String?
+    var circleNameStr : String = ""
+    var H5UrlStr : String? = "https://h5.uptoyo.com/download"
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        setupData()
+    }
+    
+    override func setupViews() {
+        
+        statusBarStyle = .lightContent
+        navigationBar.barBackgroundColor = UIColor.black
+        navigationBar.title = "分享动态卡片"
+        navigationBar.titleLabelColor = kffffffColor
+        navigationBar.wr_setLeftButton(image: kImage(name: "navbar_back_white")!)
+        view.addSubview(shareCommunityContentView)
+        view.addSubview(scrollView)
+        scrollView.addSubview(bgImageView)
+        scrollView.addSubview(bgView)
+        bgView.addSubview(logoImageView)
+        bgView.addSubview(circleLabel)
+        bgView.addSubview(titleLabel)
+        bgView.addSubview(lineLable)
+        bgView.addSubview(avatarImageView)
+        bgView.addSubview(nameLable)
+        scrollView.addSubview(lineImageView)
+        scrollView.addSubview(QRCodeImageView)
+        scrollView.addSubview(nickLable)
+        scrollView.addSubview(scanLabel)
+        
+    }
+    
+    override func setupLayouts() {
+        bgImageView.snp.makeConstraints { (make) in
+            make.centerX.equalTo(scrollView)
+            make.top.equalTo(scrollView.snp.top)
+            make.width.equalTo(kScreenWidth)
+            make.height.equalTo(481*kScaleWidth)
+        }
+        bgView.snp.makeConstraints { (make) in
+            make.centerX.equalTo(scrollView)
+            make.top.equalTo(scrollView.snp.top)
+            make.width.equalTo(kScreenWidth)
+            make.height.equalTo(481*kScaleWidth)
+        }
+        logoImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(30*kScaleWidth)
+            make.left.equalTo(27*kScaleWidth)
+        }
+        circleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(logoImageView.snp.bottom).offset(56*kScaleWidth)
+            make.left.equalTo(27*kScaleWidth)
+            make.right.equalTo(-14*kScaleWidth)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(circleLabel.snp.bottom).offset(10*kScaleWidth)
+            make.left.equalTo(27*kScaleWidth)
+            make.right.equalTo(-27*kScaleWidth)
+        }
+        lineLable.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp.bottom).offset(30*kScaleWidth)
+            make.left.equalTo(27*kScaleWidth)
+            make.height.equalTo(1)
+            make.width.equalTo(20*kScaleWidth)
+        }
+        avatarImageView.snp.makeConstraints { (make) in
+            make.centerY.equalTo(lineLable)
+            make.size.equalTo(20*kScaleWidth)
+            make.left.equalTo(lineLable.snp.right).offset(5*kScaleWidth)
+        }
+        nameLable.snp.makeConstraints { (make) in
+            make.centerY.equalTo(lineLable)
+            make.left.equalTo(avatarImageView.snp.right).offset(5*kScaleWidth)
+        }
+        lineImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(bgView.snp.bottom).offset(10*kScaleWidth)
+            make.centerX.equalToSuperview()
+        }
+        QRCodeImageView.snp.makeConstraints { (make) in
+            make.left.equalTo(27*kScaleWidth)
+            make.top.equalTo(lineImageView.snp.bottom).offset(40*kScaleWidth)
+            make.size.equalTo(90*kScaleWidth)
+        }
+        nickLable.snp.makeConstraints { (make) in
+            make.top.equalTo(QRCodeImageView).offset(7*kScaleWidth)
+            make.centerX.equalTo(scanLabel)
+            make.height.equalTo(25*kScaleWidth)
+        }
+        scanLabel.snp.makeConstraints { (make) in
+            make.bottom.equalTo(QRCodeImageView).offset(-7*kScaleWidth)
+            make.height.equalTo(34*kScaleWidth)
+            make.left.equalTo(QRCodeImageView.snp.right).offset(23*kScaleWidth)
+            make.width.equalTo(210*kScaleWidth)
+        }
+    }
+    
+    override func setupData() {
+        circleLabel.text = "我已加入由你国风“\(circleNameStr)”"
+        titleLabel.text = "提问互动,精华讨论, \n和更多同好伙伴交流互动尽在这里!"
+        nameLable.text = UserModel.shared().getModel()?.username ?? ""
+        
+        if let cgImage = EFQRCode.generate(content: H5UrlStr ?? "") {
+            QRCodeImageView.image = UIImage(cgImage: cgImage)
+        }
+        scanLabel.text = "扫码查看内容  开启国风之旅"
+        
+        avatarImageView.kf.setImage(with: kURLImage(name:  UserModel.shared().getModel()?.avatarurl ?? ""), placeholder:  kImage(name: "default_pic"), completionHandler: { [weak self] (result) in
+            switch result {
+            case .success(_) :
+                self?.bgImageView.kf.setImage(with: kURLThumbnailsImage(name: self?.imgUrl ?? "",size: CGSize(width: kScreenWidth, height: 481*kScaleWidth)), placeholder:  kImage(name: "default_pic"), completionHandler: { [weak self] (result) in
+                    switch result {
+                    case .success(_):
+                        self?.scrollView.swContentCapture {
+                            [weak self] (image) in
+                            self?.shareCommunityContentView.image = image
+                        }
+                        break
+                    case .failure(_):
+                        self?.shareCommunityContentView.image = kImage(name: "default_pic")
+                        break
+                    }
+                })
+                break
+            case  .failure(_) :
+                self?.shareCommunityContentView.image = kImage(name: "default_pic")
+                break
+            }
+        })
+    }
+    
+    lazy var scrollView : UIScrollView = {
+        let scrollView = UIScrollView(frame: CGRect(x: 0, y: kNavBarTotalHeight, width: kScreenWidth, height: kScreenHeight-kNavBarTotalHeight-152))
+        scrollView.contentSize = CGSize(width: kScreenWidth, height: 667*kScaleWidth)
+        scrollView.backgroundColor = UIColor(patternImage: kImage(name: "chat_pic_bg")!)
+        
+        return scrollView
+    }()
+    
+    lazy var bgImageView: UIImageView = {
+        let bgImageView = UIImageView()
+        bgImageView.isUserInteractionEnabled = true
+        bgImageView.contentMode = .scaleAspectFill
+        bgImageView.clipsToBounds = true
+        return bgImageView
+    }()
+    
+    lazy var bgView: UIView = {
+        let bgView = UIView()
+        bgView.backgroundColor = UIColor(hexString: "000000", alpha: 0.2)
+        bgView.isUserInteractionEnabled = true
+        return bgView
+    }()
+    
+    lazy var logoImageView: UIImageView = {
+        let logoImageView = UIImageView()
+        logoImageView.image = kImage(name: "posters_pic_logo")
+        logoImageView.isUserInteractionEnabled = true
+        return logoImageView
+    }()
+    
+    lazy var circleLabel: UILabel = {
+        let circleLabel = UILabel()
+        circleLabel.textColor = kffffffColor
+        circleLabel.font = kMediumFont18
+        return circleLabel
+    }()
+    
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = kffffffColor
+        titleLabel.font = kRegularFont14
+        titleLabel.numberOfLines = 2
+        titleLabel.text = "提问互动,精华讨论, \n和更多同好伙伴交流"
+        return titleLabel
+    }()
+    
+    lazy var lineLable: UILabel = {
+        let lineLable = UILabel()
+        lineLable.backgroundColor = UIColor.white
+        return lineLable
+    }()
+    
+    lazy var avatarImageView: UIImageView = {
+        let avatarImageView = UIImageView()
+        avatarImageView.cornerRadius = 10 * kScaleWidth
+        avatarImageView.masksToBounds = true
+        avatarImageView.isUserInteractionEnabled = true
+        return avatarImageView
+    }()
+    
+    lazy var nameLable: UILabel = {
+        let nameLable = UILabel()
+        nameLable.textColor = kffffffColor
+        nameLable.font = kRegularFont12
+        return nameLable
+    }()
+    
+    lazy var lineImageView: UIImageView = {
+        let lineImageView = UIImageView()
+        lineImageView.image = kImage(name: "posters_pic_text")
+        lineImageView.isUserInteractionEnabled = true
+        return lineImageView
+    }()
+    
+    lazy var QRCodeImageView: UIImageView = {
+        let QRCodeImageView = UIImageView()
+        QRCodeImageView.isUserInteractionEnabled = true
+        return QRCodeImageView
+    }()
+    
+    lazy var nickLable: UILabel = {
+        let nickLable = UILabel()
+        nickLable.textColor = k333333Color
+        nickLable.font = kMediumFont18
+        nickLable.text = "国风价值·由你创造"
+        return nickLable
+    }()
+    
+    lazy var scanLabel: UILabel = {
+        let scanLabel = UILabel()
+        scanLabel.textColor = kffffffColor
+        scanLabel.font = kMediumFont14
+        scanLabel.backgroundColor = kThemeColor
+        scanLabel.cornerRadius = 34/2 * kScaleWidth
+        scanLabel.masksToBounds = true
+        scanLabel.textAlignment = .center
+        return scanLabel
+    }()
+    
+    lazy var shareCommunityContentView: ShareCommunityContentView = {
+        let shareCommunityContentView = ShareCommunityContentView(frame: CGRect(x: 0, y: kScreenHeight - 157, width: kScreenWidth, height: 157))
+        return shareCommunityContentView
+    }()
+}

+ 49 - 1
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaNetWorkServiceCommunity.swift

@@ -581,7 +581,7 @@ public class SwiftMoyaNetWorkServiceCommunity: NSObject {
         })
     }
     
-    
+    // MARK: - 圈子详情
     /// 圈子详情
     ///
     /// - Parameters:
@@ -597,4 +597,52 @@ public class SwiftMoyaNetWorkServiceCommunity: NSObject {
              fail(loadingStatus)
         }
     }
+    
+    // MARK: - 加入圈子
+    /// 加入圈子
+    ///
+    /// - Parameters:
+    ///   - id: 圈子Id
+    ///   - completion: 完成
+    func communityCircleJoinPostApi(circleId:Int,answer:String? = nil,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(circleId, forKey: "id")
+        if answer != nil {
+            parameters.updateValue(answer as Any, forKey: "answer")
+        }
+        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCircleJoinPost(parameters: parameters)), completion: { (_) in
+            completion("")
+        }) { (loadingStatus) in}
+    }
+    
+    // MARK: - 退出圈子
+    /// 退出圈子
+    ///
+    /// - Parameters:
+    ///   - circleId: 圈子Id
+    ///   - completion: 完成
+    func communityCircleJoinDeleteApi(circleId:Int,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(circleId, forKey: "id")
+        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCircleJoinDelete(parameters: parameters)), completion: { (_) in
+            completion("")
+        }) { (loadingStatus) in}
+    }
+    
+    // MARK: - 圈子进入问题
+    /// 圈子进入问题
+    ///
+    /// - Parameters:
+    ///   - id: 圈子Id
+    ///   - completion: 完成
+    ///   - fail: 失败
+    func communityCircleQuestionApi(circleId:Int,completion: @escaping successCallBack,fail: @escaping failCallback) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(circleId, forKey: "id")
+        SwiftMoyaNetWorkManager.shared.requestObject(CommunityCircleQuestionsAnswersModel.self, target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCircleQuestion(parameters: parameters)), completion: { (communityCircleQuestionsAnswersModel) in
+            completion(communityCircleQuestionsAnswersModel)
+        }) { (loadingStatus) in
+            fail(loadingStatus)
+        }
+    }
 }

+ 40 - 6
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift

@@ -120,6 +120,15 @@ public let kCommunityCateMusicListApi = "/community/music"
 /// 圈子详情
 public let kCommunityCircleApi = "/community/circle"
 
+// MARK: - 加入圈子 / 退出圈子
+/// 加入圈子 / 退出圈子
+public let kCommunityCircleJoinApi = "/community/circle/join"
+
+// MARK: - 圈子进入问题
+/// 圈子进入问题
+public let kCommunityCircleQuestionApi = "/community/circle/question"
+
+
 /// 社区
 ///
 /// - communityTopicCategory: 话题组列表
@@ -149,6 +158,9 @@ public let kCommunityCircleApi = "/community/circle"
 /// - communityGetMusicCategory : 获取音乐分类
 /// - communityCateMusicList : 获取分类下所有音乐
 /// - communityCircle : 圈子详情
+/// - communityCircleJoinPost : 加入圈子
+/// - communityCircleJoinDelete : 退出圈子
+/// - communityCircleQuestion : 圈子进入问题
 
 
 public enum SwiftMoyaServiceCommunityApi {
@@ -180,6 +192,10 @@ public enum SwiftMoyaServiceCommunityApi {
     case communityGetMusicCategory(parameters:Dictionary<String, Any>)
     case communityCateMusicList(parameters:Dictionary<String, Any>)
     case communityCircle(parameters:Dictionary<String, Any>)
+    case communityCircleJoinPost(parameters:Dictionary<String, Any>)
+    case communityCircleJoinDelete(parameters:Dictionary<String, Any>)
+    case communityCircleQuestion(parameters:Dictionary<String, Any>)
+    
 }
 
 extension SwiftMoyaServiceCommunityApi: TargetType {
@@ -213,7 +229,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityRecMusicList,
              .communityGetMusicCategory,
              .communityCateMusicList,
-             .communityCircle
+             .communityCircle,
+             .communityCircleJoinPost,
+             .communityCircleJoinDelete,
+             .communityCircleQuestion
             :
             return URL(string: kApiDataPrefix())!
         }
@@ -277,6 +296,12 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
             return kCommunityCateMusicListApi
         case .communityCircle:
             return kCommunityCircleApi
+        case .communityCircleJoinPost:
+            return kCommunityCircleJoinApi
+        case .communityCircleJoinDelete:
+            return kCommunityCircleJoinApi
+        case .communityCircleQuestion:
+            return kCommunityCircleQuestionApi
         }
     }
     
@@ -286,7 +311,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityPublish,
              .communityMemberFollowTopicFollow,
              .communityPostComment,
-             .communityUploadMusic
+             .communityUploadMusic,
+             .communityCircleJoinPost
             :
             return .post
         case .communityTopicCategory,
@@ -308,12 +334,14 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityRecMusicList,
              .communityGetMusicCategory,
              .communityCateMusicList,
-             .communityCircle
+             .communityCircle,
+             .communityCircleQuestion
             :
             return .get
         case .communityMemberFollowTopicCancelFollow,
              .communityDelete,
-             .communityPostDeleteComment
+             .communityPostDeleteComment,
+             .communityCircleJoinDelete
             :
             return .delete
 
@@ -350,7 +378,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityRecMusicList(var parameters),
              .communityGetMusicCategory(var parameters),
              .communityCateMusicList(var parameters),
-             .communityCircle(var parameters)
+             .communityCircle(var parameters),
+             .communityCircleJoinPost(var parameters),
+             .communityCircleJoinDelete(var parameters),
+             .communityCircleQuestion(var parameters)
             :
             let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
             parameters.updateValue(sign, forKey: "sign")
@@ -400,7 +431,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityRecMusicList,
              .communityGetMusicCategory,
              .communityCateMusicList,
-             .communityCircle
+             .communityCircle,
+             .communityCircleJoinPost,
+             .communityCircleJoinDelete,
+             .communityCircleQuestion
             :
             return (headerParameters(headerType: .tokenHeader) as! [String : String])
         }

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

@@ -919,5 +919,18 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
             completion("")
         }) { (loadingStatus) in}
     }
+    
+    /// 检测聊天室是否有效
+    ///
+    /// - Parameter completion: 回调
+    func userChatroomValidRoomApi(ChatroomId:String,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(ChatroomId, forKey: "id")
+        SwiftMoyaNetWorkManager.shared.requestAny(target:  MultiTarget(SwiftMoyaServiceUserApi.userChatroomValidRoom(parameters: parameters)), completion: { _ in
+            completion("")
+        }) { (loadingStatus) in}
+    }
+    
+    
 
 }

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

@@ -173,6 +173,10 @@ public let kUserPushConfigApi = "/user/push_config"
 /// 修改push配置信息
 public let kUserChangePushConfigApi = "/user/push_config"
 
+// MARK: - 检测聊天室是否有效
+/// 检测聊天室是否有效
+public let kUserChatroomValidRoomApi = "/user/v3/chatroom/validroom"
+
 
 /// 用户
 ///
@@ -217,6 +221,8 @@ public let kUserChangePushConfigApi = "/user/push_config"
 /// - userMemberBlackList: 拉黑(屏蔽)
 /// - userPushConfig: push配置信息
 /// - userChangePushConfig: 修改push配置信息
+/// - userChatroomValidRoom: 检测聊天室是否有效
+
 public enum SwiftMoyaServiceUserApi {
     case userLogout(parameters:Dictionary<String, Any>)
     case userRefresh(parameters:Dictionary<String, Any>)
@@ -259,6 +265,7 @@ public enum SwiftMoyaServiceUserApi {
     case userMemberBlackList(parameters:Dictionary<String, Any>)
     case userPushConfig(parameters:Dictionary<String, Any>)
     case userChangePushConfig(parameters:Dictionary<String, Any>)
+    case userChatroomValidRoom(parameters:Dictionary<String, Any>)
     
 }
 
@@ -306,7 +313,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userMemberReport,
              .userMemberBlackList,
              .userPushConfig,
-             .userChangePushConfig
+             .userChangePushConfig,
+             .userChatroomValidRoom
             :
             return URL(string: kApiDataPrefix())!
         }
@@ -396,6 +404,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
             return kUserPushConfigApi
         case .userChangePushConfig:
             return kUserChangePushConfigApi
+        case .userChatroomValidRoom:
+            return kUserChatroomValidRoomApi
         }
         
     }
@@ -444,7 +454,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userMemberMessageList,
              .userMemberSearchMember,
              .userMemberGetTotalBean,
-             .userPushConfig
+             .userPushConfig,
+             .userChatroomValidRoom
             :
             return .get
         case .userAddressDelete,
@@ -499,7 +510,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userMemberReport(var parameters),
              .userMemberBlackList(var parameters),
              .userPushConfig(var parameters),
-             .userChangePushConfig(var parameters)
+             .userChangePushConfig(var parameters),
+             .userChatroomValidRoom(var parameters)
             :
             let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
             parameters.updateValue(sign, forKey: "sign")
@@ -561,7 +573,8 @@ extension SwiftMoyaServiceUserApi: TargetType {
              .userMemberReport,
              .userMemberBlackList,
              .userPushConfig,
-             .userChangePushConfig
+             .userChangePushConfig,
+             .userChatroomValidRoom
             :
             return (headerParameters(headerType: .tokenHeader) as! [String : String])
         case .userLogout,

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

@@ -10,15 +10,15 @@ import Foundation
 
 /// Service
 let kPersonalService = false
-let kDevelopSever = false
+let kDevelopSever = true
 let kBetaSever = false
-let kProductSever = true
+let kProductSever = false
 
 /// H5Service
 let kH5PersonalService = false
-let kH5DevelopSever = false
+let kH5DevelopSever = true
 let kH5BetaSever = false
-let kH5ProductSever = true
+let kH5ProductSever = false
 
 // MARK: - 数据服务器
 public func kApiDataPrefix() -> String {