Browse Source

内容选择话题,从最多5个 改为最多2个,应用端发布页面的(0/5)改成(0/2),后端也需要限制

南鑫林 5 years ago
parent
commit
ad6cec99d4

+ 4 - 4
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/Controller/PublishAddTopicController.swift

@@ -133,8 +133,8 @@ extension PublishAddTopicController : UITableViewDelegate, UITableViewDataSource
     func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         let selTopicMdl: CommunityTopicDataModel = topicListModels[indexPath.row]
         
-        if selTopicModelArr!.count >= 5 && selTopicMdl.isSelected == false {
-            SwiftProgressHUD.shared().showText("最多只能选择5个话题")
+        if selTopicModelArr!.count >= 2 && selTopicMdl.isSelected == false {
+            SwiftProgressHUD.shared().showText("最多只能选择2个话题")
             return
         }
         
@@ -273,10 +273,10 @@ extension PublishAddTopicController {
     func updateFinishButtonStatus() {
         let selCount = selTopicModelArr!.count
         if selCount == 0 {
-            navigationBar.wr_setRightButton(title: "完成(\(selCount)/5)", titleColor: k999999Color)
+            navigationBar.wr_setRightButton(title: "完成(\(selCount)/2)", titleColor: k999999Color)
             navigationBar.rightButton.isUserInteractionEnabled = false
         } else {
-            navigationBar.wr_setRightButton(title: "完成(\(selCount)/5)", titleColor: kThemeColor)
+            navigationBar.wr_setRightButton(title: "完成(\(selCount)/2)", titleColor: kThemeColor)
             navigationBar.rightButton.isUserInteractionEnabled = true
         }
     }