소스 검색

no message

HF_Q 4 년 전
부모
커밋
8083e21ba6
53개의 변경된 파일3051개의 추가작업 그리고 1494개의 파일을 삭제
  1. 36 0
      smartRhino.xcodeproj/project.pbxproj
  2. BIN
      smartRhino.xcworkspace/xcuserdata/niuzhen.xcuserdatad/UserInterfaceState.xcuserstate
  3. 0 16
      smartRhino.xcworkspace/xcuserdata/niuzhen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 6 1
      smartRhino/AppConfig.h
  5. 22 0
      smartRhino/Assets.xcassets/首页/mail_clear_Icon.imageset/Contents.json
  6. BIN
      smartRhino/Assets.xcassets/首页/mail_clear_Icon.imageset/mail_clear_Icon@2x.png
  7. BIN
      smartRhino/Assets.xcassets/首页/mail_clear_Icon.imageset/mail_clear_Icon@3x.png
  8. 4 0
      smartRhino/FwzAppConfig.h
  9. 4 1
      smartRhino/PhbAppConfig.h
  10. 17 15
      smartRhino/Project/Base/SubClass/Controller/SearchBaseVC.m
  11. 7 6
      smartRhino/Project/Base/SubClass/Controller/SearchCell.m
  12. 20 14
      smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/Controller/ChatTestingVC.m
  13. 1 1
      smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/Model/TestinModel.h
  14. 58 32
      smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/View/TestinCell.xib
  15. 25 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailAddUserSearch.h
  16. 218 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailAddUserSearch.m
  17. 19 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailEditVC.h
  18. 169 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailEditVC.m
  19. 19 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupListSerachVC.h
  20. 152 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupListSerachVC.m
  21. 18 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupListVC.h
  22. 185 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupListVC.m
  23. 20 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupVC.h
  24. 452 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupVC.m
  25. 29 45
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListByZuVC.m
  26. 1 1
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListDetailVC.h
  27. 148 112
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListDetailVC.m
  28. 5 1
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListMoveVC.h
  29. 46 4
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListMoveVC.m
  30. 322 169
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListVC.m
  31. 18 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailVerifyVC.h
  32. 80 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailVerifyVC.m
  33. 490 664
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/MailList.storyboard
  34. 37 0
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Model/MailModel.h
  35. 5 5
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListByZuCell.xib
  36. 2 2
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListCell.h
  37. 0 7
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListCell.m
  38. 2 2
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListCell.xib
  39. 3 1
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListDetailCell.h
  40. 18 1
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListDetailCell.m
  41. 45 4
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListDetailCell.xib
  42. 55 31
      smartRhino/Project/VCModel/ChatMessage/Controller/MyTDGroup/VC/MyTDGroupViewController.m
  43. 27 10
      smartRhino/Project/VCModel/ChatMessage/Controller/TDInternalLeter/contoller/TDInterLeterHomeViewController.m
  44. 1 1
      smartRhino/Project/VCModel/Home/OtherHomeVC/MyTDTopic/VC/MyTDTopicCreateVC.m
  45. 79 65
      smartRhino/Project/VCModel/Home/OtherHomeVC/MyTDTopic/VC/MyTDTopicDetailVC.m
  46. 33 22
      smartRhino/Project/VCModel/My_Center/Controller/ColletionVC/Cell/MyFavoriteCell.xib
  47. 2 82
      smartRhino/Project/VCModel/My_Center/Controller/NoteBook/Controller/NoteBookVC.m
  48. 1 0
      smartRhino/Project/VCModel/My_Center/Controller/NoteBook/Model/MyNoteBookModel.h
  49. 81 82
      smartRhino/Project/VCModel/common/Controller/CommonHomeVC.m
  50. 51 93
      smartRhino/Project/VCModel/common/Controller/CommonNoteVC.m
  51. 1 0
      smartRhino/Project/VCModel/common/View/CommonListCell.h
  52. 7 0
      smartRhino/Project/VCModel/common/View/CommonListCell.m
  53. 10 4
      smartRhino/Project/VCModel/common/View/CommonListCell.xib

+ 36 - 0
smartRhino.xcodeproj/project.pbxproj

@@ -844,6 +844,12 @@
 		EB44409624A1F5D200B2E212 /* IndexViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB44409524A1F5D200B2E212 /* IndexViewController.m */; };
 		EB44409A24A1FF7400B2E212 /* HomeRecommendVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB44409924A1FF7400B2E212 /* HomeRecommendVC.m */; };
 		EB44409D24A2110D00B2E212 /* HomeBigshotVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB44409C24A2110D00B2E212 /* HomeBigshotVC.m */; };
+		EB4B652524C003050041A82C /* MailAddUserSearch.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4B652424C003050041A82C /* MailAddUserSearch.m */; };
+		EB4B652824C01DCE0041A82C /* MailVerifyVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4B652724C01DCE0041A82C /* MailVerifyVC.m */; };
+		EB4B652B24C04DED0041A82C /* MailEditVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4B652A24C04DED0041A82C /* MailEditVC.m */; };
+		EB4B652E24C196920041A82C /* MailGroupVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4B652D24C196920041A82C /* MailGroupVC.m */; };
+		EB4B653124C19A060041A82C /* MailGroupListVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4B653024C19A060041A82C /* MailGroupListVC.m */; };
+		EB4B653424C19E4B0041A82C /* MailGroupListSerachVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4B653324C19E4B0041A82C /* MailGroupListSerachVC.m */; };
 		EB4ECF12241101A000B60F05 /* CountDataVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4ECF11241101A000B60F05 /* CountDataVC.m */; };
 		EB50DAE223C8967400A14FED /* ReadListVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB50DAE123C8967400A14FED /* ReadListVC.m */; };
 		EB52714E2428555C00B37D2A /* TDInterLeterSearchVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EB52714D2428555C00B37D2A /* TDInterLeterSearchVC.m */; };
@@ -2851,6 +2857,18 @@
 		EB44409924A1FF7400B2E212 /* HomeRecommendVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeRecommendVC.m; sourceTree = "<group>"; };
 		EB44409B24A2110D00B2E212 /* HomeBigshotVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeBigshotVC.h; sourceTree = "<group>"; };
 		EB44409C24A2110D00B2E212 /* HomeBigshotVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeBigshotVC.m; sourceTree = "<group>"; };
+		EB4B652324C003040041A82C /* MailAddUserSearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MailAddUserSearch.h; sourceTree = "<group>"; };
+		EB4B652424C003050041A82C /* MailAddUserSearch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MailAddUserSearch.m; sourceTree = "<group>"; };
+		EB4B652624C01DCE0041A82C /* MailVerifyVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MailVerifyVC.h; sourceTree = "<group>"; };
+		EB4B652724C01DCE0041A82C /* MailVerifyVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MailVerifyVC.m; sourceTree = "<group>"; };
+		EB4B652924C04DED0041A82C /* MailEditVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MailEditVC.h; sourceTree = "<group>"; };
+		EB4B652A24C04DED0041A82C /* MailEditVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MailEditVC.m; sourceTree = "<group>"; };
+		EB4B652C24C196920041A82C /* MailGroupVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MailGroupVC.h; sourceTree = "<group>"; };
+		EB4B652D24C196920041A82C /* MailGroupVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MailGroupVC.m; sourceTree = "<group>"; };
+		EB4B652F24C19A060041A82C /* MailGroupListVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MailGroupListVC.h; sourceTree = "<group>"; };
+		EB4B653024C19A060041A82C /* MailGroupListVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MailGroupListVC.m; sourceTree = "<group>"; };
+		EB4B653224C19E4B0041A82C /* MailGroupListSerachVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MailGroupListSerachVC.h; sourceTree = "<group>"; };
+		EB4B653324C19E4B0041A82C /* MailGroupListSerachVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MailGroupListSerachVC.m; sourceTree = "<group>"; };
 		EB4ECF10241101A000B60F05 /* CountDataVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CountDataVC.h; sourceTree = "<group>"; };
 		EB4ECF11241101A000B60F05 /* CountDataVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CountDataVC.m; sourceTree = "<group>"; };
 		EB50DAE023C8967400A14FED /* ReadListVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReadListVC.h; sourceTree = "<group>"; };
@@ -4364,16 +4382,28 @@
 				EB9BBE4C23D1A5D400436A0E /* MailListMoveVC.m */,
 				EB9BBE4E23D1BF1A00436A0E /* MailListSearchVC.h */,
 				EB9BBE4F23D1BF1A00436A0E /* MailListSearchVC.m */,
+				EB4B652324C003040041A82C /* MailAddUserSearch.h */,
+				EB4B652424C003050041A82C /* MailAddUserSearch.m */,
+				EB4B652624C01DCE0041A82C /* MailVerifyVC.h */,
+				EB4B652724C01DCE0041A82C /* MailVerifyVC.m */,
 				EB0BDF4B244D49F1009F6434 /* MailListSortVC.h */,
 				EB0BDF4C244D49F1009F6434 /* MailListSortVC.m */,
 				C622159A2372C0F9006F5D7F /* MailListVC.h */,
 				C622159B2372C0F9006F5D7F /* MailListVC.m */,
+				EB4B652924C04DED0041A82C /* MailEditVC.h */,
+				EB4B652A24C04DED0041A82C /* MailEditVC.m */,
 				EB3DCA50245552AE000A0189 /* ShareCusVC.h */,
 				EB3DCA51245552AE000A0189 /* ShareCusVC.m */,
 				EB3DCA4524551B0E000A0189 /* ShareListVC.h */,
 				EB3DCA4624551B0E000A0189 /* ShareListVC.m */,
 				EB3DCA4D24555299000A0189 /* ShareSysVC.h */,
 				EB3DCA4E24555299000A0189 /* ShareSysVC.m */,
+				EB4B652C24C196920041A82C /* MailGroupVC.h */,
+				EB4B652D24C196920041A82C /* MailGroupVC.m */,
+				EB4B652F24C19A060041A82C /* MailGroupListVC.h */,
+				EB4B653024C19A060041A82C /* MailGroupListVC.m */,
+				EB4B653224C19E4B0041A82C /* MailGroupListSerachVC.h */,
+				EB4B653324C19E4B0041A82C /* MailGroupListSerachVC.m */,
 			);
 			path = Controller;
 			sourceTree = "<group>";
@@ -9399,6 +9429,7 @@
 				EB8E2CF9239666A900CDFBDA /* UIImage+MWPhotoBrowser.m in Sources */,
 				C76CC9D723BC9C7A003B23DC /* MeetingRecordJoinCell.m in Sources */,
 				C59D0A412382468A007D0760 /* JSONKeyMapper.m in Sources */,
+				EB4B652524C003050041A82C /* MailAddUserSearch.m in Sources */,
 				EB2E470623A48BAB00CAF0D3 /* TDQrJoinVC.m in Sources */,
 				C7B8646B23C9CE810090F2A3 /* SwipeTableCell.m in Sources */,
 				C7743F8723A86A8600973D70 /* WorkFlowHomeListController.m in Sources */,
@@ -9432,6 +9463,7 @@
 				EB85BF4A243DB566006C7A82 /* ChatMsgPersonInfoVC.m in Sources */,
 				C7819D5D23B0597500300297 /* TimeSourceModel.m in Sources */,
 				C78373FB23AA287C0096AFE2 /* FecordJoinWorkFlowListController.m in Sources */,
+				EB4B653124C19A060041A82C /* MailGroupListVC.m in Sources */,
 				EB0A7399247BA42500DB75CB /* BookBillModel.m in Sources */,
 				EBB6888423C9E4DD00E24DD9 /* RichModel.m in Sources */,
 				C72351C12382907B0037E4F6 /* NSImage+WebCache.m in Sources */,
@@ -9563,6 +9595,7 @@
 				EBE1E2B724947E0800DB80BF /* HomeBigshotCollectCell.m in Sources */,
 				EBAACA902406475100F44B67 /* ShowBtn.m in Sources */,
 				C74BCC80238FB69B00169982 /* VersionDataModel.m in Sources */,
+				EB4B652824C01DCE0041A82C /* MailVerifyVC.m in Sources */,
 				EBCE637024AF281A004C9B3B /* BookChanelRightModel.m in Sources */,
 				C72F3900236DADDC00933828 /* MyAboutVC.m in Sources */,
 				C62270A5236C09FC00E2E3BF /* DGThumbUpButton.m in Sources */,
@@ -9657,6 +9690,7 @@
 				C751012C2383A02F00E4429B /* FormFields.m in Sources */,
 				C59D0C0923825DE1007D0760 /* UIImageView+YYWebImage.m in Sources */,
 				C625AA82236FBF670010E967 /* YCMenuView.m in Sources */,
+				EB4B652B24C04DED0041A82C /* MailEditVC.m in Sources */,
 				C69A8DD32373C2C00098FA26 /* SearchBarDisplayCenter.m in Sources */,
 				C74BCC7C238FA1FF00169982 /* UILabel+RightAndLeft.m in Sources */,
 				EBFFE22924234238008D4312 /* OtherFavoriteVC.m in Sources */,
@@ -9882,6 +9916,7 @@
 				EBB6887123C9C0C300E24DD9 /* MMRichTitleModel.m in Sources */,
 				EB44408724A1CA5E00B2E212 /* HomeSubModel.m in Sources */,
 				EBF2D54B23C2E76600EC35C4 /* MHTopicCell.m in Sources */,
+				EB4B652E24C196920041A82C /* MailGroupVC.m in Sources */,
 				C6F2E1B1236D1214009E6903 /* ToolFoundation.m in Sources */,
 				EB952681248A0BA6003EFCCE /* DCPageBottomView.m in Sources */,
 				EBFA5EEE2491FCC400AD38B0 /* ReplayMeSearchVC.m in Sources */,
@@ -9947,6 +9982,7 @@
 				C7D6BBAC235DA18A00770E7C /* NavigationController.m in Sources */,
 				C79C6D3B23BF16C500BE4156 /* MeetingDetailsTimeCell.m in Sources */,
 				C625AA95236FD1A90010E967 /* ChatMsgSearchHistoryCell.m in Sources */,
+				EB4B653424C19E4B0041A82C /* MailGroupListSerachVC.m in Sources */,
 				3220A0C223CC7F34005A347C /* shoujianrenResultView.m in Sources */,
 				EB92E88D23B09AD5008E94CF /* NSDate+GFCalendar.m in Sources */,
 				3264781F23BDB47E00E0DC2D /* ChatMsgNoticeDetailVC.m in Sources */,

BIN
smartRhino.xcworkspace/xcuserdata/niuzhen.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 16
smartRhino.xcworkspace/xcuserdata/niuzhen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -39,21 +39,5 @@
             breakpointStackSelectionBehavior = "1">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "B9A73A46-B795-4CAB-BFA1-FFA1BF094C6E"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "smartRhino/Project/VCModel/ChatMessage/Controller/MyTDGroup/VC/MyTDGroupViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "157"
-            endingLineNumber = "157"
-            landmarkName = "-addNavbarView"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 6 - 1
smartRhino/AppConfig.h

@@ -244,7 +244,12 @@ return;\
 #define DRAWERPUSHVC             @"DRAWERPUSHVC"
 #define VCINDEX                  @"VCINDEX"
 
-#define  AddressBookGroup_Search_Post @"/api/app/user/search"
+#define  AddressBookGroup_Search_Post       @"/api/app/user/search"
+/// 查找好友
+#define  API_APP_User_Find_friends          @"/api/app/user/find-friends/"
+/// 添加好友
+#define  API_APP_Admin_Verify_Add_Friend    @"/api/app/admin-verify/add-friend"
+
 
 #define  API_APP_User_User_Uread_Count @"/api/app/user/user-uread-count"
 

+ 22 - 0
smartRhino/Assets.xcassets/首页/mail_clear_Icon.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "mail_clear_Icon@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "mail_clear_Icon@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
smartRhino/Assets.xcassets/首页/mail_clear_Icon.imageset/mail_clear_Icon@2x.png


BIN
smartRhino/Assets.xcassets/首页/mail_clear_Icon.imageset/mail_clear_Icon@3x.png


+ 4 - 0
smartRhino/FwzAppConfig.h

@@ -70,6 +70,8 @@ typedef enum CreateFileFolderType {
     CreateGroupType = 7,
     ///8会议
     CreateMeetingType = 8,
+    ///收件箱
+    CreateShouType = 800,
 }CreateFileFolderType;
 
 
@@ -389,6 +391,8 @@ typedef enum HistorySearchType {
     HistorySearchType_Work = 10,
     ///文件夹
     HistorySearchType_FileJia = 11,
+    ///联系人
+    HistorySearchType_User = 12,
 }HistorySearchType;
 
 /// 书城

+ 4 - 1
smartRhino/PhbAppConfig.h

@@ -88,6 +88,9 @@
 /// 文件夹置顶 通知
 #define API_Find_Top @"/api/app/middle/"
 
+#define API_APP_Note_Top   @"/api/app/note/"
+
+#define API_APP_Collection_Top  @"/api/app/collection/"
 /// 文件夹删除记录  文件夹类型 1 通知 2话题 3 收藏 4笔记 5 普通站内信 6匿名站内信 10聊天 //{"MiddleIds": [ 0 ],"FolderType": 0}
 #define API_Find_DeleteRecord @"/api/app/middle/delete"
 
@@ -163,7 +166,7 @@
 
 
 #define API_DeleteCustomSection @"/api/app/address-book-group-user/delete"
-
+#define API_APP_User_Friends    @"/api/app/user/friends"
 
 
 #define API_Notice_Detail @"/api/app/notice/app-detail/"

+ 17 - 15
smartRhino/Project/Base/SubClass/Controller/SearchBaseVC.m

@@ -196,7 +196,10 @@
 - (UICollectionView *)collectionView
 {
     if (!_collectionView) {
-        _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:[[UICollectionViewFlowLayout alloc] init]];
+        UICollectionViewFlowLayout * layout = [[UICollectionViewFlowLayout alloc]init];
+        layout.scrollDirection = UICollectionViewScrollDirectionVertical;
+        layout.sectionInset = UIEdgeInsetsMake(0, 15, 15, 15);
+        _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
         [_collectionView registerClass:[SearchCell class] forCellWithReuseIdentifier:@"cellId"];
     }
     return _collectionView;
@@ -386,7 +389,13 @@
 }
 
 -(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
-    return CGSizeMake(SCREEN_WIDTH, 40);
+    NSString * name = [self.dataDistoryArray objectAtIndex:indexPath.row];
+    UILabel * label = [UILabel new];
+    label.text = name;
+    label.font = Kfont(13);
+    CGFloat W = [label sizeThatFits:CGSizeMake(MAXFLOAT, 25)].width;
+    return CGSizeMake(W + 22, 25);
+
 }
 
 - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
@@ -406,23 +415,17 @@
     return CGSizeMake(SCREEN_WIDTH, 44);
 }
 
-//设置每个item的UIEdgeInsets
-- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
-{
-    return UIEdgeInsetsMake(0, 0, 0, 0);
-}
-
 //设置每个item水平间距
 - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
 {
-    return 0.f;
+    return 10.f;
 }
 
 
 //设置每个item垂直间距
 - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section
 {
-    return 0.f;
+    return 10.f;
 }
 
 - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {
@@ -435,7 +438,7 @@
             make.centerY.equalTo(headerView);
             make.left.equalTo(@(15));
         }];
-        label.text = @"搜索历史";
+        label.text = @"最近搜索";
         label.font = [UIFont systemFontOfSize:16];
         label.textColor = UIColorHex(#333333);
         
@@ -445,9 +448,7 @@
             make.centerY.equalTo(headerView);
             make.right.equalTo(@(-15));
         }];
-        [closeBtn setTitle:@"清空" forState:UIControlStateNormal];
-        [closeBtn setTitleColor:UIColorHex(#278BDD) forState:UIControlStateNormal];
-        closeBtn.titleLabel.font = [UIFont systemFontOfSize:14];
+        [closeBtn setImage:IMG(@"mail_clear_Icon") forState:UIControlStateNormal];
         WS(weakSelf);
         [closeBtn setAction:^{
             [weakSelf.dataDistoryArray removeAllObjects];
@@ -466,9 +467,11 @@
 }
 - (void)selectIndexText:(NSString *)text
 {
+    self.topNavSearch.searchBar.text = text;
     self.searchText = text;
     self.tableView.hidden = NO;
     self.collectionView.hidden = YES;
+    [self checkRepeatString:text];
     [self.view endEditing:YES];
     if (self.searchBlock) {
         self.searchBlock(text);
@@ -496,7 +499,6 @@
     if (searchBar.text.length > 0) {
         [self selectIndexText:searchBar.text];
         [self checkRepeatString:searchBar.text];
-//        [self showCancelBtn];
     }
 }
 - (void)textDidChange:(NSString *)text {

+ 7 - 6
smartRhino/Project/Base/SubClass/Controller/SearchCell.m

@@ -13,12 +13,13 @@
     self = [super initWithFrame:frame];
     if (self) {
         [self.contentView addSubview:self.titleL];
-        self.contentView.backgroundColor = [UIColor whiteColor];
+        self.contentView.backgroundColor = UIColorHex(#F5F5F5);
+        self.contentView.layer.cornerRadius = 4.f;
+        self.contentView.layer.masksToBounds = YES;
         [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.left.mas_offset(15);
-            make.right.mas_offset(-15);
-            make.centerY.mas_equalTo(self.contentView);
+            make.edges.mas_offset(UIEdgeInsetsZero);
         }];
+        self.titleL.textAlignment = NSTextAlignmentCenter;
     }
     return self;
 }
@@ -26,8 +27,8 @@
 {
     if (!_titleL) {
         _titleL = [UILabel new];
-        _titleL.font = [UIFont systemFontOfSize:12];
-        _titleL.textColor = UIColorHex(#999999);
+        _titleL.font = [UIFont systemFontOfSize:13];
+        _titleL.textColor = UIColorHex(#858585);
     }
     return _titleL;
 }

+ 20 - 14
smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/Controller/ChatTestingVC.m

@@ -115,17 +115,18 @@
 }
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    TestinModel *model = self.testInArray[indexPath.row];
-    switch (model.DisposeType) {
-        case 0: {
-            return 98.f;
-        }
-            break;
-        default:{
-            return  121.f;
-        }
-            break;
-    }
+//    TestinModel *model = self.testInArray[indexPath.row];
+//    switch (model.DisposeType) {
+//        case 0: {
+//            return 98.f;
+//        }
+//            break;
+//        default:{
+//            return  121.f;
+//        }
+//            break;
+//    }
+    return UITableViewAutomaticDimension;
 }
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
     WS(weakSelf);
@@ -136,11 +137,16 @@
             TestinCell *cell = [TestinCell configCell1:tableView indexPath:indexPath];
             [cell.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.AvatarUrl] placeholderImage:kUserDefaultHeadImage];
             cell.nameLable.text = model.Name;
-            cell.applyLabel.text = model.SourceType == 1 ? @"申请加入:" : @"邀请加入:";
             cell.timeLabel.text = [self setTime:model.CreatedDate];
             [cell.applyButton setTitle:model.SourceName forState:UIControlStateNormal];
-                       
-             WS(weakSelf);
+            if (model.VerifyType == 4) {
+                cell.applyLabel.text = @"申请好友";
+                cell.testLabel.text = @"验证消息:";
+                cell.testInfolabel.text = model.Remark;
+            }else{
+                cell.applyLabel.text = model.SourceType == 1 ? @"申请加入:" : @"邀请加入:";
+            }
+            WS(weakSelf);
             [cell.refuseButton setAction:^{
                 NSLog(@"拒绝加入");
                 [weakSelf disAggree:indexPath];

+ 1 - 1
smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/Model/TestinModel.h

@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
 @interface TestinModel : BaseModel
 /// 文件夹ID
 @property (nonatomic,assign) NSInteger  Id;
-///  VerifyType  类型 1 单聊 2群聊 3小组
+///  VerifyType  类型 1 单聊 2群聊 3小组4好友
 @property (nonatomic,assign) NSInteger VerifyType;
 ///  DisposeType 未处理 0   同意 1  拒绝 2
 @property (nonatomic,assign) NSInteger DisposeType;

+ 58 - 32
smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/View/TestinCell.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -24,7 +24,7 @@
                             <constraint firstAttribute="width" constant="40" id="SlX-2T-VXb"/>
                         </constraints>
                     </imageView>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="周新民" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ohS-Ru-rHs">
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="253" text="周新民" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ohS-Ru-rHs">
                         <rect key="frame" x="65" y="15" width="52" height="21"/>
                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
                         <color key="textColor" red="0.039215686274509803" green="0.039215686274509803" blue="0.039215686274509803" alpha="1" colorSpace="calibratedRGB"/>
@@ -36,39 +36,42 @@
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="11-07  14:22" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cDR-b9-AMF">
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="11-07  14:22" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cDR-b9-AMF">
                         <rect key="frame" x="65" y="43.5" width="75" height="16"/>
                         <fontDescription key="fontDescription" type="system" pointSize="13"/>
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="申请加入:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ygH-kP-tbj">
-                        <rect key="frame" x="65" y="66.5" width="67" height="16"/>
+                        <rect key="frame" x="65" y="66.5" width="67" height="17"/>
                         <fontDescription key="fontDescription" type="system" pointSize="13"/>
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="申请加入:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="78g-N5-lJg">
-                        <rect key="frame" x="65" y="89.5" width="67" height="16"/>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="验证消息:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="78g-N5-lJg">
+                        <rect key="frame" x="65" y="90.5" width="66.5" height="16"/>
+                        <constraints>
+                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="66.5" id="ALZ-tz-lsG"/>
+                        </constraints>
                         <fontDescription key="fontDescription" type="system" pointSize="13"/>
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" contentHorizontalAlignment="leading" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0vg-92-pM5">
-                        <rect key="frame" x="132" y="60.5" width="173" height="28"/>
+                        <rect key="frame" x="132" y="61" width="173" height="28"/>
                         <fontDescription key="fontDescription" type="system" pointSize="13"/>
                         <state key="normal" title="编辑发行讨论组编辑发行讨论组编辑发行讨论组">
                             <color key="titleColor" red="0.12156862745098039" green="0.52941176470588236" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
                         </state>
                     </button>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="广西出版集团-周新民" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1vY-Do-erb">
-                        <rect key="frame" x="132" y="89.5" width="172" height="16"/>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="253" text="广西出版集团-周新民" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1vY-Do-erb">
+                        <rect key="frame" x="131.5" y="90.5" width="172.5" height="16"/>
                         <fontDescription key="fontDescription" type="system" pointSize="13"/>
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NWS-fk-lNx">
-                        <rect key="frame" x="0.0" y="120.5" width="320" height="0.5"/>
+                        <rect key="frame" x="0.0" y="121.5" width="320" height="0.5"/>
                         <color key="backgroundColor" red="0.91764705879999997" green="0.91764705879999997" blue="0.91764705879999997" alpha="1" colorSpace="calibratedRGB"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="0.5" id="Jtw-nT-uWR"/>
@@ -80,21 +83,22 @@
                 </subviews>
                 <constraints>
                     <constraint firstItem="1vY-Do-erb" firstAttribute="leading" secondItem="78g-N5-lJg" secondAttribute="trailing" id="1jd-nX-hhb"/>
-                    <constraint firstItem="NWS-fk-lNx" firstAttribute="top" secondItem="78g-N5-lJg" secondAttribute="bottom" constant="15" id="6Ri-cU-G94"/>
+                    <constraint firstItem="NWS-fk-lNx" firstAttribute="top" secondItem="1vY-Do-erb" secondAttribute="bottom" constant="15" id="6Ri-cU-G94"/>
                     <constraint firstItem="MJ7-Lz-HHG" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="9Eq-I8-fO8"/>
                     <constraint firstItem="1gB-l6-5lO" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="17" id="FR0-Gu-NEi"/>
                     <constraint firstItem="cDR-b9-AMF" firstAttribute="leading" secondItem="ohS-Ru-rHs" secondAttribute="leading" id="GEq-yP-5PQ"/>
                     <constraint firstItem="MJ7-Lz-HHG" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="15" id="Hrt-Gq-mvf"/>
-                    <constraint firstItem="78g-N5-lJg" firstAttribute="leading" secondItem="ygH-kP-tbj" secondAttribute="leading" id="JLL-GW-5qz"/>
+                    <constraint firstItem="78g-N5-lJg" firstAttribute="leading" secondItem="ohS-Ru-rHs" secondAttribute="leading" id="JLL-GW-5qz"/>
                     <constraint firstAttribute="trailing" secondItem="0vg-92-pM5" secondAttribute="trailing" constant="15" id="Kul-Ti-TXd"/>
                     <constraint firstItem="78g-N5-lJg" firstAttribute="top" secondItem="ygH-kP-tbj" secondAttribute="bottom" constant="7" id="P27-oT-hyI"/>
                     <constraint firstAttribute="trailing" secondItem="NWS-fk-lNx" secondAttribute="trailing" id="Pex-wx-sVz"/>
                     <constraint firstItem="ygH-kP-tbj" firstAttribute="top" secondItem="cDR-b9-AMF" secondAttribute="bottom" constant="7" id="RNG-eT-z3u"/>
                     <constraint firstItem="cDR-b9-AMF" firstAttribute="top" secondItem="ohS-Ru-rHs" secondAttribute="bottom" constant="7.5" id="SuG-aT-85m"/>
-                    <constraint firstItem="1vY-Do-erb" firstAttribute="centerY" secondItem="78g-N5-lJg" secondAttribute="centerY" id="WUi-pR-9SZ"/>
-                    <constraint firstItem="ygH-kP-tbj" firstAttribute="leading" secondItem="cDR-b9-AMF" secondAttribute="leading" id="cak-Zu-0gb"/>
+                    <constraint firstItem="ygH-kP-tbj" firstAttribute="leading" secondItem="ohS-Ru-rHs" secondAttribute="leading" id="cak-Zu-0gb"/>
+                    <constraint firstItem="1vY-Do-erb" firstAttribute="top" secondItem="78g-N5-lJg" secondAttribute="top" id="haF-BT-j7m"/>
                     <constraint firstItem="ohS-Ru-rHs" firstAttribute="leading" secondItem="MJ7-Lz-HHG" secondAttribute="trailing" constant="10" id="icB-VS-Y2h"/>
                     <constraint firstItem="0vg-92-pM5" firstAttribute="centerY" secondItem="ygH-kP-tbj" secondAttribute="centerY" id="jzB-hN-eGT"/>
+                    <constraint firstAttribute="bottom" secondItem="NWS-fk-lNx" secondAttribute="bottom" id="lEp-ze-2Z9"/>
                     <constraint firstAttribute="trailing" secondItem="1gB-l6-5lO" secondAttribute="trailing" constant="15" id="m5J-Jh-O5q"/>
                     <constraint firstItem="NWS-fk-lNx" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="rqC-sW-PUx"/>
                     <constraint firstItem="1vY-Do-erb" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="sL3-TS-0Bo"/>
@@ -115,11 +119,11 @@
             </connections>
             <point key="canvasLocation" x="137.68115942028987" y="178.79464285714286"/>
         </tableViewCell>
-        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TestinCell1" rowHeight="96" id="hCE-av-VEu" customClass="TestinCell">
-            <rect key="frame" x="0.0" y="0.0" width="320" height="97"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TestinCell1" rowHeight="137" id="hCE-av-VEu" customClass="TestinCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="138"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hCE-av-VEu" id="TrT-7M-26h">
-                <rect key="frame" x="0.0" y="0.0" width="320" height="97"/>
+                <rect key="frame" x="0.0" y="0.0" width="320" height="138"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhujun2" translatesAutoresizingMaskIntoConstraints="NO" id="VPX-bR-MCy">
@@ -129,26 +133,26 @@
                             <constraint firstAttribute="height" constant="40" id="htX-Y7-bVg"/>
                         </constraints>
                     </imageView>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="253" text="周新民" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vzv-dE-kqd">
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="253" verticalCompressionResistancePriority="752" text="周新民" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vzv-dE-kqd">
                         <rect key="frame" x="65" y="15" width="52" height="21"/>
                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
                         <color key="textColor" red="0.039215686270000001" green="0.039215686270000001" blue="0.039215686270000001" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="11-07  14:22" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qc6-kD-hwb">
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" text="11-07  14:22" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qc6-kD-hwb">
                         <rect key="frame" x="65" y="43.5" width="75" height="16"/>
                         <fontDescription key="fontDescription" type="system" pointSize="13"/>
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="申请加入:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xjt-PZ-B5D">
-                        <rect key="frame" x="65" y="66.5" width="67" height="17"/>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="253" verticalCompressionResistancePriority="749" text="申请加入:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xjt-PZ-B5D">
+                        <rect key="frame" x="65" y="66.5" width="67" height="16"/>
                         <fontDescription key="fontDescription" type="system" pointSize="13"/>
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" contentHorizontalAlignment="leading" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="alc-iZ-vo6">
-                        <rect key="frame" x="132" y="61" width="173" height="28"/>
+                        <rect key="frame" x="132" y="60.5" width="173" height="28"/>
                         <fontDescription key="fontDescription" type="system" pointSize="13"/>
                         <state key="normal" title="编辑发行讨论组编辑发行讨论组编辑发行讨论组">
                             <color key="titleColor" red="0.1215686275" green="0.52941176469999995" blue="0.85882352939999995" alpha="1" colorSpace="calibratedRGB"/>
@@ -162,8 +166,14 @@
                         <rect key="frame" x="263" y="15" width="42" height="22"/>
                         <state key="normal" image="同意"/>
                     </button>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="广西出版集团-周新民" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kgS-7o-9yD">
+                        <rect key="frame" x="131.5" y="89.5" width="173.5" height="33"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                        <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vtA-UI-tlK">
-                        <rect key="frame" x="0.0" y="98.5" width="320" height="0.5"/>
+                        <rect key="frame" x="0.0" y="137.5" width="320" height="0.5"/>
                         <color key="backgroundColor" red="0.91764705879999997" green="0.91764705879999997" blue="0.91764705879999997" alpha="1" colorSpace="calibratedRGB"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="0.5" id="gcf-RI-Oru"/>
@@ -172,11 +182,22 @@
                         <nil key="textColor"/>
                         <nil key="highlightedColor"/>
                     </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="验证消息:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IVa-8y-ZJ7">
+                        <rect key="frame" x="65" y="89.5" width="66.5" height="16"/>
+                        <constraints>
+                            <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="66.5" id="YJl-5V-w47"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                        <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
                 </subviews>
                 <constraints>
                     <constraint firstItem="vtA-UI-tlK" firstAttribute="leading" secondItem="TrT-7M-26h" secondAttribute="leading" id="1at-hN-yfO"/>
+                    <constraint firstItem="IVa-8y-ZJ7" firstAttribute="top" secondItem="Xjt-PZ-B5D" secondAttribute="bottom" constant="7" id="46I-CO-ePq"/>
+                    <constraint firstItem="kgS-7o-9yD" firstAttribute="leading" secondItem="IVa-8y-ZJ7" secondAttribute="trailing" id="4L0-7Q-EwB"/>
+                    <constraint firstAttribute="bottom" secondItem="vtA-UI-tlK" secondAttribute="bottom" id="4zm-ug-mTP"/>
                     <constraint firstItem="Vzv-dE-kqd" firstAttribute="leading" secondItem="VPX-bR-MCy" secondAttribute="trailing" constant="10" id="6Z5-eD-qwa"/>
-                    <constraint firstAttribute="bottomMargin" secondItem="Xjt-PZ-B5D" secondAttribute="bottom" constant="2.5" id="7ar-CX-doX"/>
                     <constraint firstItem="VPX-bR-MCy" firstAttribute="top" secondItem="TrT-7M-26h" secondAttribute="top" constant="15" id="AzN-Gj-5O2"/>
                     <constraint firstItem="alc-iZ-vo6" firstAttribute="leading" secondItem="Xjt-PZ-B5D" secondAttribute="trailing" id="CIm-az-9bJ"/>
                     <constraint firstItem="VPX-bR-MCy" firstAttribute="leading" secondItem="TrT-7M-26h" secondAttribute="leading" constant="15" id="Cxp-kE-b3G"/>
@@ -185,13 +206,16 @@
                     <constraint firstItem="Vzv-dE-kqd" firstAttribute="top" secondItem="TrT-7M-26h" secondAttribute="top" constant="15" id="KDn-Z1-GXU"/>
                     <constraint firstAttribute="trailing" secondItem="qvZ-Xd-yFB" secondAttribute="trailing" constant="15" id="LAu-cB-CA7"/>
                     <constraint firstItem="qvZ-Xd-yFB" firstAttribute="leading" secondItem="W0v-lo-HD9" secondAttribute="trailing" constant="15" id="PUi-Rf-K7r"/>
+                    <constraint firstAttribute="trailing" secondItem="kgS-7o-9yD" secondAttribute="trailing" constant="15" id="StJ-qh-ffw"/>
                     <constraint firstItem="Qc6-kD-hwb" firstAttribute="top" secondItem="Vzv-dE-kqd" secondAttribute="bottom" constant="7.5" id="X9p-sF-mtd"/>
+                    <constraint firstItem="vtA-UI-tlK" firstAttribute="top" secondItem="kgS-7o-9yD" secondAttribute="bottom" constant="15" id="XMl-ZQ-p7s"/>
                     <constraint firstAttribute="trailing" secondItem="alc-iZ-vo6" secondAttribute="trailing" constant="15" id="Xcj-CV-O26"/>
                     <constraint firstItem="alc-iZ-vo6" firstAttribute="centerY" secondItem="Xjt-PZ-B5D" secondAttribute="centerY" id="bbp-Bm-GFv"/>
+                    <constraint firstItem="IVa-8y-ZJ7" firstAttribute="leading" secondItem="Vzv-dE-kqd" secondAttribute="leading" id="cyQ-8x-bVP"/>
                     <constraint firstItem="qvZ-Xd-yFB" firstAttribute="top" secondItem="TrT-7M-26h" secondAttribute="top" constant="15" id="eve-mF-OyX"/>
+                    <constraint firstItem="kgS-7o-9yD" firstAttribute="top" secondItem="IVa-8y-ZJ7" secondAttribute="top" id="gNH-dG-7wc"/>
                     <constraint firstItem="Qc6-kD-hwb" firstAttribute="leading" secondItem="Vzv-dE-kqd" secondAttribute="leading" id="h0P-fS-ArJ"/>
-                    <constraint firstItem="Xjt-PZ-B5D" firstAttribute="leading" secondItem="Qc6-kD-hwb" secondAttribute="leading" id="sur-OJ-KMy"/>
-                    <constraint firstItem="vtA-UI-tlK" firstAttribute="top" secondItem="Xjt-PZ-B5D" secondAttribute="bottom" constant="15" id="tBk-KL-MQR"/>
+                    <constraint firstItem="Xjt-PZ-B5D" firstAttribute="leading" secondItem="Vzv-dE-kqd" secondAttribute="leading" id="sur-OJ-KMy"/>
                     <constraint firstItem="Xjt-PZ-B5D" firstAttribute="top" secondItem="Qc6-kD-hwb" secondAttribute="bottom" constant="7" id="w2B-y1-deD"/>
                 </constraints>
             </tableViewCellContentView>
@@ -203,15 +227,17 @@
                 <outlet property="iconImageView" destination="VPX-bR-MCy" id="hbv-nZ-SuN"/>
                 <outlet property="nameLable" destination="Vzv-dE-kqd" id="6Fx-Nx-vU9"/>
                 <outlet property="refuseButton" destination="W0v-lo-HD9" id="Ky6-K2-ZWf"/>
+                <outlet property="testInfolabel" destination="kgS-7o-9yD" id="I5z-bu-gwY"/>
+                <outlet property="testLabel" destination="IVa-8y-ZJ7" id="CCX-vS-o20"/>
                 <outlet property="timeLabel" destination="Qc6-kD-hwb" id="GE0-rs-R3v"/>
             </connections>
-            <point key="canvasLocation" x="137.68115942028987" y="293.97321428571428"/>
+            <point key="canvasLocation" x="137.68115942028987" y="306.69642857142856"/>
         </tableViewCell>
-        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TestinCell2" rowHeight="101" id="asE-Ol-k5K" customClass="TestinCell">
-            <rect key="frame" x="0.0" y="0.0" width="320" height="99"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TestinCell2" rowHeight="106" id="asE-Ol-k5K" customClass="TestinCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="104"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="asE-Ol-k5K" id="fb1-c5-44i">
-                <rect key="frame" x="0.0" y="0.0" width="320" height="99"/>
+                <rect key="frame" x="0.0" y="0.0" width="320" height="104"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhujun2" translatesAutoresizingMaskIntoConstraints="NO" id="9eR-UD-xOP">
@@ -291,7 +317,7 @@
                 <outlet property="nameLable" destination="LEh-sE-sdF" id="HTx-nq-XIK"/>
                 <outlet property="timeLabel" destination="INH-Me-3lp" id="N2J-hM-6t7"/>
             </connections>
-            <point key="canvasLocation" x="137.68115942028987" y="420.20089285714283"/>
+            <point key="canvasLocation" x="148" y="540"/>
         </tableViewCell>
     </objects>
     <resources>

+ 25 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailAddUserSearch.h

@@ -0,0 +1,25 @@
+//
+//  MailAddUserSearch.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/1/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "SearchBaseVC.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MailAddUserSearch : SearchBaseVC
+@property (nonatomic, assign) BOOL      isCheck;
+@property (nonatomic, assign) BOOL      isShow;
+@property (nonatomic, copy) NSArray *   UserIds;
+@property (nonatomic, assign) BOOL notChangeColor;
+@property (nonatomic, assign) BOOL IsSearchUser;
+@property (nonatomic, assign) NSInteger DepartmentId;
+@property (nonatomic, assign) NSInteger SearchType;///搜索类型 1 部门 2 自建 0全部
+@property (nonatomic, copy) FlowAttachmentsModel *   sendModel;
+@property (assign, nonatomic) BOOL                   isReturn;
+@end
+
+NS_ASSUME_NONNULL_END

+ 218 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailAddUserSearch.m

@@ -0,0 +1,218 @@
+//
+//  MailAddUserSearch.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/1/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "MailAddUserSearch.h"
+#import "MailListByZuCell.h"
+#import "MailListDetailVC.h"
+#import "EMChatViewController.h"
+
+@interface MailAddUserSearch ()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic, copy) NSMutableArray *listArray;
+@end
+
+@implementation MailAddUserSearch
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.fd_prefersNavigationBarHidden = YES;
+    self.view.backgroundColor = RGB(255, 255, 255);
+    self.historySearchType = HistorySearchType_User;
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    if (self.IsAddUser) {
+        [self.cancelBtn setAttributedTitle:[[NSAttributedString alloc] initWithString:@"确定" attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 15],NSForegroundColorAttributeName: UIColorHex(#3979D3)}] forState:UIControlStateNormal];
+        WS(weakSelf);
+        NSMutableArray * array = [NSMutableArray array];
+        [self.cancelBtn setAction:^{
+            for (SelectModel *model in weakSelf.listArray) {
+                if (model.hadSelected) {
+                    [array addObject:model];
+                }
+            }
+            if (array.count > 0) {
+                [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFI_ChaoSongRen object:nil userInfo:@{@"selectPeople":array}];
+                [weakSelf back1];
+            }
+        }];
+    }
+    [self addObserver:self forKeyPath:@"searchText" options:NSKeyValueObservingOptionNew context:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(messageReturnSuccess) name:MESSAGERETURNSUCCESS object:nil];
+}
+- (void)messageReturnSuccess
+{
+    self.isReturn = NO;
+}
+- (void)dealloc
+{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context
+{
+    id obj = [change objectForKey:@"new"];
+    NSString * text = @"";
+    if ([obj isKindOfClass:[NSString class]]) {
+        text = obj;
+    }else{
+        text  = [obj stringValue];
+    }
+    if (text.length > 0) {
+        [self getData:text];
+    }
+}
+- (void)getData:(NSString *)searchKey
+{
+    NSString * url = [NSString stringWithFormat:@"%@%@",Host(API_APP_User_Find_friends),searchKey];
+    NSString * urlHost = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+    WEAKSELF
+    [self.listArray removeAllObjects];
+    [[HttpManager sharedHttpManager] GETWithUrl:urlHost parameters:@{} success:^(id  _Nonnull responseObject) {
+        NSLog(@"%@",responseObject);
+        for (NSDictionary *dic in responseObject) {
+            SelectModel * model = [[SelectModel alloc] initDict:dic];
+            model.SourceId = model.UserId;
+            model.SourceType = 0;
+            model.SourceName = model.UserName;
+            [weakSelf.listArray addObject:model];
+        }
+        dispatch_async(dispatch_get_main_queue(), ^{
+            if (weakSelf.listArray.count > 0) {
+                weakSelf.collectionView.hidden = YES;
+                weakSelf.noDataView.hidden = YES;
+                weakSelf.tableView.hidden = NO;
+                [weakSelf.tableView reloadData];
+            }else{
+                weakSelf.noDataView.hidden = NO;
+                weakSelf.collectionView.hidden = YES;
+                weakSelf.tableView.hidden = YES;
+                weakSelf.noDataL.text = @"暂无用户";
+            }
+        });
+    } failure:^(NSError * _Nonnull error) {
+          SHOWERROR([ZYCTool handerResultData:error])
+          
+    }];
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    return self.listArray.count;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    return [MailListByZuCell configCell2Height];
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    SelectModel * model = [self.listArray objectAtIndex:indexPath.row];
+    if (self.IsAddUser) {
+        if ([self checkSelectArray] == 0) {
+            [self.cancelBtn setAttributedTitle:[[NSAttributedString alloc] initWithString:@"确定" attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 15],NSForegroundColorAttributeName: UIColorHex(#3979D3)}] forState:UIControlStateNormal];
+        }else{
+            [self.cancelBtn setAttributedTitle:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"确定(%ld)",[self checkSelectArray]] attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 15],NSForegroundColorAttributeName: UIColorHex(#3979D3)}] forState:UIControlStateNormal];
+        }
+        MailListByZuCell *cell = [MailListByZuCell configCell1:tableView indexPath:indexPath];
+        cell.cell0TitleLabel.text = model.UserName;
+        cell.cell0DepartMentName.text = @"";
+        cell.selectBtn.selected = model.hadSelected;
+        if (model.IsDisable) {
+            [cell.contentView setBackgroundColor:[UIColor grayColor]];
+            [cell.selectBtn setEnabled:NO];
+        }
+        WS(weakSelf);
+        [cell.selectBtn setAction:^{
+            model.hadSelected = !model.hadSelected;
+            [weakSelf.tableView reloadData];
+            //[weakSelf.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
+        }];
+        [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:model.AvatarUrl] placeholderImage:IMG(@"chatmsg_list_testuser_img")];
+        return cell;
+    }else{
+        MailListByZuCell *cell = [MailListByZuCell configCell2:tableView indexPath:indexPath];
+        cell.cell0TitleLabel.text = model.UserName;
+        cell.cell0DepartMentName.text = model.DepartmentName;
+        [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:model.AvatarUrl] placeholderImage:IMG(@"chatmsg_list_testuser_img")];
+        return cell;
+    }
+}
+- (NSInteger)checkSelectArray
+{
+    NSInteger count = 0;
+    for (SelectModel *model in self.listArray) {
+        if (model.hadSelected) {
+            count ++;
+        }
+    }
+    return count;
+}
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    SelectModel *model = [self.listArray objectAtIndex:indexPath.row];
+    model.SourceName = model.UserName;
+    model.SourceId = model.UserId;
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+
+    if (self.IsAddUser) {
+        model.hadSelected = !model.hadSelected;
+//        [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFI_ApprovalRen object:nil userInfo: [model modelToJSONObject]];
+//        [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFI_ChaoSongRen object:nil userInfo: @{@"selectPeople":@[model]}];
+        [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
+    }else{
+        if (self.isCheck) {
+            SHOWSUCCESS(@"成功")
+            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFI_ApprovalRen object:nil userInfo:[model modelToJSONObject]];
+                [self back1];
+            });
+        }else{
+            if (self.isReturn) {
+                EMConversation *conversation = [[EMClient sharedClient].chatManager getConversation:model.ImId type:EMConversationTypeChat createIfNotExist:YES];
+                //2、再跳转聊天页面
+                EMConversationModel *emModel = [[EMConversationModel alloc] initWithEMModel:conversation];
+                EMChatViewController *controller = [[EMChatViewController alloc] initWithCoversationModel:emModel];
+                controller.toUserId = model.SourceId;
+                emModel.name = model.SourceName ? model.SourceName : model.Phone;
+                controller.sModel = model;
+                controller.ReceiveIcon = model.AvatarUrl;
+                controller.sendModel = self.sendModel;
+                controller.isReturn = self.isReturn;
+                controller.chatType = 1;//单聊
+                [self.navigationController pushViewController:controller animated:YES];
+            }else{
+                MailListDetailVC *vc = [MailListDetailVC initMailListDetailVC];
+                vc.indexId = model.SourceId;
+                vc.isAdd = YES;
+                vc.isReturn = self.isReturn;
+                vc.sendModel = self.sendModel;
+                [self.navigationController pushViewController:vc animated:YES];
+            }
+        }
+    }
+}
+-(void)back1{
+    for (NSInteger i = (self.navigationController.viewControllers.count - 1); i > 0 ;i --) {
+        if ([self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"NextApprovalViewController")]
+            ||[self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"CreateInterLeterVC")]
+            ||[self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"MailListByZuVC")]
+            ||[self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"MyTDTopicCreateVC")]
+            ||[self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"MyTDTopicGroupUserVC")]            
+            ||[self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"MyWorkWordVC")]
+            || [self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"ChatNewRowVC")]
+            || [self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"ChatNewGroupVC")]
+            || [self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"MyFavoriteNewFindVC")]
+            ||[self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"WorkFlowOrderController")]) {
+            [self.navigationController popToViewController:self.navigationController.viewControllers[i] animated:YES];
+            return;
+        }
+    }
+}
+- (NSMutableArray *)listArray{
+    if (!_listArray) {
+        _listArray = [NSMutableArray new];
+    }
+    return _listArray;
+}
+@end

+ 19 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailEditVC.h

@@ -0,0 +1,19 @@
+//
+//  MailEditVC.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/7/16.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MailEditVC : BaseViewController
+@property (strong, nonatomic) NSMutableArray * pinyinArray;
+@property (strong, nonatomic) NSMutableArray * dataArray;
++(MailEditVC *)initMailEditVC;
+@end
+
+NS_ASSUME_NONNULL_END

+ 169 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailEditVC.m

@@ -0,0 +1,169 @@
+//
+//  MailEditVC.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/7/16.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "MailEditVC.h"
+#import "MailListByZuCell.h"
+#import "MailListMoveVC.h"
+
+@interface MailEditVC ()<UITableViewDelegate,UITableViewDataSource>
+@property (weak, nonatomic) IBOutlet UITableView *tableView;
+@property (weak, nonatomic) IBOutlet UIButton *deleteBtn;
+@property (weak, nonatomic) IBOutlet UIButton *moveBtn;
+@property (weak, nonatomic) IBOutlet UIButton *allSelectBtn;
+@property (assign, nonatomic) BOOL             allSelelct;
+@end
+
+@implementation MailEditVC
++(MailEditVC *)initMailEditVC{
+    MailEditVC *controller = [StoryboardManager.shared.mailList instantiateViewControllerWithIdentifier:@"MailEditVC"];
+    return controller;
+}
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.fd_prefersNavigationBarHidden = YES;
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    WS(weakSelf);
+    [self.deleteBtn setAction:^{
+        NSArray * array = [weakSelf checkArray];
+        if (array > 0) {
+            
+        }
+    }];
+    [self.moveBtn setAction:^{
+        NSArray * array = [weakSelf checkArray];
+        if (array > 0) {
+            MailListMoveVC * vc = [MailListMoveVC initMailListMoveVC];
+            vc.selectArray = array;
+            vc.IsRoot = YES;
+            vc.returnBlock = ^{
+                [weakSelf.navigationController popViewControllerAnimated:YES];
+            };
+            [weakSelf.navigationController pushViewController:vc animated:YES];
+        }
+    }];
+    [self.allSelectBtn setAction:^{
+        for (NSArray * array in weakSelf.dataArray) {
+            for (SelectModel * model in array) {
+                model.hadSelected = !weakSelf.allSelelct;
+            }
+        }
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [weakSelf.tableView reloadData];
+        });
+    }];
+}
+- (NSMutableArray *)checkArray
+{
+    NSMutableArray * mArray = [NSMutableArray array];
+    for (NSArray * array in self.dataArray) {
+        for (SelectModel * model in array) {
+            if (model.hadSelected) {
+                [mArray addObject:@(model.Id)];
+            }
+        }
+    }
+    return mArray;
+}
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+    return self.dataArray.count;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    NSArray *array = [self.dataArray objectAtIndex:section];
+    return [array count];
+}
+#pragma mark - section右侧index数组
+-(NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView{
+    return self.pinyinArray;
+}
+//点击右侧索引表项时调用 索引与section的对应关系
+- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index{
+    return index;
+}
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
+    UIView *headerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 30)];
+    [headerView setBackgroundColor:UIColorHex(0xF5F6F8)];
+    UILabel *sectionTitle = [[UILabel alloc] init];
+    [headerView addSubview:sectionTitle];
+    [sectionTitle mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_offset(15);
+        make.centerY.mas_equalTo(headerView);
+    }];
+    sectionTitle.font = [UIFont systemFontOfSize:12];
+    sectionTitle.textColor = RGB(153, 153, 153);
+    sectionTitle.textAlignment = NSTextAlignmentLeft;
+    NSString *returnStr = [self.pinyinArray objectAtIndex:section];
+    sectionTitle.text = returnStr;
+    return headerView;
+}
+ 
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
+    return 30.f;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return [MailListByZuCell configCell0Height];
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    [self checkAllSelect];
+    [self checkSelect];
+    NSArray * array = self.dataArray[indexPath.section];
+    SelectModel * smodel = [array objectAtIndex:indexPath.row];
+    MailListByZuCell *cell = [MailListByZuCell configCell1:tableView indexPath:indexPath];
+    cell.cell0TitleLabel.text = smodel.UserName;
+    [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:smodel.AvatarUrl] placeholderImage:[UIImage imageNamed:@"chatmsg_list_testuser_img"]];
+    [cell.selectBtn setImage:smodel.hadSelected ? IMG(@"sendinfo_yes") : IMG(@"sendinfo_no") forState:UIControlStateNormal];
+    WS(weakSelf);
+    [cell.selectBtn setAction:^{
+        smodel.hadSelected = !smodel.hadSelected;
+        [weakSelf checkSelect];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [tableView reloadRowAtIndexPath:indexPath withRowAnimation:UITableViewRowAnimationAutomatic];
+        });
+    }];
+    return cell;
+}
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    NSArray * array = self.dataArray[indexPath.section];
+    SelectModel * sModel = [array objectAtIndex:indexPath.row];
+    sModel.hadSelected = !sModel.hadSelected;
+    [self checkSelect];
+    [tableView reloadRowAtIndexPath:indexPath withRowAnimation:UITableViewRowAnimationAutomatic];
+}
+- (BOOL)checkAllSelect
+{
+    for (NSArray * array in self.dataArray) {
+        for (SelectModel * model in array) {
+            if (!model.hadSelected) {
+                self.allSelelct = NO;
+                [self.allSelectBtn setTitle:@"全选" forState:UIControlStateNormal];
+                return NO;
+            }
+        }
+    }
+    [self.allSelectBtn setTitle:@"取消全选" forState:UIControlStateNormal];
+    self.allSelelct = YES;
+    return YES;
+}
+- (void)checkSelect
+{
+    for (NSArray * array in self.dataArray) {
+        for (SelectModel * model in array) {
+            if (model.hadSelected) {
+                [self.moveBtn setTitleColor:UIColorHex(0x3979D3) forState:UIControlStateNormal];
+                return;
+            }
+        }
+    }
+    [self.moveBtn setTitleColor:UIColorHex(0xCCCCCC) forState:UIControlStateNormal];
+}
+@end

+ 19 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupListSerachVC.h

@@ -0,0 +1,19 @@
+//
+//  MailGroupListSerachVC.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/1/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "SearchBaseVC.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MailGroupListSerachVC : SearchBaseVC
+@property (nonatomic, assign) NSInteger DepartmentId;
+@property (nonatomic, assign) NSInteger SearchType;///搜索类型 1 部门 2 自建 0全部
+@property (strong,nonatomic) NSArray   * dataArray;
+@end
+
+NS_ASSUME_NONNULL_END

+ 152 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupListSerachVC.m

@@ -0,0 +1,152 @@
+//
+//  MailGroupListSerachVC.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/1/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "MailGroupListSerachVC.h"
+#import "MailListByZuCell.h"
+#import "MailListDetailVC.h"
+#import "EMChatViewController.h"
+#import "TDGroupInfoModel.h"
+
+@interface MailGroupListSerachVC ()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic, copy) NSMutableArray *listArray;
+@end
+
+@implementation MailGroupListSerachVC
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.fd_prefersNavigationBarHidden = YES;
+    self.view.backgroundColor = RGB(255, 255, 255);
+    self.historySearchType = HistorySearchType_User;
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    [self addObserver:self forKeyPath:@"searchText" options:NSKeyValueObservingOptionNew context:nil];
+}
+
+- (void)dealloc
+{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context
+{
+    id obj = [change objectForKey:@"new"];
+    NSString * text = @"";
+    if ([obj isKindOfClass:[NSString class]]) {
+        text = obj;
+    }else{
+        text  = [obj stringValue];
+    }
+    if (text.length > 0) {
+        [self getData:text];
+    }
+}
+- (void)getData:(NSString *)searchKey
+{
+    NSString * url = [NSString stringWithFormat:@"%@%@",Host(API_APP_User_Find_friends),searchKey];
+    NSString * urlHost = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+    WEAKSELF
+    [self.listArray removeAllObjects];
+    [[HttpManager sharedHttpManager] GETWithUrl:urlHost parameters:@{} success:^(id  _Nonnull responseObject) {
+        NSLog(@"%@",responseObject);
+        for (NSDictionary *dic in responseObject) {
+            SelectModel * model = [[SelectModel alloc] initDict:dic];
+            model.SourceId = model.UserId;
+            model.SourceType = 0;
+            model.SourceName = model.UserName;
+            [weakSelf.listArray addObject:model];
+        }
+        dispatch_async(dispatch_get_main_queue(), ^{
+            if (weakSelf.listArray.count > 0) {
+                weakSelf.collectionView.hidden = YES;
+                weakSelf.noDataView.hidden = YES;
+                weakSelf.tableView.hidden = NO;
+                [weakSelf.tableView reloadData];
+            }else{
+                weakSelf.noDataView.hidden = NO;
+                weakSelf.collectionView.hidden = YES;
+                weakSelf.tableView.hidden = YES;
+                weakSelf.noDataL.text = @"暂无用户";
+            }
+        });
+    } failure:^(NSError * _Nonnull error) {
+          SHOWERROR([ZYCTool handerResultData:error])
+          
+    }];
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    return self.listArray.count;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    return [MailListByZuCell configCell2Height];
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    SelectModel * model = [self.listArray objectAtIndex:indexPath.row];
+    if (self.IsAddUser) {
+        if ([self checkSelectArray] == 0) {
+            [self.cancelBtn setAttributedTitle:[[NSAttributedString alloc] initWithString:@"确定" attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 15],NSForegroundColorAttributeName: UIColorHex(#3979D3)}] forState:UIControlStateNormal];
+        }else{
+            [self.cancelBtn setAttributedTitle:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"确定(%ld)",[self checkSelectArray]] attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 15],NSForegroundColorAttributeName: UIColorHex(#3979D3)}] forState:UIControlStateNormal];
+        }
+        MailListByZuCell *cell = [MailListByZuCell configCell1:tableView indexPath:indexPath];
+        cell.cell0TitleLabel.text = model.UserName;
+        cell.cell0DepartMentName.text = @"";
+        cell.selectBtn.selected = model.hadSelected;
+        if (model.IsDisable) {
+            [cell.contentView setBackgroundColor:[UIColor grayColor]];
+            [cell.selectBtn setEnabled:NO];
+        }
+        WS(weakSelf);
+        [cell.selectBtn setAction:^{
+            model.hadSelected = !model.hadSelected;
+            [weakSelf.tableView reloadData];
+            //[weakSelf.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
+        }];
+        [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:model.AvatarUrl] placeholderImage:IMG(@"chatmsg_list_testuser_img")];
+        return cell;
+    }else{
+        MailListByZuCell *cell = [MailListByZuCell configCell2:tableView indexPath:indexPath];
+        cell.cell0TitleLabel.text = model.UserName;
+        cell.cell0DepartMentName.text = model.DepartmentName;
+        [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:model.AvatarUrl] placeholderImage:IMG(@"chatmsg_list_testuser_img")];
+        return cell;
+    }
+}
+- (NSInteger)checkSelectArray
+{
+    NSInteger count = 0;
+    for (SelectModel *model in self.listArray) {
+        if (model.hadSelected) {
+            count ++;
+        }
+    }
+    return count;
+}
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    SelectModel *model = [self.listArray objectAtIndex:indexPath.row];
+    model.SourceName = model.UserName;
+    model.SourceId = model.UserId;
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    MailListDetailVC *vc = [MailListDetailVC initMailListDetailVC];
+    vc.indexId = model.SourceId;
+    vc.isAdd = YES;
+    [self.navigationController pushViewController:vc animated:YES];
+}
+-(void)back1{
+    [self.navigationController popViewControllerAnimated:YES];
+}
+- (NSMutableArray *)listArray{
+    if (!_listArray) {
+        _listArray = [NSMutableArray new];
+    }
+    return _listArray;
+}
+@end

+ 18 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupListVC.h

@@ -0,0 +1,18 @@
+//
+//  MailGroupListVC.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/7/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MailGroupListVC : BaseViewController
+@property (nonatomic, assign) NSInteger   Id;
++(MailGroupListVC *)initMailGroupListVC;
+@end
+
+NS_ASSUME_NONNULL_END

+ 185 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupListVC.m

@@ -0,0 +1,185 @@
+//
+//  MailGroupListVC.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/7/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "MailGroupListVC.h"
+#import "MailListByZuCell.h"
+#import "MyTDGroupView.h"
+#import "MailListSearchVC.h"
+#import "MailListDetailVC.h"
+#import "ChineseString.h"
+#import "TDGroupInfoListModel.h"
+#import "MailGroupListSerachVC.h"
+
+@interface MailGroupListVC ()<UITableViewDelegate,UITableViewDataSource>
+@property (weak, nonatomic) IBOutlet UILabel      *titleL;
+@property (weak, nonatomic) IBOutlet UIView       *HeadView;
+@property (strong,nonatomic)IBOutlet UITableView  *tableView;
+@property (strong, nonatomic) MyTDGroupView       *SearchView;
+@property (strong,nonatomic) NSMutableArray       *pinyinArray;
+@property (strong,nonatomic) NSMutableArray       *nameArray;
+@property (strong,nonatomic) NSMutableArray       *cusNameArray;
+@end
+
+@implementation MailGroupListVC
++(MailGroupListVC *)initMailGroupListVC{
+    MailGroupListVC *controller = [StoryboardManager.shared.mailList instantiateViewControllerWithIdentifier:@"MailGroupListVC"];
+    return controller;
+}
+- (MyTDGroupView *)SearchView
+{
+    if (!_SearchView) {
+        _SearchView = [[MyTDGroupView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 36)];
+    }
+    return _SearchView;
+}
+
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.fd_prefersNavigationBarHidden = YES;
+    self.view.backgroundColor = RGB(255, 255, 255);
+    [self.HeadView addSubview:self.SearchView];
+    [self.SearchView  mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_offset(6);
+        make.left.right.mas_equalTo(self.HeadView);
+        make.height.mas_offset(36);
+    }];
+    WS(weakSelf);
+    [self.SearchView.button setAction:^{
+//        MailGroupListSerachVC *vc = [[MailGroupListSerachVC alloc] init];
+//        [weakSelf.navigationController pushViewController:vc animated:YES];
+    }];
+
+    self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    self.tableView.backgroundColor = [UIColor clearColor];
+
+    [self getData];
+}
+
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+    return  self.pinyinArray.count;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    NSArray *array = [self.cusNameArray objectAtIndex:section];
+    return [array count];
+}
+#pragma mark - section右侧index数组
+-(NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView{
+    return self.pinyinArray;
+}
+//点击右侧索引表项时调用 索引与section的对应关系
+- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index{
+    return index;
+}
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
+    UIView *headerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 30)];
+    [headerView setBackgroundColor:UIColorHex(0xF5F6F8)];
+    UILabel *sectionTitle = [[UILabel alloc] init];
+    [headerView addSubview:sectionTitle];
+    [sectionTitle mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_offset(15);
+        make.centerY.mas_equalTo(headerView);
+    }];
+    sectionTitle.font = [UIFont systemFontOfSize:12];
+    sectionTitle.textColor = RGB(153, 153, 153);
+    sectionTitle.textAlignment = NSTextAlignmentLeft;
+    NSString *returnStr = [self.pinyinArray objectAtIndex:section];
+    sectionTitle.text = returnStr;
+    return headerView;
+}
+ 
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
+    return 30.f;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return [MailListByZuCell configCell0Height];
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    NSArray * array = self.cusNameArray[indexPath.section];
+    TDGroupInfoModel * smodel = [array objectAtIndex:indexPath.row];
+    MailListByZuCell *cell = [MailListByZuCell configCell0:tableView indexPath:indexPath];
+    cell.cell0TitleLabel.text = smodel.Name;
+    [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:smodel.AvatarUrl] placeholderImage:[UIImage imageNamed:@"chatmsg_list_testuser_img"]];
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    NSArray * array = self.cusNameArray[indexPath.section];
+    TDGroupInfoModel * sModel = [array objectAtIndex:indexPath.row];
+    MailListDetailVC * userVC = [MailListDetailVC initMailListDetailVC];
+    userVC.indexId = sModel.UserId;
+    [self.navigationController pushViewController:userVC animated:YES];
+}
+
+- (void)getData{
+    WS(weakSelf);
+    [[HttpManager sharedHttpManager] POSTUrl:Host(APP_Group_Detail) parameters:@{@"GroupId":@(self.Id)} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+        NSLog(@"%@",responseObject);
+        TDGroupInfoListModel *listModel = [TDGroupInfoListModel modelWithDictionary:responseObject];
+        NSMutableArray * array = [NSMutableArray arrayWithArray:listModel.GroupUserListResult];
+        [weakSelf resetDataSource:array];
+    } failure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+- (NSMutableArray *)cusNameArray
+{
+    if (!_cusNameArray) {
+        _cusNameArray = [NSMutableArray array];
+    }
+    return _cusNameArray;
+}
+-(void)resetDataSource:(NSMutableArray *)sArray
+{
+    WS(weakSelf);
+    [self.cusNameArray removeAllObjects];
+    self.pinyinArray = [[NSMutableArray alloc] init];
+    self.nameArray = [[NSMutableArray alloc] init];
+    if (sArray.count > 0) {
+        NSMutableArray *stringsToSort = [[NSMutableArray alloc] init];
+        for(int i = 0;i < [sArray count];i++){
+            TDGroupInfoModel * smodel = [sArray objectAtIndex:i];
+            NSString * str = [NSString stringWithFormat:@"%@UserId%ld",smodel.Name,(long)smodel.UserId];
+            [stringsToSort addObject:str];
+        }
+        self.pinyinArray = [ChineseString IndexArray:stringsToSort];
+        self.nameArray = [ChineseString LetterSortArray:stringsToSort];
+        [self.nameArray enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+            NSMutableArray * subAddArray = [NSMutableArray array];
+            for (NSString * string in obj) {
+                NSInteger  flag = 0;
+                BOOL isAdd = NO;
+                for (NSInteger i = 0; i < sArray.count; i ++) {
+                    TDGroupInfoModel * smodel = [sArray objectAtIndex:i];
+                    if ([string containsString:[NSString stringWithFormat:@"UserId%ld",smodel.UserId]]) {
+                        [subAddArray addObject:smodel];
+                        isAdd = YES;
+                        flag = i;
+                    }
+                }
+            }
+            if (subAddArray.count > 0) {
+                [weakSelf.cusNameArray addObject:subAddArray];
+            }
+        }];
+    }
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [weakSelf.tableView reloadData];
+    });
+}
+@end

+ 20 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupVC.h

@@ -0,0 +1,20 @@
+//
+//  MailGroupVC.h
+//  smartRhino
+//
+//  Created by tederen on 2019/10/31.
+//  Copyright © 2019 tederen. All rights reserved.
+//
+
+#import "BaseViewController.h"
+#import "FlowAttachmentsModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MailGroupVC : BaseViewController
+@property (nonatomic, assign) NSInteger    ParentId;
+@property (nonatomic, copy) NSString       * titleStr;
+@property (assign, nonatomic) CreateFileFolderType   type;
+@end
+
+NS_ASSUME_NONNULL_END

+ 452 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailGroupVC.m

@@ -0,0 +1,452 @@
+//
+//  MailGroupVC.m
+//  smartRhino
+//
+//  Created by tederen on 2019/10/31.
+//  Copyright © 2019 tederen. All rights reserved.
+//
+
+#import "MailGroupVC.h"
+#import "MyTDGroupView.h"
+#import "MailGroupListVC.h"
+#import "ChatNewRowCell.h"
+
+@interface MailGroupVC ()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic, strong) TDTableView *tableView;
+@property (nonatomic, strong) UIView      *CusNavBar;
+@property (nonatomic, strong) UIView      *HeadView;
+@property (nonatomic, strong) UIView      *SortView;
+@property (strong, nonatomic) MyTDGroupView             *SearchView;
+@property (nonatomic, strong) UILabel     *titleL;
+@property (nonatomic, strong) NSMutableArray <NoticeModel*>*dataArray;
+@property (nonatomic, copy) NSArray       *addListArray;
+@property (nonatomic, assign) NSUInteger  currentPage;
+@property (nonatomic, assign) NSUInteger  totalPage;
+@property (nonatomic, assign) NSUInteger  totalRecord;
+@property (nonatomic, assign) BOOL        isFresh;
+@end
+
+@implementation MailGroupVC
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.fd_prefersNavigationBarHidden = YES;
+    [self addNavbarView];
+    [self setTableViewRefresh];
+    [self headRefresh];
+}
+
+- (void)addNavbarView
+{
+
+    [self.view addSubview:self.CusNavBar];
+    [self.CusNavBar mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.left.right.mas_equalTo(self.view);
+        make.height.mas_offset(kNavigationHeight);
+    }];
+//    UILabel * lineL = [UILabel new];
+//    lineL.backgroundColor = LINEBGCOLOR;
+//    [self.CusNavBar addSubview:lineL];
+//    [lineL mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.left.bottom.right.mas_equalTo(self.CusNavBar);
+//        make.height.offset(0.5);
+//    }];
+    UIButton * backBtn  = [UIButton new];
+    [backBtn setImage:[UIImage imageNamed:@"back_black_icon"] forState:UIControlStateNormal];
+    [self.CusNavBar addSubview:backBtn];
+    
+    
+    [backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.CusNavBar);
+        make.bottom.mas_equalTo(self.CusNavBar);
+        make.width.offset(50);
+        make.height.offset(44);
+    }];
+    
+    [backBtn addTarget:self action:@selector(backAction:) forControlEvents:UIControlEventTouchUpInside];
+    WS(weakSelf);
+
+    [self.CusNavBar addSubview:self.titleL];
+    [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(self.CusNavBar);
+        make.centerY.mas_equalTo(backBtn);
+        make.height.offset(44);
+        make.width.mas_greaterThanOrEqualTo(10);
+    }];
+    if (self.titleStr.length == 0) {
+        self.titleL.attributedText = [self stringToAttribuedString:@"小组"];
+    }else{
+        self.titleL.attributedText = [self stringToAttribuedString:self.titleStr];
+    }
+    [self.view addSubview:self.HeadView];
+    [self.HeadView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.view);
+        make.height.mas_offset(46);
+        make.top.mas_equalTo(self.CusNavBar.mas_bottom);
+    }];
+    [self.HeadView addSubview:self.SearchView];
+    [self.SearchView  mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_offset(6);
+        make.left.right.mas_equalTo(self.HeadView);
+        make.height.mas_offset(36);
+    }];
+    [self.SearchView.button setAction:^{
+
+    }];
+    [self.view addSubview:self.tableView];
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(self.HeadView.mas_bottom);
+        make.left.right.mas_equalTo(self.view);
+        if (@available(iOS 11.0, *)) {
+            make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
+        } else {
+            make.bottom.equalTo(self.view.mas_bottom);
+        }
+    }];
+    self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+}
+
+- (UIView *)CusNavBar
+{
+    if (!_CusNavBar) {
+        _CusNavBar = [UIView new];
+        _CusNavBar.backgroundColor = [UIColor whiteColor];
+    }
+    return _CusNavBar;
+}
+- (UIView *)HeadView
+{
+    if (!_HeadView) {
+        _HeadView = [UIView new];
+        _HeadView.backgroundColor = [UIColor whiteColor];
+    }
+    return _HeadView;
+}
+- (UILabel *)titleL
+{
+    if (!_titleL) {
+        _titleL = [UILabel new];
+        _titleL.textAlignment = NSTextAlignmentCenter;
+    }
+    return _titleL;
+}
+- (NSAttributedString *)stringToAttribuedString:(NSString *)title;
+{
+    NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 18],NSForegroundColorAttributeName: [UIColor colorWithRed:10/255.0 green:10/255.0 blue:10/255.0 alpha:1.0]}];
+    return string;
+}
+- (void)getData{
+    WS(weakSelf);
+    NSDictionary * paraDict = @{@"GroupFolderId":@(self.ParentId),
+                                @"UserId":@([AppUserModel sharedAppUserModel].Id),
+                                @"Key":@"",
+                                @"Page":@(self.currentPage),
+                                @"PerPage":@(20),
+                                @"Sort":@""
+    };
+    [[HttpManager sharedHttpManager] POSTUrl:Host(APP_Group_Find) parameters:paraDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+        NSLog(@"%@",responseObject);
+        NoticeListModel *listModel = [[NoticeListModel alloc] initWithDictionary:responseObject error:nil];
+        weakSelf.totalRecord = listModel.Total;
+        [weakSelf.dataArray addObjectsFromArray:listModel.Items];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [weakSelf.tableView reloadData];
+        });
+        [weakSelf.tableView.mj_header endRefreshing];
+        [weakSelf.tableView.mj_footer endRefreshing];
+    } failure:^(NSError * _Nonnull error) {
+        [weakSelf.tableView.mj_header endRefreshing];
+        [weakSelf.tableView.mj_footer endRefreshing];
+    }];
+}
+
+#pragma mark - UItableView刷新
+- (void)setTableViewRefresh{
+    WeakSelf(self)
+    self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
+        [weakself headRefresh];
+    }];
+    self.tableView.mj_footer = [MJRefreshBackStateFooter footerWithRefreshingBlock:^{
+        [weakself footerRefresh];
+    }];
+}
+
+- (void)headRefresh{
+    self.isFresh = YES;
+    self.currentPage = 1;
+    self.totalPage = 1;
+    [self.dataArray removeAllObjects];
+    [self getData];
+}
+
+- (void)footerRefresh{
+    self.isFresh = NO;
+    self.currentPage += 1;
+    if (self.totalRecord == self.dataArray.count) {
+        self.currentPage --;
+        [self.tableView.mj_footer resetNoMoreData];
+        return ;
+    }
+    [self getData];
+}
+#pragma mark - 批量编辑
+/// 创建文件夹
+- (void)addFind:(NSString *)groupname{
+    SHOWLOADING
+    WEAKSELF
+    [[HttpManager sharedHttpManager] PUTUrl:Host(API_NOTICE_ADDFind) parameters:@{@"FolderName":groupname,@"ParentId":@(self.ParentId)} success:^(id  _Nonnull responseObject) {
+         STRONGSELF
+         REMOVESHOW
+         [strongSelf getData];
+    } failure:^(NSError * _Nonnull error) {
+         SHOWERROR([ZYCTool handerResultData:error]);
+    }];
+}
+/// 修改文件夹名称
+- (void)reNameFind:(NoticeModel*)findModel withReNameString:(NSString *)renameString{
+    
+       SHOWLOADING
+       WEAKSELF
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_Find_ReName) parameters:@{@"FolderName":renameString,@"Id":@(findModel.Id)} responseStyle:DATA success:^(id  _Nonnull responseObject) {
+                    STRONGSELF
+                    REMOVESHOW
+                    [strongSelf getData];
+    } failure:^(NSError * _Nonnull error) {
+        SHOWERROR([ZYCTool handerResultData:error]);
+    }];
+
+}
+/// 文件夹 置顶 和 取消置顶
+- (void)topFind:(NoticeModel*)findModel{
+    NSLog(@"文件夹---%@%@",findModel.IsTop ? @"置顶":@"取消置顶",findModel.FolderName);
+    SHOWLOADING
+    WEAKSELF
+    [[HttpManager sharedHttpManager] PUTUrl:[NSString stringWithFormat:@"%@%@%ld",BaseUrl,API_Find_Top,(long)findModel.Id] parameters:@{} success:^(id  _Nonnull responseObject) {
+            REMOVESHOW
+            [weakSelf reCreateTable];
+       } failure:^(NSError * _Nonnull error) {
+            SHOWERROR([ZYCTool handerResultData:error]);
+       }];
+}
+- (void)reCreateTable
+{
+    self.currentPage = 1;
+    self.totalPage = 1;
+    [self.dataArray removeAllObjects];
+
+    WS(weakSelf);
+    NSDictionary * paraDict = @{@"GroupFolderId":@(self.ParentId),
+                                @"UserId":@([AppUserModel sharedAppUserModel].Id),
+                                @"Key":@"",
+                                @"Page":@(self.currentPage),
+                                @"PerPage":@(20),
+                                @"Sort":@""
+    };
+    [[HttpManager sharedHttpManager] POSTUrl:Host(APP_Group_Find) parameters:paraDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+        NSLog(@"%@",responseObject);
+        NoticeListModel *listModel = [[NoticeListModel alloc] initWithDictionary:responseObject error:nil];
+        weakSelf.totalRecord = listModel.Total;
+        [weakSelf.dataArray addObjectsFromArray:listModel.Items];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [weakSelf.tableView removeFromSuperview];
+            weakSelf.tableView = nil;
+            weakSelf.tableView.delegate = weakSelf;
+            weakSelf.tableView.dataSource = weakSelf;
+            [weakSelf.view addSubview:self.tableView];
+            [weakSelf.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+                make.top.mas_equalTo(weakSelf.CusNavBar.mas_bottom);
+                make.left.right.mas_equalTo(weakSelf.view);
+                if (@available(iOS 11.0, *)) {
+                    make.bottom.equalTo(weakSelf.view.mas_safeAreaLayoutGuideBottom);
+                } else {
+                    make.bottom.equalTo(weakSelf.view.mas_bottom);
+                }
+            }];
+            [weakSelf.tableView.mj_header endRefreshing];
+            [weakSelf.tableView.mj_footer endRefreshing];
+            [weakSelf.tableView reloadData];
+        });
+    } failure:^(NSError * _Nonnull error) {
+        [weakSelf.tableView.mj_header endRefreshing];
+        [weakSelf.tableView.mj_footer endRefreshing];
+    }];
+}
+/// 删除文件夹
+- (void)deleteFind:(NSMutableArray<NoticeModel *>*)findModelArray{
+    NSMutableArray *MiddleIds = [NSMutableArray array];
+    
+    for (NoticeModel *model in findModelArray) {
+        [MiddleIds addObject:@(model.Id)];
+    }
+    NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
+    [dic setValue:MiddleIds forKey:@"MiddleIds"];
+    [dic setValue:@(CreateGroupType) forKey:@"FolderType"];
+    
+    SHOWLOADING
+    WEAKSELF
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_Find_DeleteRecord) parameters:dic responseStyle:DATA success:^(id  _Nonnull responseObject) {
+        STRONGSELF
+        REMOVESHOW
+        [strongSelf headRefresh];
+    } failure:^(NSError * _Nonnull error) {
+        SHOWERROR([ZYCTool handerResultData:error]);
+    }];
+
+}
+
+/// 移动文件夹
+- (void)moveFind:(NSMutableArray<NoticeModel *>*)findModelArray withSuperModel:(NoticeModel *)supermodel{
+    NSMutableArray *MiddleIds = [NSMutableArray array];
+    
+    for (NoticeModel *model in findModelArray) {
+        [MiddleIds addObject:@(model.Id)];
+    }
+    NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
+    [dic setValue:MiddleIds forKey:@"Ids"];
+    [dic setValue:@(self.ParentId) forKey:@"ParentId"];
+    
+    SHOWLOADING
+    WEAKSELF
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_Find_Move) parameters:dic responseStyle:DATA success:^(id  _Nonnull responseObject) {
+        STRONGSELF
+        REMOVESHOW
+        [strongSelf headRefresh];
+    } failure:^(NSError * _Nonnull error) {
+        SHOWERROR([ZYCTool handerResultData:error]);
+    }];
+
+}
+
+- (void)backAction:(id)sender{
+    [self.navigationController popViewControllerAnimated:true];
+}
+- (BOOL)checkChatListArray
+{
+    for (NoticeModel * model in self.dataArray) {
+        if (!model.IsSelect) {
+            return NO;
+        }
+    }
+    return YES;
+}
+- (NSInteger)CountSelectArray
+{
+    NSInteger count = 0;
+    for (NoticeModel * model in self.dataArray) {
+        if (model.IsSelect) {
+            count ++;
+        }
+    }
+    return count;
+}
+- (void)menuAction:(id)sender{
+    [super menuAction:sender];
+}
+#pragma mark - setter
+- (TDTableView *)tableView{
+    if (!_tableView) {
+        _tableView = [[TDTableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain];
+        _tableView.delegate = self;
+        _tableView.dataSource = self;
+    }
+    return _tableView;
+}
+- (NSMutableArray<NoticeModel *> *)dataArray{
+    if (!_dataArray) {
+        _dataArray = [NSMutableArray new];
+    }
+    return _dataArray;
+}
+- (MyTDGroupView *)SearchView
+{
+    if (!_SearchView) {
+        _SearchView = [[MyTDGroupView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 36)];
+    }
+    return _SearchView;
+}
+
+#pragma mark - UITableViewDelegate,UITableViewDataSource
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    return self.dataArray.count;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return [ChatNewRowCell configCell2Height];
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+   NoticeModel *model = [self.dataArray objectAtIndex:indexPath.row];
+   switch (model.AttributeValue) {
+       case 2:{
+           ChatNewRowCell *cell = [ChatNewRowCell configCell1:tableView indexPath:indexPath];
+           cell.cell1TitleLabel.text = model.FolderName;
+           cell.IsTopImgV.hidden = !model.IsTop;
+           cell.cell1TimeLabel.text = [NSString stringWithFormat:@"%ld",(long)model.FileCount];
+           cell.cell1TimeLabel.hidden = model.FileCount == 0 ? YES : NO;
+           return cell;
+       }break;
+       default:{
+           ChatNewRowCell *cell = [ChatNewRowCell configCell2:tableView indexPath:indexPath];
+           [cell.cell2UserImgView sd_setImageWithURL:[NSURL URLWithString:model.AvatarUrl] placeholderImage:kUserDefaultHeadImage];
+           cell.cell2TitleLabel.text = model.GroupName;
+           cell.IsTopImgV.hidden = !model.IsTop;
+           cell.cell2IntroLabel.text = [NSString stringWithFormat:@"共享给%ld人",(long)model.TopicSharingCount];
+           cell.cell2TimeLabel.text = [NSString stringWithFormat:@"%ld",(long)model.TopicAllCount];
+           cell.cell2TimeLabel.hidden = model.TopicAllCount == 0 ? YES : NO;
+           cell.cell2RedNumLabel.text = model.UReadTopicCount > 0 ? [NSString stringWithFormat:@"[%ld条新话题]",(long)model.UReadTopicCount] : @"";
+           return cell;
+       }break;
+   }
+}
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(nonnull NSIndexPath *)indexPath
+{
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    NSLog(@"正常状态的cell");
+    NoticeModel *model = [self.dataArray objectAtIndex:indexPath.row];
+    if(model && model != nil)
+    {
+        switch (model.AttributeValue) {
+            case 2:{
+                MailGroupVC *vc = [[MailGroupVC alloc] init];
+                vc.ParentId = model.Id;
+                vc.titleStr = model.FolderName;
+                [self.navigationController pushViewController:vc animated:YES];
+            }break;
+            default:{
+                MailGroupListVC * vc = [MailGroupListVC initMailGroupListVC];
+                vc.Id = model.GroupId;
+                [self.navigationController pushViewController:vc animated:YES];
+            }break;
+        }
+    }
+}
+
+- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    return tableView.editing;
+}
+- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath {
+    NoticeModel *model = [self.dataArray objectAtIndex:sourceIndexPath.row];
+    NoticeModel *toModel = [self.dataArray objectAtIndex:destinationIndexPath.row];
+    WS(weakSelf);
+    if (model.IsTop && toModel.IsTop ) {
+        [[HttpManager sharedHttpManager] POSTUrl:Host(API_Find_Sort) parameters:@{@"MiddleIdFirst":@(model.Id),@"MiddleIdSecond":@(toModel.Id)} responseStyle:DATA success:^(id  _Nonnull responseObject) {
+            [weakSelf.dataArray removeObject:model];
+            [weakSelf.dataArray insertObject:model atIndex:destinationIndexPath.row];
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [weakSelf.tableView reloadData];
+            });
+        } failure:^(NSError * _Nonnull error) {
+            
+        }];
+    }else{
+        [weakSelf.dataArray removeObject:model];
+        [weakSelf.dataArray insertObject:model atIndex:sourceIndexPath.row];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [weakSelf.tableView reloadData];
+        });
+    }
+}
+@end

+ 29 - 45
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListByZuVC.m

@@ -132,6 +132,7 @@
     if(operation){
         self.iSViewEditor = YES;
         self.HeadHight.constant = 0.f;
+        self.HeadView.hidden = YES;
         self.rightBtn.hidden = YES;
         //默认操作状态为批量编辑状态
         self.operationStateEnum = OperationStateEnum1;
@@ -162,7 +163,7 @@
         }
         self.iSViewEditor = NO;
         self.HeadHight.constant = 54.f;
-
+        self.HeadView.hidden = NO;
         //默认操作状态为无状态
         self.operationStateEnum = OperationStateEnum0;
         self.operationAllSelectButton.hidden = NO;
@@ -251,7 +252,10 @@
             }];
         }break;
         default:
+        {
             [super menuAction:sender];
+            [self changeToOperation:NO];
+        }
             break;
     }
 }
@@ -295,17 +299,10 @@
         self.rightBtn.hidden = YES;
     }
     
-    
-    
     self.fd_prefersNavigationBarHidden = YES;
     self.view.backgroundColor = RGB(255, 255, 255);
     
-    
-    if (@available(iOS 11.0, *)) {
-        self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
-    } else {
-        self.automaticallyAdjustsScrollViewInsets = NO;
-    }
+    self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
     self.tableView.delegate = self;
     self.tableView.dataSource = self;
     self.tableView.backgroundColor = [UIColor clearColor];
@@ -549,7 +546,8 @@
         {
             return self.departAndUsersPingArray;
         }break;
-        case MailListByZuPageType_custom:{
+        default:
+        {
             return self.pinyinArray;
         }break;
     }
@@ -561,10 +559,10 @@
         case MailListByZuPageType_Sys:
             return index;
             break;
-        case MailListByZuPageType_custom:
+        default:
             return index;
+            break;
     }
-    return index;
 }
 
 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
@@ -584,11 +582,11 @@
             
             [headerView addSubview:headerLabel];
         }break;
-        case MailListByZuPageType_custom:{
+        default:{
             NSString *returnStr = [self.pinyinArray objectAtIndex:section];
             UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, 200, 30)];
             [headerView addSubview:headerLabel];
-            headerLabel.font = [UIFont systemFontOfSize:14.];
+            headerLabel.font = [UIFont systemFontOfSize:14];
             headerLabel.text = returnStr;
             headerLabel.textColor = RGB(153, 153, 153);
         }break;
@@ -602,12 +600,11 @@
         case MailListByZuPageType_Sys:{
             return 30;
         }break;
-        case MailListByZuPageType_custom:
+        default:
         {
             return 30;
         }break;
     }
-    return 0;
 }
 
 
@@ -620,12 +617,11 @@
                 return [MailListByZuCell configCell0Height];
             }
         }break;
-        case MailListByZuPageType_custom:
+        default:
         {
             return [MailListByZuCell configCell0Height];
         }break;
     }
-    return 0;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
@@ -637,40 +633,33 @@
             if ([dataArray.firstObject boolValue]) {
                 MailListCell *cell = [MailListCell configCell0:tableView indexPath:indexPath];
                 cell.cell0TitleLabel.text = titleStr;
-                //                        cell.cell0ZiJianLabel.hidden = YES;
+                NSLog(@"====%@",titleStr);
                 return cell;
             }else{
                 NSDictionary *dic = dataArray.lastObject;
                 MailListByZuCell *cell = [MailListByZuCell configCell0:tableView indexPath:indexPath];
-                if ([[dic objectForKey:@"IsDisable"] boolValue]) {
-                    [cell.contentView setBackgroundColor:[UIColor lightGrayColor]];
-                }
                 cell.cell0TitleLabel.text = titleStr;
+                NSLog(@"++++%@",titleStr);
                 [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:dic[@"AvatarUrl"]] placeholderImage:[UIImage imageNamed:@"chatmsg_list_testuser_img"]];
                 return cell;
             }
         } break;
-        case MailListByZuPageType_custom:{
+        default:{///case MailListByZuPageType_custom
             SelectModel * model = [[self.cusNameArray objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
             switch (self.operationStateEnum) {
                 case OperationStateEnum0:
                 {
                     MailListByZuCell *cell = [MailListByZuCell configCell0:tableView indexPath:indexPath];
                     cell.cell0TitleLabel.text = model.UserName;
-                    if (model.IsDisable) {
-                        [cell.contentView setBackgroundColor:[UIColor lightGrayColor]];
-                    }
+
                     [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:model.AvatarUrl] placeholderImage:IMG(@"chatmsg_list_testuser_img")];
                     return cell;
                 }break;
-                case OperationStateEnum1:{
+                default:{///case OperationStateEnum1
                     self.isAllselect = [self checkSelectArray];
                     [self.operationAllSelectButton setTitle:self.isAllselect ? @"取消全选": @"全选" forState:UIControlStateNormal];
                     MailListByZuCell *cell = [MailListByZuCell configCell1:tableView indexPath:indexPath];
                     cell.cell0TitleLabel.text = model.UserName;
-                    if (model.IsDisable) {
-                        [cell.contentView setBackgroundColor:[UIColor lightGrayColor]];
-                    }
                     [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:model.AvatarUrl] placeholderImage:IMG(@"chatmsg_list_testuser_img")];
                     cell.selectBtn.selected = model.hadSelected;
                     [cell.selectBtn setAction:^{
@@ -680,12 +669,9 @@
                     }];
                     return cell;
                 }
-                default:
-                    break;
             }
         }break;
     }
-    return nil;
 }
 - (BOOL)checkSelectArray
 {
@@ -738,7 +724,9 @@
                 UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:UIAlertControllerStyleAlert];
                 
                 UIAlertAction *ok = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                    
+                    dispatch_async(dispatch_get_main_queue(), ^{
+                        [tableView reloadData];
+                    });
                 }];
                 [ok setValue:k9 forKey:@"_titleTextColor"];
                 UIAlertAction *noOk = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
@@ -853,12 +841,12 @@
                         [self.navigationController pushViewController:vc animated:YES];
                     }else{
                         NSDictionary * dic = dataArray.lastObject;
-                        if (self.isSelectPeople && ![dic[@"IsDisable"] boolValue]) {
+                        if (self.isSelectPeople) {
                             SHOWSUCCESS(@"成功")
                             [self selecPeopleBack:dataArray.lastObject];
                             return;
                         }
-                        if (self.isCheck && ![dic[@"IsDisable"] boolValue]) {
+                        if (self.isCheck) {
                             SHOWSUCCESS(@"成功")
                             [self selecPeopleBack:dataArray.lastObject];
                             return;
@@ -895,7 +883,7 @@
                     }
                 }break;
                 case OperationStateEnum1:{
-                    
+
                 }
                     break;
                 default:
@@ -904,13 +892,12 @@
         }break;
         case MailListByZuPageType_custom:{
             SelectModel *model = [[self.cusNameArray objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
-            if(indexPath.section > 0){
-                if (self.isSelectPeople && !model.IsDisable) {
+                if (self.isSelectPeople) {
                     SHOWSUCCESS(@"成功")
                     [self selecPeopleBack:[model modelToJSONObject]];
                     return;
                 }
-                if (self.isCheck && !model.IsDisable) {
+                if (self.isCheck) {
                     SHOWSUCCESS(@"成功")
                     [self selecPeopleBack:[model modelToJSONObject]];
                     return;
@@ -946,15 +933,12 @@
                         }
                     }break;
                     case OperationStateEnum1:{
-                        if (!model.IsDisable) {
-                            model.hadSelected = !model.hadSelected;
-                            [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
-                        }
+                        model.hadSelected = !model.hadSelected;
+                        [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
                     }
                     default:
                         break;
                 }
-            }
         }break;
         default:
             break;

+ 1 - 1
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListDetailVC.h

@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property(nonatomic, assign) NSInteger   indexId;
 @property (nonatomic, copy) FlowAttachmentsModel *   sendModel;
 @property (assign, nonatomic) BOOL                   isReturn;
-
+@property (assign, nonatomic) BOOL                   isAdd;
 @end
 
 NS_ASSUME_NONNULL_END

+ 148 - 112
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListDetailVC.m

@@ -15,6 +15,7 @@
 #import "TabBarController.h"
 #import "OtherFavoriteVC.h"
 #import "OtherNoteBookVC.h"
+#import "MailVerifyVC.h"
 
 @interface MailListDetailVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (strong,nonatomic) UIView *bottomView;
@@ -22,6 +23,7 @@
 
 @property (strong,nonatomic) UIButton * leftIntoZnxBtn;
 @property (strong,nonatomic) UIButton * rightSendMsgBtn;
+@property (strong,nonatomic) UIButton * addUserBtn;
 @property (nonatomic, strong) AddressUserModel *model;
 @property (nonatomic, strong) NSMutableDictionary *currentDictionary;
 
@@ -60,16 +62,23 @@
     }
     return _rightSendMsgBtn;
 }
+- (UIButton *)addUserBtn
+{
+    if (!_addUserBtn) {
+        _addUserBtn = [UIButton new];
+        [_addUserBtn setBackgroundColor:UIColorHex(009AFF)];
+        _addUserBtn.layer.cornerRadius = 4.f;
+        _addUserBtn.layer.masksToBounds = YES;
+    }
+    return _addUserBtn;
+}
 - (void)viewDidLoad {
     [super viewDidLoad];
     self.fd_prefersNavigationBarHidden = YES;
     self.view.backgroundColor = RGB(240, 239, 244);
      
-    if (@available(iOS 11.0, *)) {
-        self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
-    } else {
-        self.automaticallyAdjustsScrollViewInsets = NO;
-    }
+    self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+
     self.tableView.delegate = self;
     self.tableView.dataSource = self;
     self.tableView.backgroundColor = [UIColor clearColor];
@@ -78,53 +87,79 @@
     NSAttributedString *leftString = [[NSAttributedString alloc] initWithString:@"站内信" attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 16],NSForegroundColorAttributeName:[UIColor whiteColor]}];
     NSAttributedString *rightString = [[NSAttributedString alloc] initWithString:@"发消息" attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 16],NSForegroundColorAttributeName:[UIColor whiteColor]}];
     [self.view addSubview:self.bottomView];
+    if (!self.isAdd) {
+        [self.bottomView addSubview:self.leftIntoZnxBtn];
+        [self.bottomView addSubview:self.rightSendMsgBtn];
+        [self.leftIntoZnxBtn setAttributedTitle:leftString forState:UIControlStateNormal];
+        [self.rightSendMsgBtn setAttributedTitle:rightString forState:UIControlStateNormal];
+        
+        [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.equalTo(self.view);
+            make.height.offset(40);
+            make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom).offset(-21);
+        }];
+        [self.leftIntoZnxBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.edges.mas_offset(UIEdgeInsetsMake(0, 15, 0, (SCREEN_WIDTH * 0.5 + 5)));
+        }];
+        [self.rightSendMsgBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.edges.mas_offset(UIEdgeInsetsMake(0, (SCREEN_WIDTH * 0.5 + 5), 0, 15));
+        }];
+        WS(weakSelf);
+        [self.leftIntoZnxBtn setAction:^{
+            SelectModel * smodel = [[SelectModel alloc] init];
+            smodel.SourceType = 0;
+            smodel.SourceId = weakSelf.model.Id;
+            smodel.SourceName = weakSelf.model.Name;
+            MyTDTopicCreateVC * vc = [MyTDTopicCreateVC initMyTDTopicCreateVC];
+            vc.type = CollectModel_InterMail;
+            vc.MailType = 1;
+            vc.shouModel = smodel;
+            [weakSelf.navigationController pushViewController:vc animated:YES];
+        }];
+        [self.rightSendMsgBtn setAction:^{//发送环信信息 跳转到聊天页面
+            //1、先创建会话
+            EMConversation *conversation = [[EMClient sharedClient].chatManager getConversation:weakSelf.model.ImId type:EMConversationTypeChat createIfNotExist:YES];
+            //2、再跳转聊天页面
+            EMConversationModel *model = [[EMConversationModel alloc] initWithEMModel:conversation];
+            EMChatViewController *controller = [[EMChatViewController alloc] initWithCoversationModel:model];
+            controller.toUserId = weakSelf.indexId;
+            model.name = weakSelf.model.Name ? weakSelf.model.Name: weakSelf.model.Phone;
+            SelectModel * sModel = [[SelectModel alloc] init];
+            sModel.UserId = weakSelf.model.Id;
+            sModel.UserName = weakSelf.model.Name;
+            sModel.AvatarUrl = weakSelf.model.AvatarUrl;
+            sModel.SourceType = 0;
+            sModel.SourceId = weakSelf.model.Id;
+            sModel.SourceName = weakSelf.model.Name;
+            controller.sModel = sModel;
+            controller.ReceiveIcon = weakSelf.model.AvatarUrl;
+            controller.chatType = 1;//单聊
+            [weakSelf.navigationController pushViewController:controller animated:YES];
+        }];
+    }else{
+        [self.bottomView addSubview:self.addUserBtn];
+        NSAttributedString *addString = [[NSAttributedString alloc] initWithString:@"添加到通讯录" attributes:@{NSFontAttributeName: [UIFont fontWithName:@"PingFang SC" size: 16],NSForegroundColorAttributeName:[UIColor whiteColor]}];
+        [self.addUserBtn setAttributedTitle:addString forState:UIControlStateNormal];
+        
+        [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.equalTo(self.view);
+            make.height.offset(40);
+            make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom).offset(-21);
+        }];
+        [self.addUserBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.edges.mas_offset(UIEdgeInsetsMake(0, 15, 0, 15));
+        }];
 
-    [self.bottomView addSubview:self.leftIntoZnxBtn];
-    [self.bottomView addSubview:self.rightSendMsgBtn];
-    [self.leftIntoZnxBtn setAttributedTitle:leftString forState:UIControlStateNormal];
-    [self.rightSendMsgBtn setAttributedTitle:rightString forState:UIControlStateNormal];
-    
-    [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.right.equalTo(self.view);
-        make.height.offset(40);
-        make.bottom.equalTo(self.view.mas_bottom).offset(-21);
-    }];
-    [self.leftIntoZnxBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.edges.mas_offset(UIEdgeInsetsMake(0, 15, 0, (SCREEN_WIDTH * 0.5 + 5)));
-    }];
-    [self.rightSendMsgBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.edges.mas_offset(UIEdgeInsetsMake(0, (SCREEN_WIDTH * 0.5 + 5), 0, 15));
-    }];
-    WS(weakSelf);
-    [self.leftIntoZnxBtn setAction:^{
-        SelectModel * smodel = [[SelectModel alloc] init];
-        smodel.SourceType = 0;
-        smodel.SourceId = weakSelf.model.Id;
-        smodel.SourceName = weakSelf.model.Name;
-        MyTDTopicCreateVC * vc = [MyTDTopicCreateVC initMyTDTopicCreateVC];
-        vc.type = CollectModel_InterMail;
-        vc.shouModel = smodel;
-        [weakSelf.navigationController pushViewController:vc animated:YES];
-    }];
-    [self.rightSendMsgBtn setAction:^{//发送环信信息 跳转到聊天页面
-        //1、先创建会话
-        EMConversation *conversation = [[EMClient sharedClient].chatManager getConversation:weakSelf.model.ImId type:EMConversationTypeChat createIfNotExist:YES];
-        //2、再跳转聊天页面
-        EMConversationModel *model = [[EMConversationModel alloc] initWithEMModel:conversation];
-        EMChatViewController *controller = [[EMChatViewController alloc] initWithCoversationModel:model];
-        controller.toUserId = weakSelf.indexId;
-        model.name = weakSelf.model.Name ? weakSelf.model.Name: weakSelf.model.Phone;
-        SelectModel * sModel = [[SelectModel alloc] init];
-        sModel.UserId = weakSelf.model.Id;
-        sModel.UserName = weakSelf.model.Name;
-        sModel.AvatarUrl = weakSelf.model.AvatarUrl;
-        sModel.SourceType = 0;
-        sModel.SourceId = weakSelf.model.Id;
-        sModel.SourceName = weakSelf.model.Name;
-        controller.sModel = sModel;
-        controller.ReceiveIcon = weakSelf.model.AvatarUrl;
-        controller.chatType = 1;//单聊
-        [weakSelf.navigationController pushViewController:controller animated:YES];
+        WS(weakSelf);
+        [self.addUserBtn setAction:^{
+            MailVerifyVC * vc = [MailVerifyVC initMailVerifyVC];
+            vc.userId = weakSelf.model.Id;
+            [weakSelf.navigationController pushViewController:vc animated:YES];
+        }];
+    }
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.right.mas_equalTo(self.view);
+        make.bottom.mas_equalTo(self.bottomView.mas_top);
     }];
     [self getData];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(messageReturnSuccess) name:MESSAGERETURNSUCCESS object:nil];
@@ -139,7 +174,7 @@
 }
 
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
-    return 3;
+    return 4;
 }
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
@@ -153,7 +188,10 @@
         case 2:{
             return 2;
         }break;
-        default:break;
+        default:
+        {
+            return 1;
+        }break;
     }
     return 0;
 }
@@ -190,6 +228,7 @@
 //}
  
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    WS(weakSelf);
      switch (indexPath.section) {
          case 0:{
              MailListDetailCell *cell = [MailListDetailCell configCell0:tableView indexPath:indexPath];
@@ -200,15 +239,16 @@
              [cell.cell0MenuBtn setAction:^{
                  [weakSelf openMenuViewWithDidMenuBtn];
              }];
-             [cell.cell0RightBtn setAction:^{
-                 [weakSelf addUserToBlackList];
-             }];
-             if ([AppUserModel sharedAppUserModel].Id == self.indexId) {
-                 cell.cell0RightBtn.hidden = YES;
-             }else{
-                 cell.cell0RightBtn.hidden = NO;
-             }
-             cell.cell0RightBtn.selected = self.model.IsBlack;
+             cell.cell0RightBtn.hidden = YES;
+//             [cell.cell0RightBtn setAction:^{
+//                 [weakSelf addUserToBlackList];
+//             }];
+//             if ([AppUserModel sharedAppUserModel].Id == self.indexId) {
+//                 cell.cell0RightBtn.hidden = YES;
+//             }else{
+//                 cell.cell0RightBtn.hidden = NO;
+//             }
+//             cell.cell0RightBtn.selected = self.model.IsBlack;
              [cell.cell0UserImgView sd_setImageWithURL:[NSURL URLWithString:self.model.AvatarUrl] placeholderImage:[UIImage imageNamed:@"chatmsg_list_testuser_img"]] ;
              cell.cell0UserNameLabel.text = self.model.Name;// self.model.Nick ? self.model.Nick:
              cell.cell0UserIntroLabel.text = self.model.Description;
@@ -253,10 +293,30 @@
               }
              return cell;
          }break;
-         default:break;
+         default:{
+             MailListDetailCell *cell = [MailListDetailCell configCell3:tableView indexPath:indexPath];
+             cell.cell2TitleLabel.text = @"屏蔽此人";
+             [cell.switchV setOn:self.model.IsBlack];
+             __block MailListDetailCell * weakCell = cell;
+             cell.ChangeSwitchBlock = ^(BOOL isOn) {
+                 if (!isOn){
+                     NSString *urlString = [API_BLACKLIST_REMOVE stringByAppendingFormat:@"/%ld",(long)self.model.Id];
+                     [[HttpManager sharedHttpManager ] DeleteUrl:Host(urlString) parameters:@{} responseStyle:DATA success:^(id  _Nonnull responseObject) {
+                         [weakSelf getData];
+                     } failure:^(NSError * _Nonnull error) {
+                         SHOWERROR([ZYCTool handerResultData:error]);
+                     }];
+                 }else{
+                     [[HttpManager sharedHttpManager] POSTUrl:Host(API_BLACKLIST_ADD) parameters:@{@"UserId":@(self.model.Id)} responseStyle:DATA success:^(id  _Nonnull responseObject) {
+                         [weakSelf getData];
+                     } failure:^(NSError * _Nonnull error) {
+                         SHOWERROR([ZYCTool handerResultData:error]);
+                     }];
+                 }
+             };
+             return cell;
+         }break;
      }
-    
-    return nil;
 }
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
@@ -320,7 +380,7 @@
                     break;
             }
         }break;
-            
+
         default:
             break;
     }
@@ -330,19 +390,19 @@
         SHOWERROR(@"该用户没有设置手机号");
         return;
     }
-           UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:self.model.Phone preferredStyle:UIAlertControllerStyleAlert];
-           UIAlertAction *actionYes = [UIAlertAction actionWithTitle:@"拨打" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-             NSMutableString* str=[[NSMutableString alloc] initWithFormat:@"tel:%@",self.model.Phone];
-             [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
-           }];
-           UIAlertAction *actionNo = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
-               
-           }];
-           [alert addAction:actionYes];
-           [alert addAction:actionNo];
-           [self presentViewController:alert animated:YES completion:^{
-    
-           }];
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:self.model.Phone preferredStyle:UIAlertControllerStyleAlert];
+    UIAlertAction *actionYes = [UIAlertAction actionWithTitle:@"拨打" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        NSMutableString* str=[[NSMutableString alloc] initWithFormat:@"tel:%@",self.model.Phone];
+        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
+    }];
+    UIAlertAction *actionNo = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+        
+    }];
+    [alert addAction:actionYes];
+    [alert addAction:actionNo];
+    [self presentViewController:alert animated:YES completion:^{
+        
+    }];
 }
 - (void)gotoEmail{
     if (ISEmptyString(self.model.Email)){
@@ -372,18 +432,16 @@
 }
 - (void)getData{
     SHOWLOADING
-    WEAKSELF
+    WS(weakSelf);
     [[HttpManager sharedHttpManager] GETUrl:[NSString stringWithFormat:@"%@%@%ld",BaseUrl,AddressBookUser_Detail_Get,(long)self.indexId] parameters:@{} success:^(id  _Nonnull responseObject) {
-        STRONGSELF
+        REMOVESHOW
         NSLog(@"别人数据 %@",responseObject);
         NSDictionary *dic = responseObject;
-        strongSelf.model = [[AddressUserModel alloc] initWithDictionary:dic error:nil];
+        weakSelf.model = [[AddressUserModel alloc] initWithDictionary:dic error:nil];
         dispatch_async(dispatch_get_main_queue(), ^{
-            [strongSelf updateMasButton];
-            [strongSelf.tableView reloadData];
+            [weakSelf updateMasButton];
+            [weakSelf.tableView reloadData];
         });
-        REMOVESHOW;
-        
     } failure:^(NSError * _Nonnull error) {
         REMOVESHOW
         SHOWERROR([ZYCTool handerResultData:error])
@@ -395,32 +453,10 @@
     if ([AppUserModel sharedAppUserModel].Id == self.indexId) {
         self.rightSendMsgBtn.hidden = YES;
         self.leftIntoZnxBtn.hidden = YES;
-        [self.leftIntoZnxBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
-            make.edges.mas_offset(UIEdgeInsetsMake(0, 15, 0, 15));
-        }];
-    }
-}
-- (void)addUserToBlackList{
-    WS(weakSelf);
-    if (self.model.IsBlack){
-        NSString *urlString = [API_BLACKLIST_REMOVE stringByAppendingFormat:@"/%ld",(long)self.model.Id];
-        [[HttpManager sharedHttpManager ] DeleteUrl:Host(urlString) parameters:@{} responseStyle:DATA success:^(id  _Nonnull responseObject) {
-             SHOWSUCCESS(@"已移除黑名单")
-            dispatch_async(dispatch_get_main_queue(), ^{
-                [weakSelf getData];
-            });
-        } failure:^(NSError * _Nonnull error) {
-            SHOWERROR([ZYCTool handerResultData:error]);
-        }];
-    }else{
-        [[HttpManager sharedHttpManager] POSTUrl:Host(API_BLACKLIST_ADD) parameters:@{@"UserId":@(self.model.Id)} responseStyle:DATA success:^(id  _Nonnull responseObject) {
-               SHOWSUCCESS(@"加入黑名单成功")
-               dispatch_async(dispatch_get_main_queue(), ^{
-                   [weakSelf getData];
-              });
-           } failure:^(NSError * _Nonnull error) {
-               SHOWERROR([ZYCTool handerResultData:error]);
-           }];
+        self.addUserBtn.hidden = YES;
+//        [self.leftIntoZnxBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
+//            make.edges.mas_offset(UIEdgeInsetsMake(0, 15, 0, 15));
+//        }];
     }
 }
 

+ 5 - 1
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListMoveVC.h

@@ -11,9 +11,13 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface MailListMoveVC : BaseViewController
-
+@property (nonatomic, assign) BOOL    IsAddUser;
+@property (nonatomic, assign) BOOL    IsRoot;
 @property (nonatomic, copy) NSArray   * selectArray;
 @property (nonatomic, copy) void(^moveBlock)(void);
+@property (nonatomic, copy) void(^returnBlock)(void);
+@property (nonatomic, copy) void(^selectBlock)(NSString * Name,NSInteger GroupId);
+
 +(MailListMoveVC *)initMailListMoveVC;
 @end
 

+ 46 - 4
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListMoveVC.m

@@ -13,6 +13,9 @@
 @interface MailListMoveVC ()
 @property (weak, nonatomic) IBOutlet UITableView *tableView;
 @property (weak, nonatomic) IBOutlet UILabel *titleL;
+@property (weak, nonatomic) IBOutlet UIButton *addBtn;
+@property (weak, nonatomic) IBOutlet UIButton *menuBtn;
+
 @property (copy, nonatomic) NSMutableArray   * dataSourceArray;
 @end
 
@@ -24,16 +27,35 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     self.fd_prefersNavigationBarHidden = YES;
+    if (self.IsAddUser) {
+        self.titleL.text = @"选择分组";
+    }else{
+        self.menuBtn.hidden = YES;
+    }
     [self getData];
+//    WS(weakSelf);
+//    [self.addBtn setAction:^{
+//        [[ShowNewGroupAlert initShowNewGroupAlertWithTitle:@"新建通讯录" placeholder:@"请输入通讯录名称" confirm:^(NSString * _Nonnull groupName) {
+//            SHOWLOADING
+//            [[HttpManager sharedHttpManager] POSTUrl:[NSString stringWithFormat:@"%@%@",BaseUrl,AddressBookGroup_Add_Post] parameters:@{@"addressBookGroupName":groupName} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+//                REMOVESHOW
+//                NSLog(@"%@",responseObject);
+//                [weakSelf getData];
+//            } failure:^(NSError * _Nonnull error) {
+//                REMOVESHOW
+//            }];
+//        } cancle:^{
+//        }] show];
+//    }];
 }
 - (void)getData{
     WEAKSELF
     SHOWLOADING
+    [weakSelf.dataSourceArray removeAllObjects];
     [[HttpManager sharedHttpManager] POSTUrl:[NSString stringWithFormat:@"%@%@",BaseUrl,AddressBookGroup_ListGroup_Post] parameters:@{} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
         REMOVESHOW
         NSLog(@"=============/n通讯录获取数据解析前/n=================/n%@",responseObject);
         NSDictionary *dic =  responseObject;
-        [weakSelf.dataSourceArray removeAllObjects];
 //        [weakSelf.dataSourceArray addObject:dic[@"Departments"]];
         [weakSelf.dataSourceArray addObjectsFromArray:dic[@"AddressBookGroups"]];
         dispatch_async(dispatch_get_main_queue(), ^{
@@ -55,17 +77,37 @@
 }
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
     MailListCell *cell = [MailListCell configCell0:tableView indexPath:indexPath];
-    cell.clipsToBounds = YES;
     NSDictionary *dic = self.dataSourceArray[indexPath.row];
     cell.cell0TitleLabel.text = dic[@"GroupName"];
-//    cell.cell0ZiJianLabel.hidden = NO;
+    if (self.IsAddUser) {
+        cell.rightView.hidden = YES;
+    }
     return cell;
 }
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
     [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    WS(weakSelf);
     NSDictionary *dic = self.dataSourceArray[indexPath.row];
-    [self moveToGroupId:[dic[@"Id"] integerValue]];
+    if (self.IsAddUser) {
+        if (self.selectBlock) {
+            self.selectBlock(dic[@"GroupName"],[dic[@"Id"] integerValue]);
+        }
+        [self.navigationController popViewControllerAnimated:YES];
+    }else if(self.IsRoot){
+        NSDictionary * paraDict = @{@"AddressBookGroupId":@([dic[@"Id"] integerValue]),
+                                    @"UserId":self.selectArray};
+        [[HttpManager sharedHttpManager] POSTUrl:Host(AddressBookGroupUser_Add_Post) parameters:paraDict responseStyle:DATA success:^(id  _Nonnull responseObject) {
+            if (weakSelf.returnBlock) {
+                weakSelf.returnBlock();
+            }
+            [weakSelf.navigationController popViewControllerAnimated:YES];
+        } failure:^(NSError * _Nonnull error) {
+            
+        }];
+    }else{
+        [self moveToGroupId:[dic[@"Id"] integerValue]];
+    }
 }
 - (void)moveToGroupId:(NSInteger)GroupId{
     NSDictionary * dict = @{@"AddressBookGroupId": @(GroupId),

+ 322 - 169
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailListVC.m

@@ -18,6 +18,12 @@
 #import "YCMenuView.h"
 #import "MailModel.h"
 #import "MailListDetailVC.h"
+#import "MailAddUserSearch.h"
+#import "MailListByZuCell.h"
+#import "ChineseString.h"
+#import "MailEditVC.h"
+#import "MailListMoveVC.h"
+#import "MailGroupVC.h"
 
 @interface MailListVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (weak, nonatomic) IBOutlet UIView       *HeadView;
@@ -28,6 +34,9 @@
 @property (strong,nonatomic) NSMutableArray       *taskActionArray;
 @property (strong,nonatomic) NSMutableArray       *historyDataSourceArray;
 @property (nonatomic, strong) AddressBookGroupModel *groupModel;
+@property (strong,nonatomic) NSMutableArray       *pinyinArray;
+@property (strong,nonatomic) NSMutableArray       *nameArray;
+@property (strong,nonatomic) NSMutableArray       *cusNameArray;
 @end
 
 @implementation MailListVC
@@ -48,9 +57,13 @@
     }
     return _taskActionArray;
 }
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+    [self getData];
+}
 - (void)viewDidLoad {
     [super viewDidLoad];
-    [self getData];
     self.fd_prefersNavigationBarHidden = YES;
     self.view.backgroundColor = RGB(255, 255, 255);
     [self.HeadView addSubview:self.SearchView];
@@ -124,14 +137,18 @@
                         });
                     } failure:^(NSError * _Nonnull error) {
                         REMOVESHOW
-                        //                SHOWERROR([ZYCTool handerResultData:error]);
+                        SHOWERROR([ZYCTool handerResultData:error]);
                     }];
                 } cancle:^{
                 }] show];
             }else if ([@"加联系人" isEqualToString:action.title]){
-
+                MailAddUserSearch * vc = [[MailAddUserSearch alloc] init];
+                [weakSelf.navigationController pushViewController:vc animated:YES];
             }else if ([@"批量编辑" isEqualToString:action.title]){
-                
+                MailEditVC * vc = [MailEditVC initMailEditVC];
+                vc.dataArray = weakSelf.cusNameArray.mutableCopy;
+                vc.pinyinArray = weakSelf.pinyinArray.mutableCopy;
+                [weakSelf.navigationController pushViewController:vc animated:YES];
             }else if ([@"扫一扫" isEqualToString:action.title]){
                 
             }
@@ -151,80 +168,133 @@
 
 #pragma Mark 左滑按钮 iOS8以上
 - (UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(tvos){// delete action
-    MailModel * model = self.dataSourceArray[indexPath.section];
-    MailSubModel * smodel = model.Items[indexPath.row];
-    switch (model.TypeId) {
-        case MailListCusType:
-        {
-            WEAKSELF
-            UIContextualAction *action1 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:@"删除" handler:^(UIContextualAction * _Nonnull action,__kindof UIView * _Nonnull sourceView,void (^ _Nonnull completionHandler)(BOOL)) {
-                UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:(UIAlertControllerStyleAlert)];
-                UIAlertAction * sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
-                    SHOWLOADING
-                    [[HttpManager sharedHttpManager] DeleteUrl:[NSString stringWithFormat:@"%@%@%ld",BaseUrl,AddressBookGroup_Get_Delete,(long)smodel.Id] parameters:@{} responseStyle:DATA success:^(id  _Nonnull responseObject) {
-                                       
-                        REMOVESHOW
-                        STRONGSELF
-                        [strongSelf getData];
-                                   
-                    } failure:^(NSError * _Nonnull error) {
-                        REMOVESHOW
+    if (indexPath.section <= (self.dataSourceArray.count - 1)) {
+        MailModel * model = self.dataSourceArray[indexPath.section];
+        MailSubModel * smodel = model.Items[indexPath.row];
+        switch (model.TypeId) {
+            case MailListCusType:
+            {
+                WEAKSELF
+                UIContextualAction *action1 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:@"删除" handler:^(UIContextualAction * _Nonnull action,__kindof UIView * _Nonnull sourceView,void (^ _Nonnull completionHandler)(BOOL)) {
+                    UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:(UIAlertControllerStyleAlert)];
+                    UIAlertAction * sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
+                        SHOWLOADING
+                        [[HttpManager sharedHttpManager] DeleteUrl:[NSString stringWithFormat:@"%@%@%ld",BaseUrl,AddressBookGroup_Get_Delete,(long)smodel.Id] parameters:@{} responseStyle:DATA success:^(id  _Nonnull responseObject) {
+                            REMOVESHOW
+                            [weakSelf getData];
+                        } failure:^(NSError * _Nonnull error) {
+                            REMOVESHOW
+                        }];
+                    }];
+                    UIAlertAction * cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+                        dispatch_async(dispatch_get_main_queue(), ^{
+                            [tableView reloadData];
+                        });
+                    }];
+                    [alert addAction:sureAction];
+                    [alert addAction:cancelAction];
+                    [weakSelf presentViewController:alert animated:YES completion:^{
+                        
                     }];
                 }];
-                UIAlertAction * cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
-                    
+                action1.backgroundColor = RGB(255, 59, 47);
+                UIContextualAction *action2 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:@"重命名" handler:^(UIContextualAction * _Nonnull action,__kindof UIView * _Nonnull sourceView,void (^ _Nonnull completionHandler)(BOOL)) {
+                    [[ShowNewGroupAlert initShowNewGroupAlertWithTitle:@"重命名通讯录" changeStr:smodel.Name confirm:^(NSString * _Nonnull groupName) {
+                        SHOWLOADING
+                        [[HttpManager sharedHttpManager] POSTUrl:[NSString stringWithFormat:@"%@%@",BaseUrl,AddressBookGroup_Update_Post] parameters:@{@"GroupName":groupName,@"AddressBookGroupId":@(smodel.Id)} responseStyle:DATA success:^(id  _Nonnull responseObject) {
+                            REMOVESHOW
+                            STRONGSELF
+                            [strongSelf getData];
+                        } failure:^(NSError * _Nonnull error) {
+                            REMOVESHOW
+                        }];
+                    } cancle:^{
+                        dispatch_async(dispatch_get_main_queue(), ^{
+                            [tableView reloadData];
+                        });
+                    }] show];
                 }];
-                [alert addAction:sureAction];
-                [alert addAction:cancelAction];
-                [weakSelf presentViewController:alert animated:YES completion:^{
+                action2.backgroundColor = RGB(255, 149, 3);
+                UISwipeActionsConfiguration *actions = [UISwipeActionsConfiguration configurationWithActions:@[action1,action2]];
+                actions.performsFirstActionWithFullSwipe = NO;
+                return actions;
+            }
+                break;
+            default:
+            {
+                UISwipeActionsConfiguration *actions = [UISwipeActionsConfiguration configurationWithActions:@[]];
+                actions.performsFirstActionWithFullSwipe = NO;
+                return actions;
+            }
+                break;
+        }
+    }else{
+        WEAKSELF
+        NSArray * array = self.cusNameArray[indexPath.section - self.dataSourceArray.count];
+        SelectModel * model = array[indexPath.row];
+        UIContextualAction *action1 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:@"删除" handler:^(UIContextualAction * _Nonnull action,__kindof UIView * _Nonnull sourceView,void (^ _Nonnull completionHandler)(BOOL)) {
+            UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:UIAlertControllerStyleAlert];
+            
+            UIAlertAction *ok = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    [tableView reloadData];
+                });
+            }];
+            [ok setValue:k9 forKey:@"_titleTextColor"];
+            UIAlertAction *noOk = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                [[HttpManager sharedHttpManager] DeleteUrl:Host(API_APP_User_Friends) parameters:@{@"UserIds":@[@(model.Id)]} responseStyle:DATA success:^(id  _Nonnull responseObject) {
+                    [weakSelf getData];
+                } failure:^(NSError * _Nonnull error) {
                     
                 }];
             }];
-            action1.backgroundColor = RGB(255, 59, 47);
-            UIContextualAction *action2 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:@"重命名" handler:^(UIContextualAction * _Nonnull action,__kindof UIView * _Nonnull sourceView,void (^ _Nonnull completionHandler)(BOOL)) {
-                [[ShowNewGroupAlert initShowNewGroupAlertWithTitle:@"重命名通讯录" changeStr:smodel.Name confirm:^(NSString * _Nonnull groupName) {
-                    SHOWLOADING
-                    [[HttpManager sharedHttpManager] POSTUrl:[NSString stringWithFormat:@"%@%@",BaseUrl,AddressBookGroup_Update_Post] parameters:@{@"GroupName":groupName,@"AddressBookGroupId":@(smodel.Id)} responseStyle:DATA success:^(id  _Nonnull responseObject) {
-                        REMOVESHOW
-                        STRONGSELF
-                        [strongSelf getData];
-                    } failure:^(NSError * _Nonnull error) {
-                        REMOVESHOW
-                    }];
-                } cancle:^{
-                }] show];
-                
-                
-            }];
-            action2.backgroundColor = RGB(255, 149, 3);
-            UISwipeActionsConfiguration *actions = [UISwipeActionsConfiguration configurationWithActions:@[action1,action2]];
-            actions.performsFirstActionWithFullSwipe = NO;
-            return actions;
-        }
-            break;
-        default:
-        {
-            UISwipeActionsConfiguration *actions = [UISwipeActionsConfiguration configurationWithActions:@[]];
-            actions.performsFirstActionWithFullSwipe = NO;
-            return actions;
-        }
-            break;
+            [alertVC addAction:ok];
+            [alertVC addAction:noOk];
+            [weakSelf presentViewController:alertVC animated:YES completion:nil];
+        }];
+        action1.backgroundColor = RGB(255, 59, 47);
+        UIContextualAction *action2 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:@"移动" handler:^(UIContextualAction * _Nonnull action,__kindof UIView * _Nonnull sourceView,void (^ _Nonnull completionHandler)(BOOL)) {
+            MailListMoveVC * vc = [MailListMoveVC initMailListMoveVC];
+            vc.selectArray = @[@(model.Id)];
+            vc.IsRoot = YES;
+            vc.moveBlock = ^{
+                [weakSelf getData];
+            };
+            [weakSelf.navigationController pushViewController:vc animated:YES];
+        }];
+        action2.backgroundColor = UIColorHex(#3D95EE);
+        UISwipeActionsConfiguration *actions = [UISwipeActionsConfiguration configurationWithActions:@[action1,action2]];
+        actions.performsFirstActionWithFullSwipe = NO;
+        return actions;
     }
 }
 
 
 
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
-    return self.dataSourceArray.count;
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+    return self.dataSourceArray.count + self.pinyinArray.count;
 }
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
-    MailModel * model = self.dataSourceArray[section];
-    return model.Items.count;
+    if (section <= (self.dataSourceArray.count - 1)) {
+        MailModel * model = self.dataSourceArray[section];
+        return model.Items.count;
+    }else{
+        NSArray *array = [self.cusNameArray objectAtIndex:(section - self.dataSourceArray.count)];
+        return [array count];
+    }
+}
+#pragma mark - section右侧index数组
+-(NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView{
+    return self.pinyinArray;
+}
+//点击右侧索引表项时调用 索引与section的对应关系
+- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index{
+    return index + self.dataSourceArray.count;
 }
-
 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
-    MailModel * model = self.dataSourceArray[section];
+    WS(weakSelf);
     UIView *headerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 30)];
     [headerView setBackgroundColor:UIColorHex(0xF5F6F8)];
     UILabel *sectionTitle = [[UILabel alloc] init];
@@ -236,127 +306,154 @@
     sectionTitle.font = [UIFont systemFontOfSize:12];
     sectionTitle.textColor = RGB(153, 153, 153);
     sectionTitle.textAlignment = NSTextAlignmentLeft;
-    WS(weakSelf);
-    sectionTitle.text = model.Name;
-    if (model.TypeId == MailListCusType) {
-        UIImageView * imagV = [UIImageView new];
-        imagV.image = IMG(@"create_mlist");
-        UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
-            MailListSortVC * vc = [MailListSortVC initMailListSortVC];
-            vc.dataArray = model.Items;
-            vc.sortBlock = ^{
-                [weakSelf getData];
-            };
-            [weakSelf.navigationController pushViewController:vc animated:YES];
-        }];
-        [headerView addGestureRecognizer:tap];
-        headerView.userInteractionEnabled = YES;
-        [headerView addSubview:imagV];
-        [imagV mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.left.mas_equalTo(sectionTitle.mas_right).offset(8);
-            make.centerY.mas_equalTo(headerView);
-        }];
+    if (section <= (self.dataSourceArray.count - 1)) {
+        MailModel * model = self.dataSourceArray[section];
+        switch (model.TypeId) {
+            case MailListCusType:
+            {
+                sectionTitle.text = model.Name;
+                UIImageView * imagV = [UIImageView new];
+                imagV.image = IMG(@"create_mlist");
+                UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
+                    MailListSortVC * vc = [MailListSortVC initMailListSortVC];
+                    vc.dataArray = model.Items;
+                    [weakSelf.navigationController pushViewController:vc animated:YES];
+                }];
+                [headerView addGestureRecognizer:tap];
+                headerView.userInteractionEnabled = YES;
+                [headerView addSubview:imagV];
+                [imagV mas_makeConstraints:^(MASConstraintMaker *make) {
+                    make.left.mas_equalTo(sectionTitle.mas_right).offset(8);
+                    make.centerY.mas_equalTo(headerView);
+                }];
+            }
+                break;
+            case MailListUserType:
+            {
+                sectionTitle.text = @"";
+            }
+                break;
+            default:
+            {
+                sectionTitle.text = model.Name;
+            }
+                break;
+        }
+    }else{
+        NSString *returnStr = [self.pinyinArray objectAtIndex:(section - self.dataSourceArray.count)];
+        sectionTitle.text = returnStr;
     }
-//    switch (section) {
-//        case 0:
-//        {
-//            sectionTitle.text = @"单位通讯录";
-//        }
-//            break;
-//        case 1:
-//        {
-//            sectionTitle.text = @"系统通讯录";
-//        }
-//            break;
-//        default:
-//        {
-//            UIImageView * imagV = [UIImageView new];
-//            imagV.image = IMG(@"create_mlist");
-//            UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
-//                MailListSortVC * vc = [MailListSortVC initMailListSortVC];
-//                vc.dataArray = [NSMutableArray arrayWithArray:weakSelf.dataSourceArray[section]];
-//                vc.sortBlock = ^{
-//                    [weakSelf getData];
-//                };
-//                [weakSelf.navigationController pushViewController:vc animated:YES];
-//            }];
-//            [headerView addGestureRecognizer:tap];
-//            headerView.userInteractionEnabled = YES;
-//            [headerView addSubview:imagV];
-//            [imagV mas_makeConstraints:^(MASConstraintMaker *make) {
-//                make.left.mas_equalTo(sectionTitle.mas_right).offset(8);
-//                make.centerY.mas_equalTo(headerView);
-//            }];
-//            sectionTitle.text = @"自建通讯录";
-//        }
-//            break;
-//    }
     return headerView;
 }
  
-
 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
-    MailModel * model = self.dataSourceArray[section];
-    if (model.TypeId == MailListUserType) {
-        return 0.01f;
-    }
     return 30.f;
 }
 
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
-    return [MailListCell configCell0Height];
+    if (indexPath.section <= (self.dataSourceArray.count - 1)) {
+        MailModel * model = self.dataSourceArray[indexPath.section];
+        switch (model.TypeId) {
+            case MailListUserType:
+            {
+                return [MailListByZuCell configCell0Height];
+            }
+                break;
+            default:
+            {
+                return [MailListCell configCell0Height];
+            }
+                break;
+        }
+    }else{
+        return [MailListByZuCell configCell0Height];
+    }
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
-    MailListCell *cell = [MailListCell configCell0:tableView indexPath:indexPath];
-    MailModel * model = self.dataSourceArray[indexPath.section];
-    MailSubModel * sModel = [model.Items objectAtIndex:indexPath.row];
-    [cell setDataModel:sModel];
-    return cell;
+    if (indexPath.section <= (self.dataSourceArray.count - 1)) {
+        MailModel * model = self.dataSourceArray[indexPath.section];
+        MailListCell *cell = [MailListCell configCell0:tableView indexPath:indexPath];
+        MailSubModel * sModel = [model.Items objectAtIndex:indexPath.row];
+        [cell setDataModel:sModel];
+        return cell;
+    }else{
+        NSArray * array = self.cusNameArray[indexPath.section - self.dataSourceArray.count];
+        SelectModel * smodel = [array objectAtIndex:indexPath.row];
+        MailListByZuCell *cell = [MailListByZuCell configCell0:tableView indexPath:indexPath];
+        cell.cell0TitleLabel.text = smodel.UserName;
+        [cell.cell0ImgView sd_setImageWithURL:[NSURL URLWithString:smodel.AvatarUrl] placeholderImage:[UIImage imageNamed:@"chatmsg_list_testuser_img"]];
+        return cell;
+    }
 }
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
     [tableView deselectRowAtIndexPath:indexPath animated:YES];
-    MailListCell *cell = [tableView cellForRowAtIndexPath:indexPath];
-    MailListByZuVC *vc = [MailListByZuVC initMailListByZuVC];
-    vc.notChangeSearchColor = self.notSearchChangeColor;
-    vc.isSelectPeople = self.isSelectPeople;
-    vc.isChat = self.isChat;
-    vc.isShow = self.isShow;
-    vc.isCheck = self.isCheck;
-    vc.UserIds = self.UserIds;
-    vc.isReturn = self.isReturn;
-    vc.sendModel = self.sendModel;
-    vc.titleStr = cell.cell0TitleLabel.text;
-    MailModel * model = self.dataSourceArray[indexPath.section];
-    MailSubModel * sModel = [model.Items objectAtIndex:indexPath.row];
-    switch (model.TypeId) {
-        case MailListDesType:
-        {
-            vc.indexId = sModel.Id;
-            vc.pageType = MailListByZuPageType_Sys;
-            [self.navigationController pushViewController:vc animated:YES];
-        }
-            break;
-        case MailListCusType:
-        {
-            vc.indexId = sModel.Id;
-            vc.pageType = MailListByZuPageType_custom;
-            [self.navigationController pushViewController:vc animated:YES];
-        }
-            break;
-        case MailListSysType:
-        {
-
-        }
-            break;
-        default:
-        {
-            MailListDetailVC * userVC = [MailListDetailVC initMailListDetailVC];
-            userVC.indexId = sModel.Id;
-            [self.navigationController pushViewController:userVC animated:YES];
+    if (indexPath.section <= (self.dataSourceArray.count - 1)) {
+        MailModel * model = self.dataSourceArray[indexPath.section];
+        MailListByZuVC *vc = [MailListByZuVC initMailListByZuVC];
+        vc.notChangeSearchColor = self.notSearchChangeColor;
+        vc.isSelectPeople = self.isSelectPeople;
+        vc.isChat = self.isChat;
+        vc.isShow = self.isShow;
+        vc.isCheck = self.isCheck;
+        vc.UserIds = self.UserIds;
+        vc.isReturn = self.isReturn;
+        vc.sendModel = self.sendModel;
+        vc.titleStr = model.Name;
+        switch (model.TypeId) {
+            case MailListDesType:
+            {
+                MailSubModel * sModel = [model.Items objectAtIndex:indexPath.row];
+                vc.indexId = sModel.Id;
+                vc.pageType = MailListByZuPageType_Sys;
+                [self.navigationController pushViewController:vc animated:YES];
+            }
+                break;
+            case MailListCusType:
+            {
+                MailSubModel * sModel = [model.Items objectAtIndex:indexPath.row];
+                vc.indexId = sModel.Id;
+                vc.titleStr = sModel.Name;
+                vc.pageType = MailListByZuPageType_custom;
+                [self.navigationController pushViewController:vc animated:YES];
+            }
+                break;
+            case MailListSysType:
+            {
+                MailSubModel * sModel = [model.Items objectAtIndex:indexPath.row];
+                switch (sModel.TypeValue) {
+                    case 1:
+                    {
+                        MailGroupVC * vc = [[MailGroupVC alloc] init];
+                        [self.navigationController pushViewController:vc animated:YES];
+                    }
+                        break;
+                    case 2:
+                    {
+                        
+                    }
+                        break;
+                    default:
+                    {
+                        
+                    }
+                        break;
+                }
+            }
+                break;
+            default:
+            {
+                
+            }
+                break;
         }
-            break;
+    }else{
+        NSArray * array = self.cusNameArray[indexPath.section - self.dataSourceArray.count];
+        SelectModel * sModel = [array objectAtIndex:indexPath.row];
+        MailListDetailVC * userVC = [MailListDetailVC initMailListDetailVC];
+        userVC.indexId = sModel.Id;
+        [self.navigationController pushViewController:userVC animated:YES];
     }
 }
 
@@ -373,10 +470,21 @@
                 MailModel * model = [MailModel modelWithDictionary:dict];
                 [weakSelf.dataSourceArray addObject:model];
             }
-            dispatch_async(dispatch_get_main_queue(), ^{
-                [weakSelf.tableView reloadData];
-            });
         }
+        NSMutableArray * mArray = [NSMutableArray array];
+        if ([responseObject[@"FriendUsers"] isKindOfClass:[NSArray class]]) {
+            NSArray * array = responseObject[@"FriendUsers"];
+            MailModel * model = [[MailModel alloc] init];
+            model.TypeId = 0;
+            for (NSDictionary * dict in array) {
+                SelectModel * umodel = [[SelectModel alloc] initDict:dict];
+                umodel.SourceId = umodel.UserId;
+                umodel.SourceType = 0;
+                umodel.SourceName = umodel.UserName;
+                [mArray addObject:umodel];
+            }
+        }
+        [weakSelf resetDataSource:mArray];
     } failure:^(NSError * _Nonnull error) {
         REMOVESHOW
     }];
@@ -420,4 +528,49 @@
     }
     return _groupModel;
 }
+- (NSMutableArray *)cusNameArray
+{
+    if (!_cusNameArray) {
+        _cusNameArray = [NSMutableArray array];
+    }
+    return _cusNameArray;
+}
+-(void)resetDataSource:(NSMutableArray *)sArray
+{
+    WS(weakSelf);
+    [self.cusNameArray removeAllObjects];
+    self.pinyinArray = [[NSMutableArray alloc] init];
+    self.nameArray = [[NSMutableArray alloc] init];
+    if (sArray.count > 0) {
+        NSMutableArray *stringsToSort = [[NSMutableArray alloc] init];
+        for(int i = 0;i < [sArray count];i++){
+            SelectModel * smodel = [sArray objectAtIndex:i];
+            NSString * str = [NSString stringWithFormat:@"%@UserId%ld",smodel.UserName,(long)smodel.UserId];
+            [stringsToSort addObject:str];
+        }
+        self.pinyinArray = [ChineseString IndexArray:stringsToSort];
+        self.nameArray = [ChineseString LetterSortArray:stringsToSort];
+        [self.nameArray enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+            NSMutableArray * subAddArray = [NSMutableArray array];
+            for (NSString * string in obj) {
+                NSInteger  flag = 0;
+                BOOL isAdd = NO;
+                for (NSInteger i = 0; i < sArray.count; i ++) {
+                    SelectModel * smodel = [sArray objectAtIndex:i];
+                    if ([string containsString:[NSString stringWithFormat:@"UserId%ld",smodel.UserId]]) {
+                        [subAddArray addObject:smodel];
+                        isAdd = YES;
+                        flag = i;
+                    }
+                }
+            }
+            if (subAddArray.count > 0) {
+                [weakSelf.cusNameArray addObject:subAddArray];
+            }
+        }];
+    }
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [weakSelf.tableView reloadData];
+    });
+}
 @end

+ 18 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailVerifyVC.h

@@ -0,0 +1,18 @@
+//
+//  MailVerifyVC.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/7/16.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MailVerifyVC : BaseViewController
+@property (assign, nonatomic) NSInteger   userId;
++(MailVerifyVC *)initMailVerifyVC;
+@end
+
+NS_ASSUME_NONNULL_END

+ 80 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/MailVerifyVC.m

@@ -0,0 +1,80 @@
+//
+//  MailVerifyVC.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/7/16.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "MailVerifyVC.h"
+#import "MailListMoveVC.h"
+
+@interface MailVerifyVC ()<UITextViewDelegate>
+@property (weak, nonatomic) IBOutlet UIButton *sendBtn;
+@property (weak, nonatomic) IBOutlet UITextView *textView;
+@property (weak, nonatomic) IBOutlet UILabel *countL;
+@property (weak, nonatomic) IBOutlet UIView *groupListV;
+@property (weak, nonatomic) IBOutlet UILabel *GroupNameL;
+@property (copy, nonatomic) NSString        *Name;
+@property (assign, nonatomic) NSInteger      GroupId;
+@end
+
+@implementation MailVerifyVC
++(MailVerifyVC *)initMailVerifyVC{
+    MailVerifyVC *controller = [StoryboardManager.shared.mailList instantiateViewControllerWithIdentifier:@"MailVerifyVC"];
+    return controller;
+}
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.fd_prefersNavigationBarHidden = YES;
+    self.view.backgroundColor = UIColorHex(0xF8F8F8);
+    WS(weakSelf);
+    UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
+        MailListMoveVC * vc = [MailListMoveVC initMailListMoveVC];
+        vc.IsAddUser = YES;
+        vc.selectBlock = ^(NSString * _Nonnull Name, NSInteger GroupId) {
+            weakSelf.Name = Name;
+            weakSelf.GroupId = GroupId;
+            dispatch_async(dispatch_get_main_queue(), ^{
+                weakSelf.GroupNameL.text = Name;
+            });
+        };
+        [weakSelf.navigationController pushViewController:vc animated:YES];
+    }];
+    [self.groupListV addGestureRecognizer:tap];
+    [self.sendBtn setAction:^{
+        NSDictionary * dict = @{@"UserId":@(0),@"FriendsUserId":@(weakSelf.userId),@"AddressBookGroupId":@(weakSelf.GroupId),@"Remark":weakSelf.textView.text};
+        [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_Admin_Verify_Add_Friend) parameters:dict responseStyle:DATA success:^(id  _Nonnull responseObject) {
+            SHOWSUCCESS(@"发送验证成功");
+            [weakSelf.navigationController popViewControllerAnimated:YES];
+        } failure:^(NSError * _Nonnull error) {
+
+        }];
+    }];
+    self.textView.delegate = self;
+}
+//- (void)back
+//{
+//    for ( NSInteger i = (self.navigationController.viewControllers.count - 1); i > 0 ;i --) {
+//        if ([self.navigationController.viewControllers[i] isKindOfClass:NSClassFromString(@"MailListDetailVC")]) {
+//            [self.navigationController popToViewController:self.navigationController.viewControllers[i] animated:YES];
+//            return;
+//        }
+//    }
+//}
+- (void)textViewDidChange:(UITextView *)textView
+{
+    UITextRange *markRange = textView.markedTextRange;
+    NSInteger pos = [textView offsetFromPosition:markRange.start
+                              toPosition:markRange.end];
+    NSInteger nLength = textView.text.length - pos;
+    if (nLength > 100 && pos == 0)
+    {
+        self.countL.text = [NSString stringWithFormat:@"100/100"];
+        self.textView.text = [textView.text substringToIndex:100];
+    }else{
+        self.countL.text = [NSString stringWithFormat:@"%ld/100",textView.text.length];
+    }
+}
+
+@end

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 490 - 664
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/MailList.storyboard


+ 37 - 0
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Model/MailModel.h

@@ -16,6 +16,43 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic,assign) BOOL          IsSelect;
 @property (nonatomic,copy) NSString      * Name;
 @property (nonatomic,strong)NSMutableArray<MailSubModel> *Items;
+
+//AccumulativePrice = 0;
+//AvatarUrl = "/cache/20200117/da09ec643d3e44378b395bffdbeb8f73.jpg";
+//BeginTime = "0001-01-01 00:00:00";
+//City = "<null>";
+//DepartmentId = 192;
+//DepartmentIds = "<null>";
+//DepartmentName = "\U6cf0\U5fb7\U5408\U4f17\U79d1\U6280\U6709\U9650\U8d23\U4efb\U516c\U53f8,\U6cf0\U5fb7\U5408\U4f17\U79d1\U6280\U6709\U9650\U8d23\U4efb\U516c\U53f8/\U6cf0\U5fb7\U5408\U4f17\U7ecf\U8425\U56e2\U961f,\U6cf0\U5fb7\U5408\U4f17\U79d1\U6280\U6709\U9650\U8d23\U4efb\U516c\U53f8/\U6210\U90fd\U7814\U53d1\U4e2d\U5fc3";
+//Description = "\U50cf\U4e00\U9635\U98ce";
+//Email = "<null>";
+//EndTime = "0001-01-01 00:00:00";
+//EntryDataTime = "0001-01-01 00:00:00";
+//Gender = Male;
+//Id = 6;
+//ImId = 17311267313;
+//IsDisable = 0;
+//IsFreeze = 0;
+//IsLeader = 0;
+//IsMute = 0;
+//IsNotice = 0;
+//IsPrivateLetter = 0;
+//IsRenewal = 0;
+//IsReply = 0;
+//IsShake = 0;
+//IsUpload = 1;
+//IsVip = 1;
+//Name = "\U674e\U660a";
+//Nick = "\U98ce\U7b5d";
+//OpenId = or6O8v0ruGrwSF7mpt5uWoHMqbI4;
+//Phone = 17311267313;
+//Port = 0;
+//Position = "<null>";
+//QRCoder = "/cache/20191203/dae985df7e0d4772a59431c4d3c03ff0.jpeg";
+//Remark = "<null>";
+//RoleId = 0;
+//Signature = "\U50cf\U4e00\U9635\U98ce";
+//TypeId = 0;
 @end
 
 NS_ASSUME_NONNULL_END

+ 5 - 5
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListByZuCell.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -17,7 +17,7 @@
                 <rect key="frame" x="0.0" y="0.0" width="320" height="65"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="wXW-oq-7Zm">
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="wXW-oq-7Zm">
                         <rect key="frame" x="15" y="12.5" width="40" height="40"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="40" id="pDm-Qh-vJi"/>
@@ -62,7 +62,7 @@
                 <rect key="frame" x="0.0" y="0.0" width="320" height="65"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0DL-k6-3ir">
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0DL-k6-3ir">
                         <rect key="frame" x="46" y="12.5" width="40" height="40"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="40" id="DUj-Z0-efP"/>
@@ -119,7 +119,7 @@
                 <rect key="frame" x="0.0" y="0.0" width="320" height="65"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="EAS-YK-9MD">
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="EAS-YK-9MD">
                         <rect key="frame" x="15" y="12.5" width="40" height="40"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="40" id="gaK-oE-dpJ"/>

+ 2 - 2
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListCell.h

@@ -13,12 +13,12 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface MailListCell : UITableViewCell
 
-@property (strong,nonatomic) IBOutlet UILabel *cell0TitleLabel;
+@property (weak,nonatomic) IBOutlet UILabel *cell0TitleLabel;
 @property (weak, nonatomic) IBOutlet UIImageView *rightView;
 
 @property (weak, nonatomic) IBOutlet UIView *editorVIew;
 
-@property (strong,nonatomic) IBOutlet UIView *cell1SearchBgView;
+@property (weak,nonatomic) IBOutlet UIView *cell1SearchBgView;
 @property (weak,nonatomic) IBOutlet UIButton *cell1SearchButton;
 @property (assign,nonatomic) BOOL             isSort;
 + (CGFloat)configCell0Height;

+ 0 - 7
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListCell.m

@@ -35,11 +35,6 @@
         cell = [[[NSBundle mainBundle] loadNibNamed:@"MailListCell" owner:nil options:nil] objectAtIndex:0];
     }
     cell.selectionStyle = UITableViewCellSelectionStyleNone;
-//    cell.cell0ZiJianLabel.hidden = YES;
-//    
-//    [cell.cell0ZiJianLabel setRadius:2 corners:UIRectCornerAllCorners];
-//    cell.cell0ZiJianLabel.backgroundColor = RGB(57, 121, 211);
-    
     return cell;
 }
 
@@ -86,8 +81,6 @@
                 }
             }
         }
-    }else{
-        self.rightView.hidden = NO;
     }
 }
 @end

+ 2 - 2
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListCell.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>

+ 3 - 1
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListDetailCell.h

@@ -22,9 +22,10 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (strong,nonatomic) IBOutlet UILabel *cell1TitleLabel;
 @property (strong,nonatomic) IBOutlet UILabel *cell1ValueLabel;
+@property (weak, nonatomic) IBOutlet UISwitch *switchV;
 
 @property (strong,nonatomic) IBOutlet UILabel *cell2TitleLabel; 
-
+@property (copy, nonatomic) void(^ChangeSwitchBlock)(BOOL isOn);
 + (CGFloat)configCell0Height;
 + (CGFloat)configCell1Height;
 + (CGFloat)configCell2Height;
@@ -32,6 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
 + (MailListDetailCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
 + (MailListDetailCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
 + (MailListDetailCell *)configCell2:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
++ (MailListDetailCell *)configCell3:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
 
 @end
 

+ 18 - 1
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListDetailCell.m

@@ -63,5 +63,22 @@
      
     return cell;
 }
-
++ (MailListDetailCell *)configCell3:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
+    static NSString *cellIdentifer = @"MailListDetailCell3";
+    MailListDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
+    if (cell == nil) {
+        cell = [[[NSBundle mainBundle] loadNibNamed:@"MailListDetailCell" owner:nil options:nil] objectAtIndex:3];
+    }
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    cell.switchV.transform = CGAffineTransformMakeScale(0.75, 0.75);
+    cell.switchV.onTintColor = UIColorHex(0x3979D3);
+    [cell.switchV addTarget:cell action:@selector(changeValue:) forControlEvents:UIControlEventValueChanged];
+    return cell;
+}
+- (void)changeValue:(UISwitch *)swith
+{
+    if (self.ChangeSwitchBlock) {
+        self.ChangeSwitchBlock(swith.isOn);
+    }
+}
 @end

+ 45 - 4
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/View/MailListDetailCell.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -45,7 +45,7 @@
                                             <color key="titleColor" red="0.058823529409999999" green="0.49803921569999998" blue="0.85098039219999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         </state>
                                     </button>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lk8-xP-OvB">
+                                    <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lk8-xP-OvB">
                                         <rect key="frame" x="270" y="0.0" width="50" height="44"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="50" id="GU6-ct-ZeK"/>
@@ -231,7 +231,48 @@
             <connections>
                 <outlet property="cell2TitleLabel" destination="rHb-Z7-p8c" id="6Mv-Ll-moA"/>
             </connections>
-            <point key="canvasLocation" x="132" y="346"/>
+            <point key="canvasLocation" x="132" y="350"/>
+        </tableViewCell>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MailListDetailCell3" id="S8J-Xi-nkE" customClass="MailListDetailCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="S8J-Xi-nkE" id="PhT-U6-jY4">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2hb-ht-da3">
+                        <rect key="frame" x="15" y="12" width="42" height="20.5"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <color key="textColor" red="0.039215686270000001" green="0.039215686270000001" blue="0.039215686270000001" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K1B-Pn-8Un">
+                        <rect key="frame" x="0.0" y="43.5" width="320" height="0.5"/>
+                        <color key="backgroundColor" red="0.93333333330000001" green="0.93333333330000001" blue="0.93333333330000001" alpha="1" colorSpace="calibratedRGB"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="0.5" id="hzN-aI-0al"/>
+                        </constraints>
+                    </view>
+                    <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Qw2-V0-YsJ">
+                        <rect key="frame" x="256" y="6.5" width="51" height="31"/>
+                    </switch>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="trailing" secondItem="Qw2-V0-YsJ" secondAttribute="trailing" constant="15" id="7Qd-Bj-KQE"/>
+                    <constraint firstAttribute="trailing" secondItem="K1B-Pn-8Un" secondAttribute="trailing" id="Abh-C2-W3u"/>
+                    <constraint firstItem="Qw2-V0-YsJ" firstAttribute="centerY" secondItem="PhT-U6-jY4" secondAttribute="centerY" id="D2s-f2-fgj"/>
+                    <constraint firstItem="2hb-ht-da3" firstAttribute="leading" secondItem="PhT-U6-jY4" secondAttribute="leading" constant="15" id="YlD-ky-5Ch"/>
+                    <constraint firstAttribute="bottom" secondItem="K1B-Pn-8Un" secondAttribute="bottom" id="fr0-j7-puM"/>
+                    <constraint firstItem="2hb-ht-da3" firstAttribute="centerY" secondItem="PhT-U6-jY4" secondAttribute="centerY" id="hBU-vL-lUq"/>
+                    <constraint firstItem="K1B-Pn-8Un" firstAttribute="leading" secondItem="PhT-U6-jY4" secondAttribute="leading" id="hoh-8N-SJ0"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="Atc-Ij-AjD"/>
+            <connections>
+                <outlet property="cell2TitleLabel" destination="2hb-ht-da3" id="LXp-TV-a1a"/>
+                <outlet property="switchV" destination="Qw2-V0-YsJ" id="WED-Aa-fpn"/>
+            </connections>
+            <point key="canvasLocation" x="132" y="444"/>
         </tableViewCell>
     </objects>
     <resources>

+ 55 - 31
smartRhino/Project/VCModel/ChatMessage/Controller/MyTDGroup/VC/MyTDGroupViewController.m

@@ -46,9 +46,11 @@
 @end
 
 @implementation MyTDGroupViewController
-- (void)viewWillDisappear:(BOOL)animated
+
+- (void)viewDidDisappear:(BOOL)animated
 {
-    [super viewWillDisappear:animated];
+    [super viewDidDisappear:animated];
+    [self changeToOperation:NO];
 }
 - (void)viewDidLoad {
     [super viewDidLoad];
@@ -424,33 +426,33 @@
 
 }
 -(void)initBottomBgView{
-    self.leftCloseBtn = [UIButton buttonWithType:UIButtonTypeCustom];
-    [self.leftCloseBtn setTitle:@"删除" forState:UIControlStateNormal];
-    [self.leftCloseBtn setTitleColor:RGB(255, 82, 82) forState:UIControlStateNormal];
-    self.leftCloseBtn.titleLabel.font = [UIFont systemFontOfSize:15];
-    
-    [self.operationBottomBgView addSubview:self.leftCloseBtn];
-    self.leftCloseBtn.frame = CGRectMake(0, 10, SCREEN_WIDTH/2, self.operationBottomBgView.height - 10);
+//    self.leftCloseBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+//    [self.leftCloseBtn setTitle:@"删除" forState:UIControlStateNormal];
+//    [self.leftCloseBtn setTitleColor:RGB(255, 82, 82) forState:UIControlStateNormal];
+//    self.leftCloseBtn.titleLabel.font = [UIFont systemFontOfSize:15];
+//
+//    [self.operationBottomBgView addSubview:self.leftCloseBtn];
+//    self.leftCloseBtn.frame = CGRectMake(0, 10, SCREEN_WIDTH/2, self.operationBottomBgView.height - 10);
     
     self.self.rightMoveBtn = [UIButton buttonWithType:UIButtonTypeCustom];
     [self.rightMoveBtn setTitle:@"移动" forState:UIControlStateNormal];
-    [self.rightMoveBtn setTitleColor:RGB(57, 121, 211) forState:UIControlStateNormal];
-    [self.rightMoveBtn setTitleColor:UIColorHex(#BBBBBB) forState:UIControlStateDisabled];
+//    [self.rightMoveBtn setTitleColor:RGB(57, 121, 211) forState:UIControlStateNormal];
+    [self.rightMoveBtn setTitleColor:UIColorHex(#BBBBBB) forState:UIControlStateNormal];
     self.rightMoveBtn.enabled = NO;
     self.rightMoveBtn.titleLabel.font = [UIFont systemFontOfSize:15];
     
     [self.operationBottomBgView addSubview:self.rightMoveBtn];
-    self.rightMoveBtn.frame = CGRectMake(SCREEN_WIDTH/2, 10, SCREEN_WIDTH/2, self.operationBottomBgView.height - 10);
+    self.rightMoveBtn.frame = CGRectMake(0, 10, SCREEN_WIDTH, self.operationBottomBgView.height - 10);
     
-    UIView *line = [[UIView alloc] init];
-    line.backgroundColor = RGB(240, 239, 244);
-    [self.operationBottomBgView addSubview:line];
-    line.frame = CGRectMake(SCREEN_WIDTH/2, 0, .5, self.operationBottomBgView.height);
-    
-    UIView *topLine = [[UIView alloc] init];
-    topLine.backgroundColor = RGB(240, 239, 244);
-    [self.operationBottomBgView addSubview:topLine];
-    topLine.frame = CGRectMake(0, 0, SCREEN_WIDTH, 10);
+//    UIView *line = [[UIView alloc] init];
+//    line.backgroundColor = RGB(240, 239, 244);
+//    [self.operationBottomBgView addSubview:line];
+//    line.frame = CGRectMake(SCREEN_WIDTH/2, 0, .5, self.operationBottomBgView.height);
+//
+//    UIView *topLine = [[UIView alloc] init];
+//    topLine.backgroundColor = RGB(240, 239, 244);
+//    [self.operationBottomBgView addSubview:topLine];
+//    topLine.frame = CGRectMake(0, 0, SCREEN_WIDTH, 10);
     
     WS(weakSelf);
     [self.leftCloseBtn setAction:^{
@@ -467,6 +469,7 @@
             [weakSelf deleteFind:selectIDArray];
         }
     }];
+    self.leftCloseBtn.hidden = YES;
     [self.rightMoveBtn setAction:^{
         NSMutableArray *selectIDArray = [NSMutableArray array];
         for (NoticeModel * model in weakSelf.dataArray) {
@@ -532,6 +535,7 @@
         [self.view layoutIfNeeded];
         [self.tableView layoutIfNeeded];
         [self.tableView setEditing:YES];
+        self.tableView.allowsSelectionDuringEditing = YES;
     }else{
         [self.tableView setEditing:NO];
         if (self.titleStr.length == 0) {
@@ -650,6 +654,7 @@
 }
 - (void)menuAction:(id)sender{
     [super menuAction:sender];
+    [self changeToOperation:NO];
 }
 #pragma mark - setter
 - (TDTableView *)tableView{
@@ -822,6 +827,7 @@
             default:{
                 NoticeModel *model = [self.dataArray objectAtIndex:indexPath.row];
                 self.isAllSelect = [self checkChatListArray];
+                [self isMoveCheckData];
                 self.selectCountL.text = [NSString stringWithFormat:@"%ld",[self CountSelectArray]];
                 if (self.isAllSelect) {
                     [self.allSelectBtn setImage:IMG(@"sendinfo_yes") forState:UIControlStateNormal];
@@ -842,6 +848,9 @@
                         cell.isSort = YES;
                         [cell.cell1SelectButton setAction:^{
                             model.IsSelect = !model.IsSelect;
+                            if (model.IsSelect) {
+                                SHOWERROR(@"文件夹不能移动");
+                            }
                             [weakSelf.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
                         }];
                         return cell;
@@ -874,8 +883,10 @@
         case OperationStateEnum1:{
             NSLog(@"编辑状态的cell");
             self.dataArray[indexPath.row].IsSelect = !self.dataArray[indexPath.row].IsSelect;
+            if (self.dataArray[indexPath.row].IsSelect) {
+                SHOWERROR(@"文件夹不能移动");
+            }
             [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
-            self.rightMoveBtn.enabled = [self isMoveCheckData];
         }break;
         default:{
             NSLog(@"正常状态的cell");
@@ -946,21 +957,31 @@
     vc.GroupId = [self.pushDict[@"Id"] integerValue];
     [self.navigationController pushViewController:vc animated:NO];
 }
-- (BOOL)isMoveCheckData
+- (void)isMoveCheckData
 {
-    BOOL isSelect = NO;
+    BOOL flag = NO;
+    BOOL use = NO;
     for (NoticeModel * model in self.dataArray) {
-        if (model.AttributeValue == 2 && model.IsSelect) {
-            return NO;
-        }
         if (model.IsSelect) {
-            isSelect = YES;
+            if (model.AttributeValue == 2) {
+                flag = YES;
+            }else{
+                use = YES;
+            }
         }
     }
-    if (!isSelect) {
-        return NO;
+    if (flag) {
+        [self.rightMoveBtn setTitleColor:UIColorHex(0xBBBBBB) forState:UIControlStateNormal];
+        self.rightMoveBtn.enabled = NO;
+    }else{
+        if (!use) {
+            [self.rightMoveBtn setTitleColor:UIColorHex(0xBBBBBB) forState:UIControlStateNormal];
+            self.rightMoveBtn.enabled = NO;
+        }else{
+            [self.rightMoveBtn setTitleColor:RGB(57, 121, 211) forState:UIControlStateNormal];
+            self.rightMoveBtn.enabled = YES;
+        }
     }
-    return YES;
 }
 
 - (UIButton *)allSelectBtn
@@ -1029,6 +1050,9 @@
     [self.allSelectBtn setAction:^{
         for (NoticeModel *model in weakSelf.dataArray) {
             model.IsSelect = !weakSelf.isAllSelect;
+            if (model.IsSelect && model.AttributeValue == 2) {
+                SHOWERROR(@"文件夹不能移动");
+            }
         }
         dispatch_async(dispatch_get_main_queue(), ^{
             [weakSelf.tableView reloadData];

+ 27 - 10
smartRhino/Project/VCModel/ChatMessage/Controller/TDInternalLeter/contoller/TDInterLeterHomeViewController.m

@@ -1370,7 +1370,6 @@
             model.IsSelect  = !model.IsSelect;
             [self sumCount];
             [tableView reloadRowAtIndexPath:indexPath withRowAnimation:UITableViewRowAnimationAutomatic];
-            return;
         }break;
     }
 }
@@ -1381,7 +1380,7 @@
     NoticeModel *model = self.interLetterArray[sourceIndexPath.row];
     NoticeModel *toModel = self.interLetterArray[destinationIndexPath.row];
     WS(weakSelf);
-    if (model.AttributeValue == toModel.AttributeValue && model.IsTop == toModel.IsTop) {
+    if (model.AttributeValue == toModel.AttributeValue && model.IsTop && toModel.IsTop) {
         [[HttpManager sharedHttpManager] POSTUrl:Host(API_Find_Sort) parameters:@{@"MiddleIdFirst":@(model.Id),@"MiddleIdSecond":@(toModel.Id)} responseStyle:DATA success:^(id  _Nonnull responseObject) {
             [weakSelf.interLetterArray removeObject:model];
             [weakSelf.interLetterArray insertObject:model atIndex:destinationIndexPath.row];
@@ -1412,19 +1411,30 @@
 }
 #pragma mark - 设置 移动按钮 样式
 - (void)setingMoveButton{
-    NSInteger flag = 1;
+    BOOL flag = NO;
+    BOOL use = NO;
     for (NoticeModel *model  in self.interLetterArray) {
         if (model.IsSelect) {
             if (model.AttributeValue == 2) {
-                flag += 1;
+                flag = YES;
+            }else{
+                use = YES;
             }
         }
     }
-    if (flag == 1) {
-        self.opearateRightBtn.enabled = YES;
+    if (flag) {
+        [self.rightMoveBtn setTitleColor:UIColorHex(0xBBBBBB) forState:UIControlStateNormal];
+        self.rightMoveBtn.enabled = NO;
     }else{
-        self.opearateRightBtn.enabled = NO;
+        if (!use) {
+            [self.rightMoveBtn setTitleColor:UIColorHex(0xBBBBBB) forState:UIControlStateNormal];
+            self.rightMoveBtn.enabled = NO;
+        }else{
+            [self.rightMoveBtn setTitleColor:RGB(57, 121, 211) forState:UIControlStateNormal];
+            self.rightMoveBtn.enabled = YES;
+        }
     }
+    
 }
 -(NSMutableArray *)getMenuDataSource:(NSMutableArray *)titleArray{
     NSMutableArray *menuDataSourceArray = [[NSMutableArray alloc] init];
@@ -1477,8 +1487,8 @@
     self.opearateLeftBtn = leftCloseBtn;
     UIButton *rightMoveBtn = [UIButton buttonWithType:UIButtonTypeCustom];
     [rightMoveBtn setTitle:@"移动" forState:UIControlStateNormal];
-    [rightMoveBtn setTitleColor:RGB(57, 121, 211) forState:UIControlStateNormal];
-    [rightMoveBtn setTitleColor:UIColorHex(#BBBBBB) forState:UIControlStateDisabled];
+    [rightMoveBtn setTitleColor:UIColorHex(#BBBBBB) forState:UIControlStateNormal];
+//    [rightMoveBtn setTitleColor:UIColorHex(#BBBBBB) forState:UIControlStateDisabled];
     rightMoveBtn.titleLabel.font = [UIFont systemFontOfSize:15];
     
     [self.operationBottomBgView addSubview:rightMoveBtn];
@@ -1535,7 +1545,7 @@
 }
 - (void)launchMoveVC:(NSMutableArray<NSNumber*>*)selectIDArray{
     MoveViewController * vc = [MoveViewController initMoveViewController];
-    vc.TypeId = CreateCommonType;
+    vc.TypeId = CreateShouType;
     vc.collectType = CollectHanderType_Move;
     vc.ParentId = 0;
     vc.titleStr = @"移动到";
@@ -1636,6 +1646,8 @@
         }else{
             self.deleteSelectBtn.hidden = YES;
         }
+        self.fd_interactivePopDisabled = YES;
+        self.tableView.allowsSelectionDuringEditing = YES;
     }else{
         [self addRefresh];
         if(self.pageType == PageTypeFromTitleDeleted){
@@ -1676,6 +1688,7 @@
         }
         [self.operationAllSelectButton setImage:IMG(@"menu_black_icon") forState:UIControlStateNormal];
         [self.operationAllSelectButton setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
+        self.fd_interactivePopDisabled = NO;
     }
     [self.tableView reloadData];
 }
@@ -2113,6 +2126,9 @@
     [self.allSelectBtn setAction:^{
         for (NoticeModel *model in weakSelf.interLetterArray) {
             model.IsSelect = !weakSelf.isAllselect;
+            if (model.IsSelect && model.AttributeValue == 2) {
+                SHOWERROR(@"文件夹不能移动");
+            }
         }
         NSInteger count = 0;
         for (NoticeModel * smodel in weakSelf.interLetterArray) {
@@ -2120,6 +2136,7 @@
                 count ++;
             }
         }
+        
         [weakSelf.allSelectBtn setImage:count == weakSelf.interLetterArray.count ? IMG(@"sendinfo_yes") : IMG(@"sendinfo_no") forState:UIControlStateNormal];
         weakSelf.selectCountL.text = [NSString stringWithFormat:@"%ld",(long)count];
         dispatch_async(dispatch_get_main_queue(), ^{

+ 1 - 1
smartRhino/Project/VCModel/Home/OtherHomeVC/MyTDTopic/VC/MyTDTopicCreateVC.m

@@ -138,7 +138,7 @@
     // 导航代理
     self.webView.navigationDelegate = self;
     self.webView.scrollView.delegate = self;
-    self.automaticallyAdjustsScrollViewInsets = YES;
+//    self.automaticallyAdjustsScrollViewInsets = YES;
     NSURL *pathUrl = [NSURL URLWithString:HtmlHost(@"/mobile/editor")];
 //    NSURL *pathUrl = [NSURL URLWithString:@"http://192.168.0.118:8080/admin/mobile/editor"];
     NSURLRequest *request = [NSURLRequest requestWithURL:pathUrl];

+ 79 - 65
smartRhino/Project/VCModel/Home/OtherHomeVC/MyTDTopic/VC/MyTDTopicDetailVC.m

@@ -322,72 +322,80 @@
 }
 - (void)setBottomViewData:(MyNoteBookDetailModel *)model
 {
-    self.countComment = model.CommentCount;
-    if (model.CommentCount == 0) {
-        self.commentCountL.text = [NSString stringWithFormat:@"评 论"];
-    }else{
-        if (model.CommentCount > 10000) {
-            self.commentCountL.text = [NSString stringWithFormat:@"%.1f万\n评 论",model.CommentCount / 10000.0];
-        }else{
-            self.commentCountL.text = [NSString stringWithFormat:@"%ld\n评 论",(long)model.CommentCount];
-        }
-    }
-    self.zanCountL.text = [NSString stringWithFormat:@"%ld",(long)model.PraiseCount];
-    self.collectL.text = [NSString stringWithFormat:@"%ld",(long)model.CollectCount];
-    self.shareCountL.text = [NSString stringWithFormat:@"%ld",(long)model.RetransmissionCount];
-    
-    self.zanCountL.hidden = model.PraiseCount == 0 ? YES : NO;
-    self.collectL.hidden = model.CollectCount == 0 ? YES : NO;
-    self.shareCountL.hidden = model.RetransmissionCount == 0 ? YES : NO;
-    
-    self.zanImgV.image = model.IsPraise ? IMG(@"zan_yes"):IMG(@"zan_no");
-    self.collectImgV.image = model.IsCollect ? IMG(@"icon_collect_off"):IMG(@"收藏五角星");
-    self.shareImgV.image = IMG(@"icon_share");
     WS(weakSelf);
-    [self.collectButton setAction:^{
-        weakSelf.dismissSelf = YES;
-        if (model.IsCollect) {
-            dispatch_async(dispatch_get_main_queue(), ^{
-                UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"真的取消收藏吗?" message:nil preferredStyle:UIAlertControllerStyleAlert];
-                UIAlertAction *actionYes = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                    NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
-                    [dic setValue:@(self.Id) forKey:@"CollectionDataId"];
-                    ///     1文章 2话题 3 收藏 4笔记 5通知 6站内信 7小组 8 会议详情 14工作流审批 300 文件 400 会议纪要
-                    NSInteger type = weakSelf.type;
-                    switch (weakSelf.type) {
-                        case CollectModel_meet:
-                            type = 400;
-                            break;
-                        default:
-                            break;
-                    }
-                    [dic setValue:@(type) forKey:@"CollectionType"];
-                    [dic setValue:@(0) forKey:@"FolderId"];
-                    [dic setValue:@(0) forKey:@"SourceUserId"];
-
-                    [[HttpManager sharedHttpManager] PUTUrl:Host(API_CreateCollect) parameters:dic success:^(id  _Nonnull responseObject) {
-                        [weakSelf refreshData];
-                    } failure:^(NSError * _Nonnull error) {
-                        //                    SHOWERROR([ZYCTool handerResultData:error]);
-                    }];
-                    [weakSelf setCusMenuShare];
-                }];
-                UIAlertAction *actionNo = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
-                    [weakSelf setCusMenuShare];
-                }];
-                [alert addAction:actionYes];
-                [alert addAction:actionNo];
-                [weakSelf presentViewController:alert animated:YES completion:^{
-                    
-                }];
-            });
+    __block MyNoteBookDetailModel * weakModel = model;
+    dispatch_async(dispatch_get_main_queue(), ^{
+        weakSelf.countComment = weakModel.CommentCount;
+        if (weakModel.CommentCount == 0) {
+            weakSelf.commentCountL.text = [NSString stringWithFormat:@"评 论"];
         }else{
-            [weakSelf gotoCollectHander];
+            if (weakModel.CommentCount > 10000) {
+                weakSelf.commentCountL.text = [NSString stringWithFormat:@"%.1f万\n评 论",weakModel.CommentCount / 10000.0];
+            }else{
+                weakSelf.commentCountL.text = [NSString stringWithFormat:@"%ld\n评 论",(long)weakModel.CommentCount];
+            }
         }
-    }];
-    self.zanCountL.textColor = model.IsPraise ? UIColorHex(#009AFF):UIColorHex(#999999);
-    self.collectL.textColor = model.IsCollect ? UIColorHex(#009AFF):UIColorHex(#999999);
-    self.shareCountL.textColor = UIColorHex(#009AFF);
+        weakSelf.zanCountL.text = [NSString stringWithFormat:@"%ld",(long)weakModel.PraiseCount];
+        weakSelf.collectL.text = [NSString stringWithFormat:@"%ld",(long)weakModel.CollectCount];
+        weakSelf.shareCountL.text = [NSString stringWithFormat:@"%ld",(long)weakModel.RetransmissionCount];
+        
+        weakSelf.zanCountL.hidden = weakModel.PraiseCount == 0 ? YES : NO;
+        weakSelf.collectL.hidden = weakModel.CollectCount == 0 ? YES : NO;
+        weakSelf.shareCountL.hidden = weakModel.RetransmissionCount == 0 ? YES : NO;
+        
+        weakSelf.zanImgV.image = weakModel.IsPraise ? IMG(@"zan_yes"):IMG(@"zan_no");
+        weakSelf.collectImgV.image = weakModel.IsCollect ? IMG(@"icon_collect_off"):IMG(@"收藏五角星");
+        weakSelf.shareImgV.image = IMG(@"icon_share");
+        weakSelf.zanCountL.textColor = weakModel.IsPraise ? UIColorHex(#009AFF):UIColorHex(#999999);
+        weakSelf.collectL.textColor = weakModel.IsCollect ? UIColorHex(#009AFF):UIColorHex(#999999);
+        weakSelf.shareCountL.textColor = UIColorHex(#009AFF);
+        [weakSelf.collectButton setAction:^{
+            weakSelf.dismissSelf = YES;
+            if (weakModel.IsCollect) {
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"真的取消收藏吗?" message:nil preferredStyle:UIAlertControllerStyleAlert];
+                    UIAlertAction *actionYes = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                        NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
+                        [dic setValue:@(weakSelf.Id) forKey:@"CollectionDataId"];
+                        ///     1文章 2话题 3 收藏 4笔记 5通知 6站内信 7小组 8 会议详情 14工作流审批 300 文件 400 会议纪要
+                        NSInteger type = weakSelf.type;
+                        switch (weakSelf.type) {
+                            case CollectModel_meet:
+                                type = 400;
+                                break;
+                            default:
+                                break;
+                        }
+                        [dic setValue:@(type) forKey:@"CollectionType"];
+                        [dic setValue:@(0) forKey:@"FolderId"];
+                        [dic setValue:@(0) forKey:@"SourceUserId"];
+                        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                            [[HttpManager sharedHttpManager] PUTUrl:Host(API_CreateCollect) parameters:dic success:^(id  _Nonnull responseObject) {
+                                [weakSelf refreshData];
+                            } failure:^(NSError * _Nonnull error) {
+                                //                    SHOWERROR([ZYCTool handerResultData:error]);
+                            }];
+                        });
+                        [weakSelf setCusMenuShare];
+                    }];
+                    UIAlertAction *actionNo = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+                        [weakSelf setCusMenuShare];
+                    }];
+                    [alert addAction:actionYes];
+                    [alert addAction:actionNo];
+                    [weakSelf presentViewController:alert animated:YES completion:^{
+                        
+                    }];
+                });
+            }else{
+                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                    [weakSelf gotoCollectHander];
+                });
+            }
+        }];
+    });
+
+
 }
 #pragma mark - 网络请求数据
 - (void)getNoticeData
@@ -901,6 +909,7 @@
 - (void)refreshAritleData
 {
     WS(weakSelf);
+    SHOWLOADING
     dispatch_semaphore_t sem = dispatch_semaphore_create(0);
     __block NSInteger httpFinishCount = 0;
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -911,7 +920,7 @@
                 dispatch_semaphore_signal(sem);
             }
         } failure:^(NSError * _Nonnull error) {
-            
+            REMOVESHOW
         }];
         NSDictionary * AnaParaDict = @{@"SourceId":@(self.Id),
                                        @"TypeValue":@(0),//会议 10
@@ -926,10 +935,11 @@
                 dispatch_semaphore_signal(sem);
             }
         } failure:^(NSError * _Nonnull error) {
-            //            SHOWERROR([ZYCTool handerResultData:error]);
+            REMOVESHOW
         }];
         dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
         dispatch_async(dispatch_get_main_queue(), ^{
+            REMOVESHOW
             [weakSelf.tableView.mj_header endRefreshing];
             [weakSelf.tableView.mj_footer endRefreshing];
             [weakSelf setBottomViewData:weakSelf.currentNoteModel];
@@ -1905,10 +1915,14 @@
     //    收藏类型 1文章 2话题 3 收藏 4笔记 5通知 6站内信 7小组 8 会议详情 14工作流审批 300 文件 400 会议纪要
     switch (self.type) {
         case CollectModel_meet:
+        {
             vc.CollectionType = 400;
+        }
             break;
         default:
+        {
             vc.CollectionType = self.type;
+        }
             break;
     }
     [self.navigationController pushViewController:vc animated:YES];

+ 33 - 22
smartRhino/Project/VCModel/My_Center/Controller/ColletionVC/Cell/MyFavoriteCell.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -18,17 +18,15 @@
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="文件夹类型" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V9Z-jl-CCz">
-                        <rect key="frame" x="68" y="10" width="210" height="20"/>
+                        <rect key="frame" x="68" y="10" width="82" height="20"/>
                         <constraints>
+                            <constraint firstAttribute="width" relation="lessThanOrEqual" constant="180" id="I2e-VJ-isR"/>
                             <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="nxs-aa-cOn"/>
                         </constraints>
                         <fontDescription key="fontDescription" type="system" pointSize="16"/>
                         <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="252" verticalHuggingPriority="251" image="置顶" translatesAutoresizingMaskIntoConstraints="NO" id="uc4-iu-T2S">
-                        <rect key="frame" x="293" y="22" width="30" height="16"/>
-                    </imageView>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_placeHolderHorizon" translatesAutoresizingMaskIntoConstraints="NO" id="WcM-ws-bpJ">
                         <rect key="frame" x="15" y="10" width="40" height="40"/>
                         <constraints>
@@ -50,28 +48,29 @@
                         <nil key="highlightedColor"/>
                     </label>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="252" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LCQ-ow-iZg">
-                        <rect key="frame" x="98" y="44" width="190" height="0.0"/>
+                        <rect key="frame" x="98" y="44" width="0.0" height="0.0"/>
                         <fontDescription key="fontDescription" type="system" pointSize="12"/>
                         <color key="textColor" red="0.22352941176470587" green="0.47450980392156861" blue="0.82745098039215681" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="252" verticalHuggingPriority="251" image="置顶" translatesAutoresizingMaskIntoConstraints="NO" id="uc4-iu-T2S">
+                        <rect key="frame" x="160" y="12" width="30" height="16"/>
+                    </imageView>
                 </subviews>
                 <constraints>
-                    <constraint firstAttribute="trailing" secondItem="uc4-iu-T2S" secondAttribute="trailing" constant="15" id="1u5-9A-up0"/>
                     <constraint firstItem="EGe-BE-2pA" firstAttribute="leading" secondItem="V9Z-jl-CCz" secondAttribute="leading" id="5h1-2r-Kmt"/>
                     <constraint firstAttribute="trailing" secondItem="AcH-Uz-mQE" secondAttribute="trailing" id="7vJ-5l-EVI"/>
-                    <constraint firstItem="uc4-iu-T2S" firstAttribute="leading" secondItem="V9Z-jl-CCz" secondAttribute="trailing" constant="15" id="FyI-rT-UuO"/>
                     <constraint firstItem="V9Z-jl-CCz" firstAttribute="top" secondItem="ya1-Sb-3o5" secondAttribute="top" constant="10" id="KRf-xj-sw4"/>
                     <constraint firstItem="V9Z-jl-CCz" firstAttribute="leading" secondItem="WcM-ws-bpJ" secondAttribute="trailing" constant="13" id="Nl3-bi-yMM"/>
                     <constraint firstItem="AcH-Uz-mQE" firstAttribute="leading" secondItem="ya1-Sb-3o5" secondAttribute="leading" id="QZH-S4-dHi"/>
-                    <constraint firstItem="uc4-iu-T2S" firstAttribute="leading" secondItem="LCQ-ow-iZg" secondAttribute="trailing" constant="5" id="Rhy-Li-hEQ"/>
                     <constraint firstItem="AcH-Uz-mQE" firstAttribute="top" secondItem="EGe-BE-2pA" secondAttribute="bottom" constant="10" id="XXJ-gC-hun"/>
-                    <constraint firstItem="uc4-iu-T2S" firstAttribute="centerY" secondItem="ya1-Sb-3o5" secondAttribute="centerY" id="fuB-y5-ZEf"/>
+                    <constraint firstItem="uc4-iu-T2S" firstAttribute="leading" secondItem="V9Z-jl-CCz" secondAttribute="trailing" constant="10" id="bgw-ct-hUo"/>
                     <constraint firstItem="LCQ-ow-iZg" firstAttribute="leading" secondItem="EGe-BE-2pA" secondAttribute="trailing" constant="5" id="h65-o3-vuz"/>
                     <constraint firstItem="LCQ-ow-iZg" firstAttribute="centerY" secondItem="EGe-BE-2pA" secondAttribute="centerY" id="iAb-wg-nOz"/>
                     <constraint firstAttribute="bottom" secondItem="AcH-Uz-mQE" secondAttribute="bottom" id="lBq-eo-ZY6"/>
                     <constraint firstItem="EGe-BE-2pA" firstAttribute="top" secondItem="V9Z-jl-CCz" secondAttribute="bottom" constant="8" id="pKG-5z-T3M"/>
                     <constraint firstItem="WcM-ws-bpJ" firstAttribute="centerY" secondItem="ya1-Sb-3o5" secondAttribute="centerY" id="qOk-iE-GlD"/>
+                    <constraint firstItem="uc4-iu-T2S" firstAttribute="centerY" secondItem="V9Z-jl-CCz" secondAttribute="centerY" id="vAf-Z4-LGb"/>
                     <constraint firstItem="WcM-ws-bpJ" firstAttribute="leading" secondItem="ya1-Sb-3o5" secondAttribute="leading" constant="15" id="xb3-2g-6RD"/>
                 </constraints>
             </tableViewCellContentView>
@@ -93,8 +92,9 @@
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="文件夹类型" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m86-Bb-XHW">
-                        <rect key="frame" x="65" y="10" width="169" height="20"/>
+                        <rect key="frame" x="65" y="10" width="82" height="20"/>
                         <constraints>
+                            <constraint firstAttribute="width" relation="lessThanOrEqual" constant="180" id="Ti3-6i-GvW"/>
                             <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="WAq-Jx-jbp"/>
                         </constraints>
                         <fontDescription key="fontDescription" type="system" pointSize="16"/>
@@ -104,9 +104,6 @@
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="chatmsg_rightArrow_icon" translatesAutoresizingMaskIntoConstraints="NO" id="nNb-tD-Ww8">
                         <rect key="frame" x="316" y="24" width="7" height="12"/>
                     </imageView>
-                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="置顶" translatesAutoresizingMaskIntoConstraints="NO" id="ad7-Uo-Ub5">
-                        <rect key="frame" x="261" y="22" width="30" height="16"/>
-                    </imageView>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="find_1" translatesAutoresizingMaskIntoConstraints="NO" id="Cca-Pg-cUu">
                         <rect key="frame" x="15" y="14" width="37" height="32"/>
                         <constraints>
@@ -138,16 +135,17 @@
                         <fontDescription key="fontDescription" type="system" pointSize="12"/>
                         <state key="normal" title="进入"/>
                     </button>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="置顶" translatesAutoresizingMaskIntoConstraints="NO" id="ad7-Uo-Ub5">
+                        <rect key="frame" x="157" y="12" width="30" height="16"/>
+                    </imageView>
                 </subviews>
                 <constraints>
                     <constraint firstItem="le9-Rw-Sgv" firstAttribute="top" secondItem="m86-Bb-XHW" secondAttribute="bottom" constant="8" id="16i-UH-HhT"/>
                     <constraint firstItem="le9-Rw-Sgv" firstAttribute="leading" secondItem="m86-Bb-XHW" secondAttribute="leading" id="3DX-0f-zcq"/>
-                    <constraint firstItem="txF-vc-jmz" firstAttribute="leading" secondItem="ad7-Uo-Ub5" secondAttribute="trailing" constant="5" id="6RH-e1-uWb"/>
                     <constraint firstAttribute="bottom" secondItem="rmb-UX-GBF" secondAttribute="bottom" id="BFf-Jr-0td"/>
+                    <constraint firstItem="ad7-Uo-Ub5" firstAttribute="leading" secondItem="m86-Bb-XHW" secondAttribute="trailing" constant="10" id="Cov-v0-EQj"/>
                     <constraint firstItem="nNb-tD-Ww8" firstAttribute="centerY" secondItem="9yE-N7-AqS" secondAttribute="centerY" id="FU3-WB-qU8"/>
                     <constraint firstItem="Cca-Pg-cUu" firstAttribute="centerY" secondItem="9yE-N7-AqS" secondAttribute="centerY" id="Ghh-ro-Pa5"/>
-                    <constraint firstItem="ad7-Uo-Ub5" firstAttribute="centerY" secondItem="9yE-N7-AqS" secondAttribute="centerY" id="HOI-vr-PRM"/>
-                    <constraint firstItem="m86-Bb-XHW" firstAttribute="width" secondItem="9yE-N7-AqS" secondAttribute="width" multiplier="0.5" id="KDX-wT-jml"/>
                     <constraint firstItem="m86-Bb-XHW" firstAttribute="top" secondItem="9yE-N7-AqS" secondAttribute="top" constant="10" id="Mp1-K4-W4L"/>
                     <constraint firstItem="txF-vc-jmz" firstAttribute="centerY" secondItem="9yE-N7-AqS" secondAttribute="centerY" id="NKd-Fk-PSh"/>
                     <constraint firstItem="SuJ-3J-IWi" firstAttribute="centerY" secondItem="9yE-N7-AqS" secondAttribute="centerY" id="Poo-R1-Vw8"/>
@@ -155,6 +153,7 @@
                     <constraint firstItem="Cca-Pg-cUu" firstAttribute="leading" secondItem="9yE-N7-AqS" secondAttribute="leading" constant="15" id="aXu-UY-bKN"/>
                     <constraint firstAttribute="trailing" secondItem="rmb-UX-GBF" secondAttribute="trailing" id="cmz-52-iKx"/>
                     <constraint firstItem="nNb-tD-Ww8" firstAttribute="leading" secondItem="txF-vc-jmz" secondAttribute="trailing" constant="5" id="fFw-fU-YqC"/>
+                    <constraint firstItem="ad7-Uo-Ub5" firstAttribute="centerY" secondItem="m86-Bb-XHW" secondAttribute="centerY" id="jwo-r6-qKV"/>
                     <constraint firstItem="rmb-UX-GBF" firstAttribute="leading" secondItem="9yE-N7-AqS" secondAttribute="leading" id="opG-5i-hKa"/>
                     <constraint firstItem="m86-Bb-XHW" firstAttribute="leading" secondItem="Cca-Pg-cUu" secondAttribute="trailing" constant="13" id="smC-lO-qdm"/>
                     <constraint firstAttribute="trailing" secondItem="nNb-tD-Ww8" secondAttribute="trailing" constant="15" id="ste-6a-Wlt"/>
@@ -182,8 +181,9 @@
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="事件聚焦" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6cc-S2-zr6">
-                        <rect key="frame" x="99" y="10" width="184" height="20"/>
+                        <rect key="frame" x="99" y="10" width="65.5" height="20"/>
                         <constraints>
+                            <constraint firstAttribute="width" relation="lessThanOrEqual" constant="160" id="gE6-W8-6rZ"/>
                             <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="nbL-04-3c5"/>
                         </constraints>
                         <fontDescription key="fontDescription" type="system" pointSize="16"/>
@@ -238,6 +238,9 @@
                         <color key="textColor" red="0.22352941176470587" green="0.47450980392156861" blue="0.82745098039215681" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="置顶" translatesAutoresizingMaskIntoConstraints="NO" id="txB-bF-Ybm">
+                        <rect key="frame" x="174.5" y="12" width="30" height="16"/>
+                    </imageView>
                 </subviews>
                 <constraints>
                     <constraint firstItem="VMU-9M-oVe" firstAttribute="leading" secondItem="yWD-gT-Efy" secondAttribute="leading" constant="4" id="1cB-TA-Ejf"/>
@@ -247,9 +250,9 @@
                     <constraint firstItem="6cc-S2-zr6" firstAttribute="leading" secondItem="O9y-zc-4dK" secondAttribute="trailing" constant="13" id="8kD-Lq-6V0"/>
                     <constraint firstAttribute="bottom" secondItem="obx-Pj-VwT" secondAttribute="bottom" id="BAV-0e-wOk"/>
                     <constraint firstItem="tka-HH-OgQ" firstAttribute="trailing" secondItem="uVg-GU-9Mo" secondAttribute="trailing" id="C6N-q1-Zme"/>
-                    <constraint firstItem="uVg-GU-9Mo" firstAttribute="leading" secondItem="6cc-S2-zr6" secondAttribute="trailing" constant="15" id="EBK-6v-UeI"/>
                     <constraint firstItem="tka-HH-OgQ" firstAttribute="centerY" secondItem="yWD-gT-Efy" secondAttribute="centerY" id="Fyu-7h-KLg"/>
                     <constraint firstItem="VMU-9M-oVe" firstAttribute="centerY" secondItem="yWD-gT-Efy" secondAttribute="centerY" id="Ixw-lw-fEH"/>
+                    <constraint firstItem="txB-bF-Ybm" firstAttribute="leading" secondItem="6cc-S2-zr6" secondAttribute="trailing" constant="10" id="JQX-Cl-nIx"/>
                     <constraint firstItem="obx-Pj-VwT" firstAttribute="leading" secondItem="yWD-gT-Efy" secondAttribute="leading" id="MPP-tq-hcx"/>
                     <constraint firstItem="ZCy-ZV-eP5" firstAttribute="leading" secondItem="PrP-87-mQ9" secondAttribute="trailing" constant="5" id="ShQ-jw-RGN"/>
                     <constraint firstAttribute="trailing" secondItem="obx-Pj-VwT" secondAttribute="trailing" id="UkG-C6-NcA"/>
@@ -259,6 +262,7 @@
                     <constraint firstItem="obx-Pj-VwT" firstAttribute="top" secondItem="PrP-87-mQ9" secondAttribute="bottom" constant="10" id="grv-Ot-KHb"/>
                     <constraint firstItem="PrP-87-mQ9" firstAttribute="top" secondItem="6cc-S2-zr6" secondAttribute="bottom" constant="8" id="h4b-fo-5T4"/>
                     <constraint firstItem="ZCy-ZV-eP5" firstAttribute="centerY" secondItem="PrP-87-mQ9" secondAttribute="centerY" id="ksQ-Bg-0Tt"/>
+                    <constraint firstItem="txB-bF-Ybm" firstAttribute="centerY" secondItem="6cc-S2-zr6" secondAttribute="centerY" id="pz6-EK-wKQ"/>
                     <constraint firstItem="PrP-87-mQ9" firstAttribute="leading" secondItem="6cc-S2-zr6" secondAttribute="leading" id="qbW-le-eRb"/>
                     <constraint firstAttribute="trailing" secondItem="uVg-GU-9Mo" secondAttribute="trailing" constant="10" id="tRe-KN-gNe"/>
                     <constraint firstItem="tka-HH-OgQ" firstAttribute="leading" secondItem="uVg-GU-9Mo" secondAttribute="leading" id="trv-w7-qFc"/>
@@ -274,6 +278,7 @@
                 <outlet property="sortBtn" destination="uVg-GU-9Mo" id="zGr-a8-wCz"/>
                 <outlet property="subTitleL" destination="PrP-87-mQ9" id="xDe-gj-aTU"/>
                 <outlet property="titleL" destination="6cc-S2-zr6" id="0F1-O7-0aH"/>
+                <outlet property="topImgV" destination="txB-bF-Ybm" id="F8U-sC-s0a"/>
             </connections>
             <point key="canvasLocation" x="-981.15942028985512" y="965.95982142857133"/>
         </tableViewCell>
@@ -285,9 +290,10 @@
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="事件聚焦" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9qw-uA-qDr">
-                        <rect key="frame" x="96" y="10" width="174" height="20"/>
+                        <rect key="frame" x="96" y="10" width="65.5" height="20"/>
                         <constraints>
                             <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="d4e-bk-g5o"/>
+                            <constraint firstAttribute="width" relation="lessThanOrEqual" constant="160" id="mOz-qR-pES"/>
                         </constraints>
                         <fontDescription key="fontDescription" type="system" pointSize="16"/>
                         <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
@@ -335,6 +341,9 @@
                         <rect key="frame" x="298" y="9.5" width="40" height="40"/>
                         <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     </view>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="置顶" translatesAutoresizingMaskIntoConstraints="NO" id="NqB-wD-Xhz">
+                        <rect key="frame" x="171.5" y="12" width="30" height="16"/>
+                    </imageView>
                 </subviews>
                 <constraints>
                     <constraint firstItem="hLi-b0-iWm" firstAttribute="bottom" secondItem="H6C-RT-z8Y" secondAttribute="bottom" id="1aO-Rm-B8t"/>
@@ -350,15 +359,16 @@
                     <constraint firstAttribute="trailing" secondItem="6Ml-Gj-9dA" secondAttribute="trailing" id="L9X-XA-zeZ"/>
                     <constraint firstAttribute="trailing" secondItem="H6C-RT-z8Y" secondAttribute="trailing" constant="10" id="P3J-O9-Iui"/>
                     <constraint firstItem="6Ml-Gj-9dA" firstAttribute="top" secondItem="Lh1-sa-XhN" secondAttribute="bottom" constant="10" id="TB5-EF-yFL"/>
-                    <constraint firstItem="9qw-uA-qDr" firstAttribute="width" secondItem="2O5-sX-vEg" secondAttribute="width" multiplier="0.5" id="b5I-cY-Rwx"/>
                     <constraint firstItem="Lh1-sa-XhN" firstAttribute="top" secondItem="9qw-uA-qDr" secondAttribute="bottom" constant="8" id="cxY-px-OJO"/>
                     <constraint firstItem="H6C-RT-z8Y" firstAttribute="leading" secondItem="Lh1-sa-XhN" secondAttribute="trailing" constant="5" id="eN5-xq-QZC"/>
+                    <constraint firstItem="NqB-wD-Xhz" firstAttribute="leading" secondItem="9qw-uA-qDr" secondAttribute="trailing" constant="10" id="fpd-Rs-HuO"/>
                     <constraint firstItem="H6C-RT-z8Y" firstAttribute="centerY" secondItem="2O5-sX-vEg" secondAttribute="centerY" id="fxe-4Y-q10"/>
                     <constraint firstItem="hLi-b0-iWm" firstAttribute="top" secondItem="H6C-RT-z8Y" secondAttribute="top" id="hRx-Rc-TnN"/>
                     <constraint firstItem="6Kn-PA-Bg3" firstAttribute="centerY" secondItem="2O5-sX-vEg" secondAttribute="centerY" id="ip2-V5-hGh"/>
                     <constraint firstItem="hLi-b0-iWm" firstAttribute="centerY" secondItem="2O5-sX-vEg" secondAttribute="centerY" id="oTD-Ka-oID"/>
                     <constraint firstItem="IyI-aU-zdG" firstAttribute="centerY" secondItem="2O5-sX-vEg" secondAttribute="centerY" id="sfn-VN-9Yu"/>
                     <constraint firstItem="9qw-uA-qDr" firstAttribute="top" secondItem="2O5-sX-vEg" secondAttribute="top" constant="10" id="uyg-n4-pJJ"/>
+                    <constraint firstItem="NqB-wD-Xhz" firstAttribute="centerY" secondItem="9qw-uA-qDr" secondAttribute="centerY" id="xdf-F9-W9V"/>
                 </constraints>
             </tableViewCellContentView>
             <viewLayoutGuide key="safeArea" id="j00-Ah-VMz"/>
@@ -368,6 +378,7 @@
                 <outlet property="sortBtn" destination="H6C-RT-z8Y" id="85P-Vm-eE7"/>
                 <outlet property="subTitleL" destination="Lh1-sa-XhN" id="bAH-q3-e35"/>
                 <outlet property="titleL" destination="9qw-uA-qDr" id="k9o-dt-YsF"/>
+                <outlet property="topImgV" destination="NqB-wD-Xhz" id="lR3-wQ-D6g"/>
             </connections>
             <point key="canvasLocation" x="-981" y="1056"/>
         </tableViewCell>

+ 2 - 82
smartRhino/Project/VCModel/My_Center/Controller/NoteBook/Controller/NoteBookVC.m

@@ -2159,7 +2159,6 @@
 //}
 
 #pragma Mark 左滑按钮 iOS8以上
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
 - (nullable UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(tvos){
     MyNoteBookSubModel *model  = self.noteBookArray[indexPath.row];
     switch (model.AttributeValue) {
@@ -2252,87 +2251,7 @@
         }break;
     }
 }
-#else
-- (NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
-    MyNoteBookSubModel *model  = self.noteBookArray[indexPath.row];
-    switch (model.AttributeValue) {
-        case 1:{
-            WEAKSELF
-            UITableViewRowAction *action1 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"删除" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:UIAlertControllerStyleAlert];
-                UIAlertAction *ok = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                    
-                }];
-                [ok setValue:k9 forKey:@"_titleTextColor"];
-                UIAlertAction *noOk = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                    [weakSelf deleteFind:@[model].mutableCopy];
-                }];
-                [alertVC addAction:ok];
-                [alertVC addAction:noOk];
-                [weakSelf presentViewController:alertVC animated:YES completion:nil];
-            }];
-            
-            action1.backgroundColor = RGB(255, 59, 47);
-            UITableViewRowAction *action2 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"编辑" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                [weakSelf eidtorNoteBook:model];
-            }];
-            action2.backgroundColor = UIColorHex(#FF923A);
-            UITableViewRowAction *action3 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"移动" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                [weakSelf launchMoveVC:@[@(model.Id)].mutableCopy];
-                
-            }];
-            action3.backgroundColor = UIColorHex(#589AF1);
-            UITableViewRowAction *action4 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:model.IsTop ?@"取消置顶" :@"置顶"  handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                [weakSelf topFind:model];
-            }];
-            action4.backgroundColor =UIColorHex(#9BA9CB);
-            
-            return @[action1, action2, action3,action4];
-        }break;
-        default:{
-            WEAKSELF
-            UITableViewRowAction *action1 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"删除" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:UIAlertControllerStyleAlert];
-                UIAlertAction *ok = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                    
-                }];
-                [ok setValue:k9 forKey:@"_titleTextColor"];
-                UIAlertAction *noOk = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                    [weakSelf deleteFind:@[model].mutableCopy];
-                }];
-                [alertVC addAction:ok];
-                [alertVC addAction:noOk];
-                [weakSelf presentViewController:alertVC animated:YES completion:nil];
-            }];
-            action1.backgroundColor = RGB(255, 59, 47);
-            
-            UITableViewRowAction *action2 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"重命名" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                MyFavoriteNewFindVC *vc = [MyFavoriteNewFindVC initMyFavoriteNewFindVC];
-                vc.ParentId = model.Id;
-                vc.foldId = model.Id;
-                vc.createFoldType = CreateNotesType;
-                vc.modifyTye = ModifyType;
-                vc.fileType = NewOtherFileType;
-                vc.titleStr = @"修改文件夹";
-                vc.roleId = model.RoleId;
-                vc.fileName = model.FolderName;
-                [weakSelf.navigationController pushViewController:vc animated:YES];
-                
-            }];
-            action2.backgroundColor = UIColorHex(#FF923A);
-            UITableViewRowAction *action3 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"移动" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                [weakSelf launchMoveVC:@[@(model.Id)].mutableCopy];
-            }];
-            action3.backgroundColor = UIColorHex(#529DF8);
-            UITableViewRowAction *action4 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title: model.IsTop?@"取消置顶" :@"置顶" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                [weakSelf topFind:model];
-            }];
-            action4.backgroundColor = UIColorHex(#9BA9CB);
-            return @[action1, action2, action3,action4];
-        }break;
-    }
-}
-#endif
+
 - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
     
     return tableView.editing;
@@ -2366,6 +2285,7 @@
         vc.type = CollectModel_NoteBook;
         vc.FolderId = weakSelf.FolderId;
         vc.FolderName = model.FolderName;
+        vc.Id = model.MiddleId;
         vc.isEdit = YES;
         [weakSelf.navigationController pushViewController:vc animated:YES];
     } failure:^(NSError * _Nonnull error) {

+ 1 - 0
smartRhino/Project/VCModel/My_Center/Controller/NoteBook/Model/MyNoteBookModel.h

@@ -75,6 +75,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic,copy) NSString  *CreatedDate;
 //Data
 @property (nonatomic,assign) NSInteger  FileCount;
+@property (nonatomic,assign) NSInteger  FolderId;
 /// 文件夹名称
 @property (nonatomic,copy) NSString*  FolderName;
 

+ 81 - 82
smartRhino/Project/VCModel/common/Controller/CommonHomeVC.m

@@ -18,6 +18,7 @@
 #import "CommonNoteVC.h"
 #import "ChatMsgListCell.h"
 #import "ChatMsgCollectionCell.h"
+#import "MoveViewController.h"
 
 @interface CommonHomeVC ()<UITableViewDelegate,UITableViewDataSource,UICollectionViewDelegate,UICollectionViewDataSource>
 @property (weak, nonatomic) IBOutlet UIView             *NavBar;
@@ -40,40 +41,40 @@
     }
     return _HeadView;
 }
-- (void)setTableRefresh
-{
-    WS(weakSelf);
-    self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
-        [weakSelf headRefresh];
-    }];
-    self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
-        [weakSelf footerRefresh];
-    }];
-    [self.tableView.mj_header beginRefreshing];
-}
-- (void)headRefresh{
-    self.currentPage = 1;
-    self.totalPage = 1;
-    [self.dataArray removeAllObjects];
-    [self getDataList];
-}
-- (void)footerRefresh{
-    self.currentPage += 1;
-    if (self.totalPage == self.dataArray.count) {
-        self.currentPage --;
-        [self.tableView.mj_footer resetNoMoreData];
-        return ;
-    }
-    [self getDataList];
-}
+//- (void)setTableRefresh
+//{
+//    WS(weakSelf);
+//    self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
+//        [weakSelf headRefresh];
+//    }];
+//    self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
+//        [weakSelf footerRefresh];
+//    }];
+//    [self.tableView.mj_header beginRefreshing];
+//}
+//- (void)headRefresh{
+//    self.currentPage = 1;
+//    self.totalPage = 1;
+//    [self.dataArray removeAllObjects];
+//    [self getDataList];
+//}
+//- (void)footerRefresh{
+//    self.currentPage += 1;
+//    if (self.totalPage == self.dataArray.count) {
+//        self.currentPage --;
+//        [self.tableView.mj_footer resetNoMoreData];
+//        return ;
+//    }
+//    [self getDataList];
+//}
 - (void)viewWillAppear:(BOOL)animated
 {
     [super viewWillAppear:animated];
-    [self setTableRefresh];
+    [self getDataList];
 }
 - (void)viewDidLoad {
     [super viewDidLoad];
-    [self setTableRefresh];
+//    [self setTableRefresh];
     self.fd_prefersNavigationBarHidden = YES;
     self.view.backgroundColor = UIColorHex(0xffffff);
     self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
@@ -106,10 +107,9 @@
 - (void)getDataList {
     WS(weakSelf);
     SHOWLOADING
-    [[HttpManager sharedHttpManager] POSTUrl:Host(API_Collection_List) parameters:@{@"FolderId":@(0),@"Page":@(self.currentPage),@"PerPage":@(20),@"VisitUserId":@(0)} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+    [self.dataArray removeAllObjects];
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_Collection_List) parameters:@{@"FolderId":@(0),@"Page":@(1),@"PerPage":@(99999999),@"VisitUserId":@(0)} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
          REMOVESHOW
-        [weakSelf.tableView.mj_header endRefreshing];
-        [weakSelf.tableView.mj_footer endRefreshing];
         MyFavoriteModel *listModel = [[MyFavoriteModel alloc] initWithDictionary:responseObject error:nil];
         weakSelf.totalPage = listModel.Total;
         [weakSelf.dataArray addObjectsFromArray:listModel.Items];
@@ -123,16 +123,10 @@
         }
         [weakSelf changeMessageStatusWithNumber:weakSelf.dataArray.count];
         dispatch_async(dispatch_get_main_queue(), ^{
-            if (weakSelf.totalPage < 20) {
-                [weakSelf.tableView.mj_footer resetNoMoreData];
-                [weakSelf.tableView.mj_footer setHidden:YES];
-            }
             [weakSelf.tableView reloadData];
         });
     } failure:^(NSError * _Nonnull error) {
         REMOVESHOW
-        [weakSelf.tableView.mj_header endRefreshing];
-        [weakSelf.tableView.mj_footer endRefreshing];
     }];
 }
 - (BOOL)hidesBottomBarWhenPushed{
@@ -437,7 +431,6 @@
 }
 
 #pragma Mark 左滑按钮 iOS8以上
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
 - (nullable UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(tvos){
     if (indexPath.section == 0) {
         UISwipeActionsConfiguration *actions = [UISwipeActionsConfiguration configurationWithActions:@[]];
@@ -445,19 +438,19 @@
         return actions;
     }else{
         WEAKSELF
+        MyFavoriteSubModel * model = [self.dataArray objectAtIndex:indexPath.row];
         UIContextualAction *action1 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleNormal title:@"转发" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
             [tableView setEditing:NO animated:YES];
 
         }];
         action1.backgroundColor = UIColorHex(#FF923A);
-        UIContextualAction *action2 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleNormal title:@"置顶" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
-            [tableView setEditing:NO animated:YES];
+        UIContextualAction *action2 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleNormal title:model.IsTop ? @"取消置顶" :@"置顶" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
+            [weakSelf topFind:model];
     
         }];
         action2.backgroundColor = UIColorHex(#9BA9CB);
         UIContextualAction *action3 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleNormal title:@"移动" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
-            [tableView setEditing:NO animated:YES];
-
+            [weakSelf launchMoveVC:@[@(model.Id)].mutableCopy];
         }];
         action3.backgroundColor = UIColorHex(#589AF1);
 
@@ -465,11 +458,11 @@
             [tableView setEditing:NO animated:YES];
             UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:UIAlertControllerStyleAlert];
             UIAlertAction *ok = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
-
+                [weakSelf.tableView reloadData];
             }];
             [ok setValue:k9 forKey:@"_titleTextColor"];
             UIAlertAction *noOk = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-
+                [weakSelf deleteFind:@[model].mutableCopy indexPath:indexPath];
             }];
             [alertVC addAction:ok];
             [alertVC addAction:noOk];
@@ -482,44 +475,50 @@
         return actions;
     }
 }
-#else
-- (NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
-    if (indexPath.section == 0) {
-        return @[];
-    }else{
-        WEAKSELF
-        UITableViewRowAction *action1 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"转发"  handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-
-        }];
-        action1.backgroundColor = UIColorHex(#FF923A);
-        
-        UITableViewRowAction *action2 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"置顶" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-
-        }];
-        action2.backgroundColor = UIColorHex(#9BA9CB);
-        
-        UITableViewRowAction *action3 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"移动" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-
-            
-        }];
-        action3.backgroundColor = UIColorHex(#589AF1);
-        
-        UITableViewRowAction *action4 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"删除" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-            UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:UIAlertControllerStyleAlert];
-            UIAlertAction *ok = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                
-            }];
-            [ok setValue:k9 forKey:@"_titleTextColor"];
-            UIAlertAction *noOk = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-
-            }];
-            [alertVC addAction:ok];
-            [alertVC addAction:noOk];
-            [weakSelf presentViewController:alertVC animated:YES completion:nil];
-        }];
-        action4.backgroundColor = UIColorHex(#F64A33);
-        return @[action4, action3, action2,action1];
+- (void)topFind:(MyFavoriteSubModel*)findModel{
+    WEAKSELF
+    [[HttpManager sharedHttpManager] PUTUrl:[NSString stringWithFormat:@"%@%@%ld",BaseUrl,API_APP_Collection_Top,(long)findModel.MiddleId] parameters:@{} success:^(id  _Nonnull responseObject) {
+        [weakSelf getDataList];
+    } failure:^(NSError * _Nonnull error) {
+        SHOWERROR([ZYCTool handerResultData:error]);
+    }];
+}
+- (void)deleteFind:(NSMutableArray<MyFavoriteSubModel *>*)findModelArray indexPath:(NSIndexPath *)indexPath{
+    NSMutableArray *MiddleIds = [NSMutableArray array];
+    
+    for (MyFavoriteSubModel *model in findModelArray) {
+        [MiddleIds addObject:@(model.Id)];
     }
+    NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
+    [dic setValue:MiddleIds forKey:@"MiddleIds"];
+    [dic setValue:@(3) forKey:@"FolderType"];
+    
+    WS(weakSelf);
+    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:UIAlertControllerStyleAlert];
+    UIAlertAction *ok = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [weakSelf.tableView reloadData];
+        });
+    }];
+    [ok setValue:k9 forKey:@"_titleTextColor"];
+    UIAlertAction *noOk = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        [[HttpManager sharedHttpManager] POSTUrl:Host(API_Find_DeleteRecord) parameters:dic responseStyle:DATA success:^(id  _Nonnull responseObject) {
+            [weakSelf getDataList];
+        } failure:^(NSError * _Nonnull error) {
+            SHOWERROR([ZYCTool handerResultData:error]);
+        }];
+    }];
+    [alertVC addAction:ok];
+    [alertVC addAction:noOk];
+    [self presentViewController:alertVC animated:YES completion:nil];
+}
+- (void)launchMoveVC:(NSMutableArray<NSNumber*>*)selectIDArray{
+    MoveViewController * vc = [MoveViewController initMoveViewController];
+    vc.TypeId = CreateCollectionType;
+    vc.collectType = CollectHanderType_Move;
+    vc.ParentId = 0;
+    vc.FolderIds = selectIDArray;
+    vc.titleStr = @"移动";
+    [self.navigationController pushViewController:vc animated:YES];
 }
-#endif
 @end

+ 51 - 93
smartRhino/Project/VCModel/common/Controller/CommonNoteVC.m

@@ -142,45 +142,46 @@
 }
 
 #pragma mark - UItableView刷新
-- (void)setTableRefresh
-{
-    WS(weakSelf);
-    self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
-        [weakSelf headRefresh];
-    }];
-    self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
-        [weakSelf footerRefresh];
-    }];
-    [self.tableView.mj_header beginRefreshing];
-}
-- (void)headRefresh{
-    self.isFresh = YES;
-    self.currentPage = 1;
-    self.totalPage = 1;
-    [self.noteBookArray removeAllObjects];
-    [self getDataList];
-}
-
-- (void)footerRefresh{
-    self.isFresh = NO;
-    self.currentPage += 1;
-    if (self.totalPage == self.noteBookArray.count) {
-        self.currentPage --;
-        [self.tableView.mj_footer resetNoMoreData];
-        return ;
-    }
-    [self getDataList];
-}
+//- (void)setTableRefresh
+//{
+//    WS(weakSelf);
+//    self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
+//        [weakSelf headRefresh];
+//    }];
+//    self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
+//        [weakSelf footerRefresh];
+//    }];
+//    [self.tableView.mj_header beginRefreshing];
+//}
+//- (void)headRefresh{
+//    self.isFresh = YES;
+//    self.currentPage = 1;
+//    self.totalPage = 1;
+//    [self.noteBookArray removeAllObjects];
+//    [self getDataList];
+//}
+//
+//- (void)footerRefresh{
+//    self.isFresh = NO;
+//    self.currentPage += 1;
+//    if (self.totalPage == self.noteBookArray.count) {
+//        self.currentPage --;
+//        [self.tableView.mj_footer resetNoMoreData];
+//        return ;
+//    }
+//    [self getDataList];
+//}
 - (void)getDataList{
     WS(weakSelf);
-    [[HttpManager sharedHttpManager] POSTUrl:Host(API_Note_List) parameters:@{@"FolderId":@(0),@"Page":@(self.currentPage),@"PerPage":@(20),@"VisitUserId":@(0),@"SearchKey":@"",@"Sort":@""} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+    [self.noteBookArray removeAllObjects];
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_Note_List) parameters:@{@"FolderId":@(0),@"Page":@(1),@"PerPage":@(99999999),@"VisitUserId":@(0),@"SearchKey":@"",@"Sort":@""} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
         NSLog(@"笔记列表数据 %@",responseObject);
         MyNoteBookModel *listModel = [[MyNoteBookModel alloc] initWithDictionary:responseObject error:nil];
         weakSelf.totalPage = listModel.Total;
         [weakSelf.noteBookArray addObjectsFromArray:listModel.Items];
         dispatch_async(dispatch_get_main_queue(), ^{
-            [weakSelf.tableView.mj_header endRefreshing];
-            [weakSelf.tableView.mj_footer endRefreshing];
+//            [weakSelf.tableView.mj_header endRefreshing];
+//            [weakSelf.tableView.mj_footer endRefreshing];
             [weakSelf.tableView reloadData];
         });
     } failure:^(NSError * _Nonnull error) {
@@ -190,7 +191,7 @@
 - (void)viewWillAppear:(BOOL)animated
 {
     [super viewWillAppear:animated];
-    [self setTableRefresh];
+    [self getDataList];
 }
 - (void)viewDidLoad {
     [super viewDidLoad];
@@ -844,6 +845,7 @@
                 cell.cell1contentContentLabel.hidden = NO;
                 cell.contentHeight.constant = 10.f;
             }
+            cell.IsTopV.hidden = !model.IsTop;
             cell.cell1readNumberLabel.text = [NSString stringWithFormat:@"阅读:%ld",(long)model.ReadCount];
             cell.cell1ShareType.text = [ZYCTool monthAndDayAndHoursAndMinutes:model.CreatedDate];
             cell.cellZanButton.selected = model.IsPraise;
@@ -880,10 +882,8 @@
 }
 
 #pragma Mark 左滑按钮 iOS8以上
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
 - (nullable UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(tvos){
     MyNoteBookSubModel *model  = self.noteBookArray[indexPath.row];
-    
     WEAKSELF
     UIContextualAction *action1 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:@"删除" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
         [tableView setEditing:NO animated:YES];
@@ -920,51 +920,7 @@
     actions.performsFirstActionWithFullSwipe = NO;
     return actions;
 }
-#else
-- (NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
-    MyNoteBookSubModel *model  = self.noteBookArray[indexPath.row];
-   
-            WEAKSELF
-            UITableViewRowAction *action1 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"删除" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:UIAlertControllerStyleAlert];
-                UIAlertAction *ok = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-
-                }];
-                [ok setValue:k9 forKey:@"_titleTextColor"];
-                UIAlertAction *noOk = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-                    [weakSelf deleteFind:@[model].mutableCopy];
-                }];
-                [alertVC addAction:ok];
-                [alertVC addAction:noOk];
-                [weakSelf presentViewController:alertVC animated:YES completion:nil];
-            }];
-
-            action1.backgroundColor = UIColorHex(#F64A33);
-            UITableViewRowAction *action2 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"编辑" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                [weakSelf eidtorNoteBook:model];
-            }];
-            action2.backgroundColor = UIColorHex(#FF923A);
-            UITableViewRowAction *action3 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"移动" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                [weakSelf launchMoveVC:@[@(model.Id)].mutableCopy];
 
-            }];
-            action3.backgroundColor = UIColorHex(#589AF1);
-            UITableViewRowAction *action4 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:model.IsTop ?@"取消置顶" :@"置顶"  handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
-                [weakSelf topFind:model];
-            }];
-            action4.backgroundColor =UIColorHex(#9BA9CB);
-
-            return @[action1, action2, action3,action4];
-        
-}
-#endif
-//- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
-//{
-//    return YES;
-//}
-//- (void)tableView:(UITableView*)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath*)indexPath
-//{
-//}
 /// 文件夹 置顶 和 取消置顶
 - (void)launchMoveVC:(NSMutableArray<NSNumber*>*)selectIDArray{
     MoveViewController * vc = [MoveViewController initMoveViewController];
@@ -978,23 +934,24 @@
 - (void)eidtorNoteBook:(MyNoteBookSubModel *)model{
     SHOWLOADING
     WS(weakSelf);
-//    [[HttpManager sharedHttpManager] GETUrl:[NSString stringWithFormat:@"%@%@%@",BaseUrl,API_NoteBook_Detail,@(model.MiddleId).stringValue] parameters:@{} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
-//        REMOVESHOW;
-//        MyTDTopicCreateVC * vc = [MyTDTopicCreateVC initMyTDTopicCreateVC];
-//        vc.type = CollectModel_NoteBook;
-//        vc.FolderId = weakSelf.FolderId;
-//        vc.FolderName = model.FolderName;
-//        vc.isEdit = YES;
-//        [weakSelf.navigationController pushViewController:vc animated:YES];
-//    } failure:^(NSError * _Nonnull error) {
-//        SHOWERROR([ZYCTool handerResultData:error]);
-//    }];
+    [[HttpManager sharedHttpManager] GETUrl:[NSString stringWithFormat:@"%@%@%@",BaseUrl,API_NoteBook_Detail,@(model.MiddleId).stringValue] parameters:@{} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+        REMOVESHOW;
+        MyTDTopicCreateVC * vc = [MyTDTopicCreateVC initMyTDTopicCreateVC];
+        vc.type = CollectModel_NoteBook;
+        vc.Id = model.MiddleId;
+        vc.FolderId = model.FolderId;
+        vc.FolderName = model.FolderName;
+        vc.isEdit = YES;
+        [weakSelf.navigationController pushViewController:vc animated:YES];
+    } failure:^(NSError * _Nonnull error) {
+        SHOWERROR([ZYCTool handerResultData:error]);
+    }];
 }
 - (void)topFind:(MyNoteBookSubModel*)findModel{
     NSLog(@"文件夹---%@%@",findModel.IsTop ? @"置顶":@"取消置顶",findModel.FolderName);
     SHOWLOADING
     WEAKSELF
-    [[HttpManager sharedHttpManager] PUTUrl:[NSString stringWithFormat:@"%@%@%ld",BaseUrl,API_Find_Top,(long)findModel.Id] parameters:@{} success:^(id  _Nonnull responseObject) {
+    [[HttpManager sharedHttpManager] PUTUrl:[NSString stringWithFormat:@"%@%@%ld",BaseUrl,API_APP_Note_Top,(long)findModel.MiddleId] parameters:@{} success:^(id  _Nonnull responseObject) {
         REMOVESHOW
         [weakSelf reCreateTable];
     } failure:^(NSError * _Nonnull error) {
@@ -1060,8 +1017,9 @@
     WEAKSELF
     [[HttpManager sharedHttpManager] POSTUrl:Host(API_Find_DeleteRecord) parameters:dic responseStyle:DATA success:^(id  _Nonnull responseObject) {
         REMOVESHOW
-        [weakSelf headRefresh];
+        [weakSelf getDataList];
     } failure:^(NSError * _Nonnull error) {
+        REMOVESHOW
         SHOWERROR([ZYCTool handerResultData:error]);
     }];
 }
@@ -1073,7 +1031,7 @@
     [tableView deselectRowAtIndexPath:indexPath animated:YES];
     MyNoteBookSubModel *model  = self.noteBookArray[indexPath.row];
     MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
-    vc.Id = model.Id;
+    vc.Id = model.MiddleId;
     vc.type = CollectModel_NoteBook;
     [self.navigationController pushViewController:vc animated:YES];
 }

+ 1 - 0
smartRhino/Project/VCModel/common/View/CommonListCell.h

@@ -15,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (weak, nonatomic) IBOutlet UIImageView *iconV;
 @property (weak, nonatomic) IBOutlet UILabel *nameL;
 @property (weak, nonatomic) IBOutlet UILabel *desL;
+@property (weak, nonatomic) IBOutlet UIImageView *isTopV;
 
 
 + (CGFloat)configCell0Height;

+ 7 - 0
smartRhino/Project/VCModel/common/View/CommonListCell.m

@@ -122,6 +122,13 @@
             }
         }break;
     }
+    self.isTopV.hidden = !model.IsTop;
+    [self.titleL mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.iconV.mas_right).offset(15);
+        make.top.mas_offset(15);
+        make.height.mas_greaterThanOrEqualTo(20);
+        make.width.mas_lessThanOrEqualTo(SCREEN_WIDTH - (model.IsTop ? 125 : 85));
+    }];
     self.titleL.text = model.Data.Title;
     self.nameL.text = model.Data.Author;
     self.desL.text = [model.FolderName length] > 0 ? model.FolderName : @" ";

+ 10 - 4
smartRhino/Project/VCModel/common/View/CommonListCell.xib

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
@@ -27,8 +27,8 @@
                 <rect key="frame" x="0.0" y="0.0" width="338" height="111"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="文件夹类型" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7id-tv-Nnd">
-                        <rect key="frame" x="70" y="12" width="253" height="38.5"/>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="文件夹类型" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7id-tv-Nnd">
+                        <rect key="frame" x="70" y="12" width="82" height="38.5"/>
                         <constraints>
                             <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="Gea-xa-rYg"/>
                         </constraints>
@@ -68,6 +68,9 @@
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="置顶" translatesAutoresizingMaskIntoConstraints="NO" id="QxE-nS-rLu">
+                        <rect key="frame" x="162" y="12" width="30" height="16"/>
+                    </imageView>
                 </subviews>
                 <constraints>
                     <constraint firstAttribute="trailing" secondItem="3d7-xH-uiA" secondAttribute="trailing" id="3hQ-AG-mYt"/>
@@ -75,7 +78,8 @@
                     <constraint firstItem="7id-tv-Nnd" firstAttribute="leading" secondItem="cCf-ee-0J6" secondAttribute="trailing" constant="15" id="9Xy-Dc-JrN"/>
                     <constraint firstItem="3d7-xH-uiA" firstAttribute="leading" secondItem="8Mf-6v-eUM" secondAttribute="leading" id="B83-7R-eRX"/>
                     <constraint firstItem="3d7-xH-uiA" firstAttribute="top" secondItem="wln-0c-dGh" secondAttribute="bottom" constant="8" id="DPq-4a-bXp"/>
-                    <constraint firstAttribute="trailing" secondItem="7id-tv-Nnd" secondAttribute="trailing" constant="15" id="K1n-H6-TeF"/>
+                    <constraint firstItem="QxE-nS-rLu" firstAttribute="top" secondItem="7id-tv-Nnd" secondAttribute="top" id="KkN-JK-GzX"/>
+                    <constraint firstItem="QxE-nS-rLu" firstAttribute="leading" secondItem="7id-tv-Nnd" secondAttribute="trailing" constant="10" id="LDS-P6-o7G"/>
                     <constraint firstItem="wln-0c-dGh" firstAttribute="top" secondItem="84L-UB-7zZ" secondAttribute="bottom" constant="15" id="bNR-qP-d5g"/>
                     <constraint firstItem="cCf-ee-0J6" firstAttribute="leading" secondItem="8Mf-6v-eUM" secondAttribute="leading" constant="15" id="dVe-Nj-QOF"/>
                     <constraint firstItem="84L-UB-7zZ" firstAttribute="leading" secondItem="7id-tv-Nnd" secondAttribute="leading" id="daM-2t-Cwl"/>
@@ -89,6 +93,7 @@
             <connections>
                 <outlet property="desL" destination="wln-0c-dGh" id="zVq-KH-QLW"/>
                 <outlet property="iconV" destination="cCf-ee-0J6" id="oty-YI-zBu"/>
+                <outlet property="isTopV" destination="QxE-nS-rLu" id="jnz-J4-LIT"/>
                 <outlet property="nameL" destination="84L-UB-7zZ" id="Hy8-Pa-Bvn"/>
                 <outlet property="titleL" destination="7id-tv-Nnd" id="zn3-Jw-E2C"/>
             </connections>
@@ -97,5 +102,6 @@
     </objects>
     <resources>
         <image name="img_placeHolder" width="800" height="800"/>
+        <image name="置顶" width="30" height="16"/>
     </resources>
 </document>