南鑫林 5 anni fa
parent
commit
22a1407bb6

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

@@ -435,6 +435,7 @@
 		A7F3069122E1698400DC7917 /* json_Image_0.png in Resources */ = {isa = PBXBuildFile; fileRef = A7F3069022E1698400DC7917 /* json_Image_0.png */; };
 		A7F3069422E16A5B00DC7917 /* MineRouterModuleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F3069322E16A5B00DC7917 /* MineRouterModuleType.swift */; };
 		A7F3069722E1AE9600DC7917 /* MessageModuleManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F3069622E1AE9600DC7917 /* MessageModuleManager.swift */; };
+		A7F3069922E1C72D00DC7917 /* json_Image_1.png in Resources */ = {isa = PBXBuildFile; fileRef = A7F3069822E1C72D00DC7917 /* json_Image_1.png */; };
 		A7FF1555228AC27600A85748 /* ProductAllCommentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1554228AC27600A85748 /* ProductAllCommentView.swift */; };
 		A7FF1557228AC3E800A85748 /* ProductAllCommentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1556228AC3E800A85748 /* ProductAllCommentViewController.swift */; };
 		A7FF1560228C693D00A85748 /* OrderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF155F228C693D00A85748 /* OrderViewController.swift */; };
@@ -1157,6 +1158,7 @@
 		A7F3069022E1698400DC7917 /* json_Image_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = json_Image_0.png; sourceTree = "<group>"; };
 		A7F3069322E16A5B00DC7917 /* MineRouterModuleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineRouterModuleType.swift; sourceTree = "<group>"; };
 		A7F3069622E1AE9600DC7917 /* MessageModuleManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageModuleManager.swift; sourceTree = "<group>"; };
+		A7F3069822E1C72D00DC7917 /* json_Image_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = json_Image_1.png; sourceTree = "<group>"; };
 		A7FF1554228AC27600A85748 /* ProductAllCommentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductAllCommentView.swift; sourceTree = "<group>"; };
 		A7FF1556228AC3E800A85748 /* ProductAllCommentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductAllCommentViewController.swift; sourceTree = "<group>"; };
 		A7FF155F228C693D00A85748 /* OrderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderViewController.swift; sourceTree = "<group>"; };
@@ -4453,6 +4455,7 @@
 			isa = PBXGroup;
 			children = (
 				A7F3069022E1698400DC7917 /* json_Image_0.png */,
+				A7F3069822E1C72D00DC7917 /* json_Image_1.png */,
 			);
 			path = JSONImages;
 			sourceTree = "<group>";
@@ -5900,6 +5903,7 @@
 				A7BF202722B3930100396DB3 /* MessageModule.xcassets in Resources */,
 				BDD54A2B22C31D78005BBE19 /* filter in Resources */,
 				BD108C9A22A60C3300837DAB /* HGImage.xcassets in Resources */,
+				A7F3069922E1C72D00DC7917 /* json_Image_1.png in Resources */,
 				A729B5AA2266F6FD004AE098 /* Launch Screen.storyboard in Resources */,
 				BD24FABB22B509CF00C7AA3B /* PublishModule.xcassets in Resources */,
 			);

+ 0 - 1
RainbowPlanet/RainbowPlanet/Model/UserModel/UserModel.swift

@@ -158,7 +158,6 @@ public class UserModel : NSObject, NSCoding, Mappable{
         var model = UserModel()
         if modelData != nil {
             model = NSKeyedUnarchiver.unarchiveObject(with: modelData!) as! UserModel
-            NXLLog("UserModel读取成功")
         }
         return model
     }

+ 26 - 3
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/Controller/CommunityRecommendController.swift

@@ -39,12 +39,13 @@ class CommunityRecommendController: BaseViewController {
     var heightModel1 = HeightModel()
     /// 最后滚动的位置
     var lastContentOffset : CGFloat = 0
+    
+    var emptyView : DIYEmptyView?
 
     
     override func viewDidLoad() {
         super.viewDidLoad()
         setupViews()
-        setupLayouts()
         setupData()
     }
     
@@ -54,14 +55,29 @@ class CommunityRecommendController: BaseViewController {
         navigationBar.addSubview(avatarButton)
         navigationBar.addSubview(nameButton)
         navigationBar.addSubview(followButton)
-        navigationBar.wr_setRightButton(image: kImage(name: "nav_share_black")!)
         view.addSubview(commentView)
         view.addSubview(tableView)
         view.addSubview(sharedButton)
+        emptyView = DIYEmptyView.emptyActionView(withImageStr: "default_page_content", titleStr: nil, detailStr: "内容飞走了, 去看看别的吧", btnTitleStr: "去首页") {
+            [weak self] in
+            self?.tabBarController?.selectedIndex = 0
+            self?.navigationController?.popToRootViewController(animated: true)
+        }
+        emptyView?.actionBtnHorizontalMargin = 58
+        emptyView?.contentViewY = kScaleValue(value: 164 + kNavBarTotalHeight)
+        emptyView?.subViewMargin = 20
+        emptyView?.actionBtnFont = kBoldFont16
+        emptyView?.actionBtnHeight = 32
+        emptyView?.actionBtnCornerRadius = 32/2
+        emptyView?.actionBtnTitleColor = kffffffColor
+        emptyView?.actionBtnBackGroundColor = kThemeColor
+        self.view.ly_emptyView = emptyView
+        self.view.ly_showEmpty()
 
     }
     
     override func setupLayouts() {
+        navigationBar.wr_setRightButton(image: kImage(name: "nav_share_black")!)
 
         avatarButton.snp.makeConstraints { (make) in
             make.left.equalTo(navigationBar.leftButton.snp_right)
@@ -318,6 +334,7 @@ extension CommunityRecommendController {
     /// 帖子内容
     func communityPostDetailApi() {
         SwiftMoyaNetWorkServiceCommunity.shared().communityPostDetailApi(id: id) { [weak self] (communityPostDetailModel) -> (Void) in
+            self?.view.ly_hideEmpty()
             self?.communityPostDetailModel = communityPostDetailModel as? CommunityPostDetailModel
             self?.communityPostsApi(page:1)
             self?.avatarButton.kf.setImage(with: kURLImage(name: self?.communityPostDetailModel?.avatar ?? ""), for: UIControl.State.normal, placeholder: kImage(name: "default_avatar"))
@@ -343,7 +360,12 @@ extension CommunityRecommendController {
                 if !(self?.communityPostDetailModel?.imgs?.isEmpty ?? true) {
                     let height = getImageHeight(imgStr: (self?.communityPostDetailModel?.imgs?[0])!)
                     let width = getImageWidth(imgStr: (self?.communityPostDetailModel?.imgs?[0])!)
-                    self?.communityPostDetailTableViewHeaderView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenWidth*height/width)
+                    let scaleHeight = kScreenWidth*height/width
+                    if scaleHeight >= (500 * kScaleWidth) {
+                        self?.communityPostDetailTableViewHeaderView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: 500 * kScaleWidth)
+                    }else {
+                        self?.communityPostDetailTableViewHeaderView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenWidth*height/width)
+                    }
                     self?.communityPostDetailTableViewHeaderView.tableView = self?.tableView
                     self?.tableView.tableHeaderView = self?.communityPostDetailTableViewHeaderView
 
@@ -360,6 +382,7 @@ extension CommunityRecommendController {
                 self?.communityPostDetailTableViewHeaderView.communityPostDetailModel = self?.communityPostDetailModel
 
             }
+            self?.setupLayouts()
             
             self?.tableView.reloadData()
             self?.readVirueRecordAddApi()

+ 6 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/CommunityPostDetailTableViewHeaderView.swift

@@ -82,7 +82,12 @@ extension CommunityPostDetailTableViewHeaderView:FSPagerViewDataSource,FSPagerVi
         let cell  = CommunityPostDetailFSPagerViewCell.cellWith(collectionView: pagerView, index: index)
         let height = getImageHeight(imgStr: imgs[index])
         let width = getImageWidth(imgStr: imgs[index])
-        cell.size = CGSize(width: kScreenWidth, height: kScreenWidth*height/width)
+        let scaleHeight = kScreenWidth*height/width
+        if scaleHeight >= (500 * kScaleWidth) {
+            cell.size = CGSize(width: kScreenWidth, height: 500 * kScaleWidth)
+        }else {
+            cell.size = CGSize(width: kScreenWidth, height: kScreenWidth*height/width)
+        }
         cell.img = imgs[index]
         return cell
     }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageMain/View/MessageHomeTwoCollectionViewCell.swift

@@ -127,9 +127,9 @@ class MessageHomeTwoCollectionViewCell: UICollectionViewCell {
             }else if messageModel?.isYes == 1 {
                 dotLabel.isHidden = false
             }
-            subLabel.text = messageModel?.view?.content
+            subLabel.text = messageModel?.view?.title
             timeLabel.text = messageModel?.view?.createdAt
-            if messageModel?.view?.content == nil || messageModel?.view?.content == "" {
+            if messageModel?.view?.title == nil || messageModel?.view?.title == "" {
                 titleLabel.snp.remakeConstraints { (make) in
                     make.centerY.equalToSuperview()
                     make.left.equalTo(iconImageView.snp_right).offset(8)

+ 4 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/ViewController/MyFollowAndFanViewController.swift

@@ -63,7 +63,10 @@ class MyFollowAndFanViewController: BaseViewController {
             tableView.tableHeaderView = fanHeaderView
             emptyView = DIYEmptyView.emptyActionView(withImageStr: "default_page_fans", titleStr: nil, detailStr: "发布动态,让更多人去认识你", btnTitleStr: "发布动态") {
                 [weak self] in
-                self?.tabBarController?.selectedIndex = 2
+                
+                let pickVc = PublishViewController()
+                let nav = BaseNavigationViewController.init(rootViewController: pickVc)
+                self?.tabBarController?.present(nav, animated: true, completion: nil)
                 self?.navigationController?.popToRootViewController(animated: false)
                 
             }

File diff suppressed because it is too large
+ 1 - 1
RainbowPlanet/RainbowPlanet/Src/AnimationJSON/JSON/communityModuleTabbar.json


BIN
RainbowPlanet/RainbowPlanet/Src/AnimationJSON/JSONImages/json_Image_1.png


+ 2 - 2
RainbowPlanet/RainbowPlanet/Supporting Files/Info.plist

@@ -20,7 +20,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>0.2.4</string>
+	<string>1.0.0</string>
 	<key>CFBundleURLTypes</key>
 	<array>
 		<dict>
@@ -75,7 +75,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>0</string>
+	<string>1</string>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>wechat</string>