Quellcode durchsuchen

投诉建议。 mvvm + RAC。照片9张

openlockPPP vor 1 Jahr
Ursprung
Commit
24240dd4ac
19 geänderte Dateien mit 618 neuen und 78 gelöschten Zeilen
  1. 28 0
      jiaPei.xcodeproj/project.pbxproj
  2. BIN
      jiaPei.xcworkspace/xcuserdata/mimasigeling.xcuserdatad/UserInterfaceState.xcuserstate
  3. 23 0
      jiaPei/Images.xcassets/Modules/ComplaintModule/comp_del.imageset/Contents.json
  4. BIN
      jiaPei/Images.xcassets/Modules/ComplaintModule/comp_del.imageset/减少.png
  5. BIN
      jiaPei/Images.xcassets/Modules/ComplaintModule/comp_del.imageset/减少@2x.png
  6. BIN
      jiaPei/Images.xcassets/Modules/ComplaintModule/comp_del.imageset/减少@3x.png
  7. 17 0
      jiaPei/Modules/ComplaintModule/Controller/NYComplaintListViewController.h
  8. 32 0
      jiaPei/Modules/ComplaintModule/Controller/NYComplaintListViewController.m
  9. 22 0
      jiaPei/Modules/ComplaintModule/Controller/NYComplaintListViewController.xib
  10. 16 0
      jiaPei/Modules/ComplaintModule/Controller/NYComplaintPageViewController.h
  11. 159 12
      jiaPei/Modules/ComplaintModule/Controller/NYComplaintPageViewController.m
  12. 18 66
      jiaPei/Modules/ComplaintModule/Controller/NYComplaintPageViewController.xib
  13. 16 0
      jiaPei/Modules/ComplaintModule/View/CollectionViewCell.h
  14. 38 0
      jiaPei/Modules/ComplaintModule/View/CollectionViewCell.m
  15. 28 0
      jiaPei/Modules/ComplaintModule/ViewModel/NYComplaintPageViewModel.h
  16. 116 0
      jiaPei/Modules/ComplaintModule/ViewModel/NYComplaintPageViewModel.m
  17. 2 0
      jiaPei/OLD/Util/SingletonManger/ChechBodyManager/CheckBodyManager.h
  18. 22 0
      jiaPei/Utils/Manager/NYSerialQueueManager.h
  19. 81 0
      jiaPei/Utils/Manager/NYSerialQueueManager.m

+ 28 - 0
jiaPei.xcodeproj/project.pbxproj

@@ -84,12 +84,17 @@
 		90044C3B2A4E821E003FBBF8 /* NYFloatingSuggestViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 90044C3A2A4E821E003FBBF8 /* NYFloatingSuggestViewModel.m */; };
 		90044C432A4EAF6A003FBBF8 /* NYComplaintPageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90044C412A4EAF6A003FBBF8 /* NYComplaintPageViewController.m */; };
 		90044C442A4EAF6A003FBBF8 /* NYComplaintPageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90044C422A4EAF6A003FBBF8 /* NYComplaintPageViewController.xib */; };
+		90044C472A4ED1CB003FBBF8 /* NYComplaintPageViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 90044C462A4ED1CB003FBBF8 /* NYComplaintPageViewModel.m */; };
 		900A2DE32A1FA89700395C1F /* RQAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 900A2DDD2A1FA89700395C1F /* RQAppDelegate.m */; };
 		900A2DE42A1FA89700395C1F /* RQAppEventModuleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 900A2DDE2A1FA89700395C1F /* RQAppEventModuleManager.m */; };
 		900A2DE52A1FA89700395C1F /* RQAppEventAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 900A2DE02A1FA89700395C1F /* RQAppEventAnnotation.m */; };
 		900A2DE62A1FA89700395C1F /* RQBaseAppEventModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 900A2DE12A1FA89700395C1F /* RQBaseAppEventModule.m */; };
 		90626F3D2A204BC400C8FA05 /* kt_jq.db in Resources */ = {isa = PBXBuildFile; fileRef = 90626F3C2A204BC300C8FA05 /* kt_jq.db */; };
 		90626F402A20540600C8FA05 /* YNYDTJQQuestionModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 90626F3F2A20540600C8FA05 /* YNYDTJQQuestionModule.m */; };
+		90798AFE2A5159BB00E68461 /* CollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90798AFD2A5159BB00E68461 /* CollectionViewCell.m */; };
+		90798B012A517B2500E68461 /* NYSerialQueueManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 90798B002A517B2500E68461 /* NYSerialQueueManager.m */; };
+		90798B052A51BC3300E68461 /* NYComplaintListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90798B032A51BC3300E68461 /* NYComplaintListViewController.m */; };
+		90798B062A51BC3300E68461 /* NYComplaintListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90798B042A51BC3300E68461 /* NYComplaintListViewController.xib */; };
 		90BA2E822A3177B50029A54A /* NYTheoryTimeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E802A3177B50029A54A /* NYTheoryTimeVC.m */; };
 		90BA2E872A3177DE0029A54A /* NYGetjobTimeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E852A3177DE0029A54A /* NYGetjobTimeVC.m */; };
 		90BA2E8B2A317BEB0029A54A /* NYBasetjTimeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 90BA2E8A2A317BEB0029A54A /* NYBasetjTimeVC.m */; };
@@ -1782,6 +1787,8 @@
 		90044C402A4EAF6A003FBBF8 /* NYComplaintPageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYComplaintPageViewController.h; sourceTree = "<group>"; };
 		90044C412A4EAF6A003FBBF8 /* NYComplaintPageViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYComplaintPageViewController.m; sourceTree = "<group>"; };
 		90044C422A4EAF6A003FBBF8 /* NYComplaintPageViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NYComplaintPageViewController.xib; sourceTree = "<group>"; };
+		90044C452A4ED1CB003FBBF8 /* NYComplaintPageViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYComplaintPageViewModel.h; sourceTree = "<group>"; };
+		90044C462A4ED1CB003FBBF8 /* NYComplaintPageViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYComplaintPageViewModel.m; sourceTree = "<group>"; };
 		900A2DDA2A1FA89700395C1F /* RQAppEventModuleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RQAppEventModuleManager.h; sourceTree = "<group>"; };
 		900A2DDB2A1FA89700395C1F /* RQBaseAppEventModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RQBaseAppEventModule.h; sourceTree = "<group>"; };
 		900A2DDC2A1FA89700395C1F /* RQAppEventAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RQAppEventAnnotation.h; sourceTree = "<group>"; };
@@ -1794,6 +1801,13 @@
 		90626F3C2A204BC300C8FA05 /* kt_jq.db */ = {isa = PBXFileReference; lastKnownFileType = file; path = kt_jq.db; sourceTree = "<group>"; };
 		90626F3E2A20540600C8FA05 /* YNYDTJQQuestionModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YNYDTJQQuestionModule.h; sourceTree = "<group>"; };
 		90626F3F2A20540600C8FA05 /* YNYDTJQQuestionModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YNYDTJQQuestionModule.m; sourceTree = "<group>"; };
+		90798AFC2A5159BB00E68461 /* CollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionViewCell.h; sourceTree = "<group>"; };
+		90798AFD2A5159BB00E68461 /* CollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CollectionViewCell.m; sourceTree = "<group>"; };
+		90798AFF2A517B2500E68461 /* NYSerialQueueManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYSerialQueueManager.h; sourceTree = "<group>"; };
+		90798B002A517B2500E68461 /* NYSerialQueueManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYSerialQueueManager.m; sourceTree = "<group>"; };
+		90798B022A51BC3300E68461 /* NYComplaintListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYComplaintListViewController.h; sourceTree = "<group>"; };
+		90798B032A51BC3300E68461 /* NYComplaintListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYComplaintListViewController.m; sourceTree = "<group>"; };
+		90798B042A51BC3300E68461 /* NYComplaintListViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NYComplaintListViewController.xib; sourceTree = "<group>"; };
 		90BA2E7F2A3177B50029A54A /* NYTheoryTimeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYTheoryTimeVC.h; sourceTree = "<group>"; };
 		90BA2E802A3177B50029A54A /* NYTheoryTimeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NYTheoryTimeVC.m; sourceTree = "<group>"; };
 		90BA2E842A3177DE0029A54A /* NYGetjobTimeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NYGetjobTimeVC.h; sourceTree = "<group>"; };
@@ -4494,6 +4508,8 @@
 			children = (
 				90044C392A4E821E003FBBF8 /* NYFloatingSuggestViewModel.h */,
 				90044C3A2A4E821E003FBBF8 /* NYFloatingSuggestViewModel.m */,
+				90044C452A4ED1CB003FBBF8 /* NYComplaintPageViewModel.h */,
+				90044C462A4ED1CB003FBBF8 /* NYComplaintPageViewModel.m */,
 			);
 			path = ViewModel;
 			sourceTree = "<group>";
@@ -4504,6 +4520,9 @@
 				90044C402A4EAF6A003FBBF8 /* NYComplaintPageViewController.h */,
 				90044C412A4EAF6A003FBBF8 /* NYComplaintPageViewController.m */,
 				90044C422A4EAF6A003FBBF8 /* NYComplaintPageViewController.xib */,
+				90798B022A51BC3300E68461 /* NYComplaintListViewController.h */,
+				90798B032A51BC3300E68461 /* NYComplaintListViewController.m */,
+				90798B042A51BC3300E68461 /* NYComplaintListViewController.xib */,
 			);
 			path = Controller;
 			sourceTree = "<group>";
@@ -4511,6 +4530,8 @@
 		90044C3F2A4EAEE8003FBBF8 /* View */ = {
 			isa = PBXGroup;
 			children = (
+				90798AFC2A5159BB00E68461 /* CollectionViewCell.h */,
+				90798AFD2A5159BB00E68461 /* CollectionViewCell.m */,
 				90044C342A4E7BF6003FBBF8 /* NYFloatingSuggestView.h */,
 				90044C352A4E7BF6003FBBF8 /* NYFloatingSuggestView.m */,
 				90044C372A4E7CA0003FBBF8 /* NYFloatingSuggestView.xib */,
@@ -6961,6 +6982,8 @@
 				D04DF76127006F72006E3633 /* WechatManager */,
 				D04DF76427006F72006E3633 /* UserManager */,
 				D04DF76727006F72006E3633 /* AlertViewManager */,
+				90798AFF2A517B2500E68461 /* NYSerialQueueManager.h */,
+				90798B002A517B2500E68461 /* NYSerialQueueManager.m */,
 			);
 			path = Manager;
 			sourceTree = "<group>";
@@ -9856,6 +9879,7 @@
 				D0D2D0C528616C40004E31E6 /* RQHomePageDriveMethodCell.xib in Resources */,
 				D0295C8E243F0B8B00B46AB1 /* 1-6-17.jpg in Resources */,
 				D057C1CB29F50FC5002F4AB2 /* RQPlaceBuyCell.xib in Resources */,
+				90798B062A51BC3300E68461 /* NYComplaintListViewController.xib in Resources */,
 				D0295BF1243F0B8B00B46AB1 /* 1-5-8.jpg in Resources */,
 				D0295C4D243F0B8B00B46AB1 /* 5-15-28.jpg in Resources */,
 				D0295C8A243F0B8B00B46AB1 /* 5-15-8.jpg in Resources */,
@@ -10863,6 +10887,7 @@
 				D057C1F929F5107A002F4AB2 /* RQPlaceBuyItemViewModel.m in Sources */,
 				D029D527224A01430094B99A /* APPdelegateModularForPush.m in Sources */,
 				D0870D6B2701A6B9004EC94E /* UIWebView+BlocksKit.m in Sources */,
+				90044C472A4ED1CB003FBBF8 /* NYComplaintPageViewModel.m in Sources */,
 				D00A15272754A82400793046 /* CGXVerticalMenuBaseModel+RQExtension.m in Sources */,
 				D09C56E1285363CC00088A2E /* RQHomePageSimulationExamItemViewModel.m in Sources */,
 				D0508CE027D87ED100CBF1FC /* MPUserDynamicTransition.m in Sources */,
@@ -11056,6 +11081,7 @@
 				D074573929272C670050BE10 /* QMChatRoomRichTextCell.m in Sources */,
 				D0B2D514289D18C900D6C5F4 /* RQVipCenterViewModel.m in Sources */,
 				D04DF79427006F72006E3633 /* YYAnimatedImageView+RQExtension.m in Sources */,
+				90798B012A517B2500E68461 /* NYSerialQueueManager.m in Sources */,
 				D0295E8B243F127000B46AB1 /* ChineseToPinyin.m in Sources */,
 				D087A19628DBF447001EB517 /* RQVipCenterSubListViewModel.m in Sources */,
 				D02010E129373AE8001B9F4D /* UIScrollView+SLCommon.m in Sources */,
@@ -11103,6 +11129,7 @@
 				D0F8F1222929C8840008019C /* OrderCommentCell.m in Sources */,
 				D0D011F9284F1CB600CE06E1 /* RQPayViewModel.m in Sources */,
 				D05EF12928C86EDF002BFC0A /* RQStudentChangeSchoolViewModel.m in Sources */,
+				90798B052A51BC3300E68461 /* NYComplaintListViewController.m in Sources */,
 				182148301EC56BC700DEC12F /* ProgressBarView.m in Sources */,
 				D0870D712701A6B9004EC94E /* UIActionSheet+BlocksKit.m in Sources */,
 				D07426D6280D5E8B00CD7EFF /* RQRetrainOrderViewController.m in Sources */,
@@ -11243,6 +11270,7 @@
 				186038F01BF5A5B800256B01 /* UIFormatter.m in Sources */,
 				D07ED7D1246934B0002CEA1A /* YostarKeychain.m in Sources */,
 				D00A14AB2754A39900793046 /* RQADViewManager.m in Sources */,
+				90798AFE2A5159BB00E68461 /* CollectionViewCell.m in Sources */,
 				D00A150F2754A41C00793046 /* CGXRefreshFooter.m in Sources */,
 				D0B699E9292E102D00DE2C69 /* RQExerciseVideoExplainItemViewModel.m in Sources */,
 				D0C44C402901391A0061B812 /* RQVipContentNew23ItemViewModel.m in Sources */,

BIN
jiaPei.xcworkspace/xcuserdata/mimasigeling.xcuserdatad/UserInterfaceState.xcuserstate


+ 23 - 0
jiaPei/Images.xcassets/Modules/ComplaintModule/comp_del.imageset/Contents.json

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

BIN
jiaPei/Images.xcassets/Modules/ComplaintModule/comp_del.imageset/减少.png


BIN
jiaPei/Images.xcassets/Modules/ComplaintModule/comp_del.imageset/减少@2x.png


BIN
jiaPei/Images.xcassets/Modules/ComplaintModule/comp_del.imageset/减少@3x.png


+ 17 - 0
jiaPei/Modules/ComplaintModule/Controller/NYComplaintListViewController.h

@@ -0,0 +1,17 @@
+//
+//  NYComplaintListViewController.h
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/7/2.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import "RQBaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NYComplaintListViewController : RQBaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 32 - 0
jiaPei/Modules/ComplaintModule/Controller/NYComplaintListViewController.m

@@ -0,0 +1,32 @@
+//
+//  NYComplaintListViewController.m
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/7/2.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import "NYComplaintListViewController.h"
+
+@interface NYComplaintListViewController ()
+
+@end
+
+@implementation NYComplaintListViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view from its nib.
+}
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 22 - 0
jiaPei/Modules/ComplaintModule/Controller/NYComplaintListViewController.xib

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NYComplaintListViewController">
+            <connections>
+                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+            <viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
+        </view>
+    </objects>
+</document>

+ 16 - 0
jiaPei/Modules/ComplaintModule/Controller/NYComplaintPageViewController.h

@@ -12,6 +12,22 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface NYComplaintPageViewController : UIViewController
 
+@property (nonatomic ,strong) NSMutableArray *image_idArray;
+@property (nonatomic ,strong) NSMutableArray *assestArray;
+@property BOOL isSelectOriginalPhoto;
+
+@property (nonatomic ,strong) UICollectionView *collectionView;
+@property (nonatomic ,strong) NSMutableArray *photosArray;
+
+//投诉
+@property (weak, nonatomic) IBOutlet UIButton *px_button;
+
+@property (nonatomic,strong) UIButton *currentType_button;
+//提交
+@property (weak, nonatomic) IBOutlet UIButton *submit_button;
+
+@property (weak, nonatomic) IBOutlet QMUITextView *content_textview;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 159 - 12
jiaPei/Modules/ComplaintModule/Controller/NYComplaintPageViewController.m

@@ -7,15 +7,24 @@
 //
 
 #import "NYComplaintPageViewController.h"
+#import "TZImagePickerController.h"//第三方相册
+#import "CollectionViewCell.h"
+#import "NYComplaintPageViewModel.h"
+
+#define Kwidth [UIScreen mainScreen].bounds.size.width
+#define Kheight [UIScreen mainScreen].bounds.size.height
+@interface NYComplaintPageViewController ()<TZImagePickerControllerDelegate,UICollectionViewDelegate,UICollectionViewDataSource>{
+    CGFloat _itemWH;
+    CGFloat _margin;
+}
 
+//名称
+@property (weak, nonatomic) IBOutlet UILabel *objname_label;
 
-@interface NYComplaintPageViewController ()
-
-@property (nonatomic,strong) UIButton *currentObj_button;
-
-@property (nonatomic,strong) UIButton *currentType_button;
+//照片 图片 - collectionView
+@property (weak, nonatomic) IBOutlet UIView *imageArrayView;
 
-@property (weak, nonatomic) IBOutlet QMUITextView *content_textview;
+@property (nonatomic,strong) NYComplaintPageViewModel *complaintPageViewModel;
 
 
 @end
@@ -29,7 +38,7 @@
 }
 
 - (void)dealloc {
-
+    
     NSLog(@"投诉建议-NYComplaintPageViewController");
 }
 
@@ -43,16 +52,154 @@
 }
 
 - (void)configureUI {
-    
+    self.currentType_button = self.px_button;
+    [self.collectionView registerClass:[CollectionViewCell class] forCellWithReuseIdentifier:@"cell"];
+    [self.imageArrayView addSubview:self.collectionView];
+    [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.mas_equalTo(self.imageArrayView);
+    }];
+    self.collectionView.backgroundColor = [UIColor colorWithHexString:@"#F2F3F5" alpha:1.0];
+    //赋值
+    self.objname_label.text = RQ_USER_MANAGER.currentUser.schoolName;
+    [[self.submit_button rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
+        [self.complaintPageViewModel.submitCommand execute:nil];
+    }];
 }
 
 #pragma mark - 事件
-//投诉建议
-- (IBAction)buttonObjActiondo:(id)sender {
-    
-}
+
 //投诉类型
 - (IBAction)buttonTypeActiondo:(id)sender {
+    self.currentType_button.selected = NO;
+    self.currentType_button = sender;
+    self.currentType_button.selected = YES;
+}
+
+
+#pragma mark - Lazy
+
+- (NYComplaintPageViewModel *)complaintPageViewModel
+{
+    if(!_complaintPageViewModel){
+        _complaintPageViewModel = [[NYComplaintPageViewModel alloc] init];
+        _complaintPageViewModel.complaintPageViewVC = self;
+    }
+    return _complaintPageViewModel;
+}
+
+- (NSMutableArray *)image_idArray{
+    if(!_image_idArray){
+        _image_idArray = [NSMutableArray array];
+    }
+    return _image_idArray;
+}
+
+- (NSMutableArray *)photosArray{
+    if (!_photosArray) {
+        self.photosArray = [NSMutableArray array];
+    }
+    return _photosArray;
+}
+
+- (NSMutableArray *)assestArray{
+    if (!_assestArray) {
+        self.assestArray = [NSMutableArray array];
+    }
+    return _assestArray;
+}
+
+-(UICollectionView *)collectionView{
+    if (!_collectionView) {
+        UICollectionViewFlowLayout *flowLayOut = [[UICollectionViewFlowLayout alloc] init];
+        flowLayOut.itemSize = CGSizeMake(50, 50);
+        flowLayOut.sectionInset = UIEdgeInsetsMake(5, 5, 5, 5);
+        self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:flowLayOut];
+        
+        self.collectionView.delegate = self;
+        self.collectionView.dataSource = self;
+        //        self.collectionView.scrollEnabled = NO;
+    }
+    return _collectionView;
+}
+
+
+#pragma mark -TZImagePickerController
+- (void)checkLocalPhoto{
+    
+    TZImagePickerController *imagePicker = [[TZImagePickerController alloc] initWithMaxImagesCount:9 delegate:self];
+    [imagePicker setSortAscendingByModificationDate:NO];
+    imagePicker.isSelectOriginalPhoto = _isSelectOriginalPhoto;
+    imagePicker.selectedAssets = _assestArray;
+    imagePicker.allowPickingVideo = NO;
+    [self presentViewController:imagePicker animated:YES completion:nil];
     
 }
+
+- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto{
+    self.photosArray = [NSMutableArray arrayWithArray:photos];
+    self.assestArray = [NSMutableArray arrayWithArray:assets];
+    [self.complaintPageViewModel.uploadCommand execute:@(isSelectOriginalPhoto)];
+}
+
+
+#pragma mark UICollectionViewDelegate
+- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
+    if (indexPath.row == _photosArray.count) {
+        [self checkLocalPhoto];
+    }else{
+        TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithSelectedAssets:_assestArray selectedPhotos:_photosArray index:indexPath.row];
+        imagePickerVc.isSelectOriginalPhoto = _isSelectOriginalPhoto;
+        [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
+            _photosArray = [NSMutableArray arrayWithArray:photos];
+            _assestArray = [NSMutableArray arrayWithArray:assets];
+            _isSelectOriginalPhoto = isSelectOriginalPhoto;
+            [_collectionView reloadData];
+            _collectionView.contentSize = CGSizeMake(0, ((_photosArray.count + 2) / 3 ) * (_margin + _itemWH));
+        }];
+        [self presentViewController:imagePickerVc animated:YES completion:nil];
+    }
+}
+
+- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
+    return _photosArray.count+1;
+}
+
+- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
+    CollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
+    
+    if (indexPath.row == _photosArray.count) {
+        cell.imagev.image = [UIImage imageNamed:@"comp_add"];
+//        cell.imagev.backgroundColor = [UIColor redColor];
+        cell.deleteButton.hidden = YES;
+        
+    }else{
+        cell.imagev.image = _photosArray[indexPath.row];
+        cell.deleteButton.hidden = NO;
+    }
+    cell.deleteButton.tag = 100 + indexPath.row;
+    [cell.deleteButton addTarget:self action:@selector(deletePhotos:) forControlEvents:UIControlEventTouchUpInside];
+    return cell;
+    
+}
+
+- (void)deletePhotos:(UIButton *)sender{
+    [_photosArray removeObjectAtIndex:sender.tag - 100];
+    [_assestArray removeObjectAtIndex:sender.tag - 100];
+//    [self deleteComplaintPicIndex:sender.tag - 100];
+    [self.complaintPageViewModel.deleteCommand execute:@(sender.tag - 100)];
+    [_collectionView performBatchUpdates:^{
+        NSIndexPath *indexPath = [NSIndexPath indexPathForItem:sender.tag-100 inSection:0];
+        [_collectionView deleteItemsAtIndexPaths:@[indexPath]];
+    } completion:^(BOOL finished) {
+        [_collectionView reloadData];
+    }];
+}
+
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+
 @end

+ 18 - 66
jiaPei/Modules/ComplaintModule/Controller/NYComplaintPageViewController.xib

@@ -12,6 +12,10 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NYComplaintPageViewController">
             <connections>
                 <outlet property="content_textview" destination="mY9-4Z-4qy" id="jxb-P2-aZb"/>
+                <outlet property="imageArrayView" destination="K2b-RN-hV2" id="9bh-q4-Poi"/>
+                <outlet property="objname_label" destination="o6U-Gi-Lct" id="aSm-tE-gLc"/>
+                <outlet property="px_button" destination="ZTc-o3-ARE" id="AhC-9U-828"/>
+                <outlet property="submit_button" destination="I5b-on-S8W" id="BXP-PN-v1V"/>
                 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
             </connections>
         </placeholder>
@@ -43,40 +47,6 @@
                             <color key="textColor" red="0.039215686270000001" green="0.1019607843" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
-                        <button opaque="NO" contentMode="scaleToFill" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gz9-be-VT2">
-                            <rect key="frame" x="96" y="16" width="70" height="18"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="18" id="H4Q-HB-gte"/>
-                                <constraint firstAttribute="width" constant="70" id="wtb-xl-860"/>
-                            </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                            <inset key="titleEdgeInsets" minX="8" minY="0.0" maxX="0.0" maxY="0.0"/>
-                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="8" maxY="0.0"/>
-                            <state key="normal" title="教练" image="comp_nor">
-                                <color key="titleColor" red="0.36078431372549019" green="0.37647058823529411" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                            </state>
-                            <state key="selected" image="comp_sel"/>
-                            <connections>
-                                <action selector="buttonObjActiondo:" destination="-1" eventType="touchUpInside" id="a4a-MS-wmW"/>
-                            </connections>
-                        </button>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jTa-lC-n82">
-                            <rect key="frame" x="166" y="16" width="70" height="18"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="70" id="G8p-Qs-BqE"/>
-                                <constraint firstAttribute="height" constant="18" id="foF-aC-tqC"/>
-                            </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                            <inset key="titleEdgeInsets" minX="8" minY="0.0" maxX="0.0" maxY="0.0"/>
-                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="8" maxY="0.0"/>
-                            <state key="normal" title="驾校" image="comp_nor">
-                                <color key="titleColor" red="0.36078431370000003" green="0.37647058820000001" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                            </state>
-                            <state key="selected" image="comp_sel"/>
-                            <connections>
-                                <action selector="buttonObjActiondo:" destination="-1" eventType="touchUpInside" id="lGL-FM-pH3"/>
-                            </connections>
-                        </button>
                         <button opaque="NO" contentMode="scaleToFill" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZTc-o3-ARE">
                             <rect key="frame" x="96" y="56" width="104" height="18"/>
                             <constraints>
@@ -145,26 +115,34 @@
                                 <action selector="buttonTypeActiondo:" destination="-1" eventType="touchUpInside" id="6W9-Ax-ax6"/>
                             </connections>
                         </button>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Labelxo驾校name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o6U-Gi-Lct">
+                            <rect key="frame" x="103" y="15" width="257" height="20"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="20" id="ck4-UL-NaS"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                            <nil key="textColor"/>
+                            <nil key="highlightedColor"/>
+                        </label>
                     </subviews>
                     <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     <constraints>
-                        <constraint firstItem="U7V-8p-94E" firstAttribute="top" secondItem="jTa-lC-n82" secondAttribute="bottom" constant="22" id="42e-GT-89y"/>
-                        <constraint firstItem="jTa-lC-n82" firstAttribute="leading" secondItem="Gz9-be-VT2" secondAttribute="trailing" id="4LV-XU-kXN"/>
-                        <constraint firstItem="ZTc-o3-ARE" firstAttribute="top" secondItem="Gz9-be-VT2" secondAttribute="bottom" constant="22" id="8Tr-AQ-7oa"/>
+                        <constraint firstItem="ZTc-o3-ARE" firstAttribute="top" secondItem="o6U-Gi-Lct" secondAttribute="bottom" constant="21" id="8ev-l0-Yhb"/>
                         <constraint firstItem="rOS-qN-YgC" firstAttribute="leading" secondItem="XsT-LM-A7R" secondAttribute="leading" constant="15" id="9di-QL-oH2"/>
                         <constraint firstAttribute="height" constant="105" id="G2H-sW-ytV"/>
                         <constraint firstItem="52M-HN-Nib" firstAttribute="top" secondItem="rOS-qN-YgC" secondAttribute="bottom" constant="20" id="HI9-xe-4aW"/>
                         <constraint firstItem="BWP-Wv-az2" firstAttribute="leading" secondItem="g4u-je-xWf" secondAttribute="trailing" constant="8" symbolic="YES" id="LE4-d2-ocb"/>
+                        <constraint firstItem="o6U-Gi-Lct" firstAttribute="leading" secondItem="rOS-qN-YgC" secondAttribute="trailing" constant="23" id="NqA-AX-Whw"/>
                         <constraint firstItem="rOS-qN-YgC" firstAttribute="top" secondItem="XsT-LM-A7R" secondAttribute="top" constant="15" id="QXn-z1-ayk"/>
-                        <constraint firstItem="Gz9-be-VT2" firstAttribute="top" secondItem="XsT-LM-A7R" secondAttribute="top" constant="16" id="Wrx-Qe-ZQm"/>
-                        <constraint firstItem="Gz9-be-VT2" firstAttribute="leading" secondItem="rOS-qN-YgC" secondAttribute="trailing" constant="16" id="Xmb-iq-ldF"/>
+                        <constraint firstItem="U7V-8p-94E" firstAttribute="top" secondItem="o6U-Gi-Lct" secondAttribute="bottom" constant="21" id="VOh-gD-swh"/>
                         <constraint firstItem="ZTc-o3-ARE" firstAttribute="leading" secondItem="52M-HN-Nib" secondAttribute="trailing" constant="16" id="Z1I-Vl-DT7"/>
                         <constraint firstItem="52M-HN-Nib" firstAttribute="leading" secondItem="XsT-LM-A7R" secondAttribute="leading" constant="15" id="fGl-EN-IiI"/>
                         <constraint firstItem="BWP-Wv-az2" firstAttribute="top" secondItem="U7V-8p-94E" secondAttribute="bottom" constant="12" id="g2f-OK-PeK"/>
+                        <constraint firstItem="o6U-Gi-Lct" firstAttribute="top" secondItem="XsT-LM-A7R" secondAttribute="top" constant="15" id="g3a-WH-TIo"/>
                         <constraint firstItem="g4u-je-xWf" firstAttribute="leading" secondItem="XsT-LM-A7R" secondAttribute="leading" constant="97" id="kjB-nV-bwH"/>
                         <constraint firstItem="U7V-8p-94E" firstAttribute="leading" secondItem="ZTc-o3-ARE" secondAttribute="trailing" constant="9" id="l5J-Rf-Abi"/>
+                        <constraint firstAttribute="trailing" secondItem="o6U-Gi-Lct" secondAttribute="trailing" constant="15" id="lUQ-xc-HTq"/>
                         <constraint firstItem="g4u-je-xWf" firstAttribute="top" secondItem="ZTc-o3-ARE" secondAttribute="bottom" constant="12" id="xsZ-zA-Y4p"/>
-                        <constraint firstItem="jTa-lC-n82" firstAttribute="top" secondItem="XsT-LM-A7R" secondAttribute="top" constant="16" id="zOF-Rh-4Ml"/>
                     </constraints>
                 </view>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="投诉对象" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tet-7T-Sfs">
@@ -213,34 +191,9 @@
                         </textView>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K2b-RN-hV2">
                             <rect key="frame" x="15" y="152" width="315" height="56"/>
-                            <subviews>
-                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vc0-pk-6eR">
-                                    <rect key="frame" x="0.0" y="0.0" width="56" height="56"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="56" id="3Yr-1a-bae"/>
-                                        <constraint firstAttribute="height" constant="56" id="6RS-LY-oVZ"/>
-                                    </constraints>
-                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                    <state key="normal" image="comp_add"/>
-                                </button>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="添加图片" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aeG-hG-eNk">
-                                    <rect key="frame" x="66" y="19" width="54" height="18"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="18" id="WD5-Vd-MqP"/>
-                                        <constraint firstAttribute="width" constant="54" id="gcD-O1-XxI"/>
-                                    </constraints>
-                                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                                    <color key="textColor" red="0.67843137254901964" green="0.70588235294117641" blue="0.74901960784313726" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                    <nil key="highlightedColor"/>
-                                </label>
-                            </subviews>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="56" id="6yj-4P-hAf"/>
-                                <constraint firstItem="aeG-hG-eNk" firstAttribute="centerY" secondItem="K2b-RN-hV2" secondAttribute="centerY" id="Ilh-xW-MK0"/>
-                                <constraint firstItem="vc0-pk-6eR" firstAttribute="leading" secondItem="K2b-RN-hV2" secondAttribute="leading" id="OXv-Of-99R"/>
-                                <constraint firstItem="vc0-pk-6eR" firstAttribute="top" secondItem="K2b-RN-hV2" secondAttribute="top" id="jCB-2b-9hq"/>
-                                <constraint firstItem="aeG-hG-eNk" firstAttribute="leading" secondItem="vc0-pk-6eR" secondAttribute="trailing" constant="10" id="pAk-49-IEl"/>
                             </constraints>
                         </view>
                     </subviews>
@@ -280,7 +233,6 @@
         </view>
     </objects>
     <resources>
-        <image name="comp_add" width="56" height="56"/>
         <image name="comp_nor" width="16" height="16"/>
         <image name="comp_sel" width="16" height="16"/>
         <systemColor name="labelColor">

+ 16 - 0
jiaPei/Modules/ComplaintModule/View/CollectionViewCell.h

@@ -0,0 +1,16 @@
+//
+//  CollectionViewCell.h
+//  多选图片
+//
+//  Created by holier_zyq on 2016/10/24.
+//  Copyright © 2016年 holier_zyq. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface CollectionViewCell : UICollectionViewCell
+
+@property (nonatomic ,strong) UIImageView *imagev;
+@property (nonatomic ,strong) UIButton *deleteButton;
+
+@end

+ 38 - 0
jiaPei/Modules/ComplaintModule/View/CollectionViewCell.m

@@ -0,0 +1,38 @@
+//
+//  CollectionViewCell.m
+//  多选图片
+//
+//  Created by holier_zyq on 2016/10/24.
+//  Copyright © 2016年 holier_zyq. All rights reserved.
+//
+
+#import "CollectionViewCell.h"
+
+@implementation CollectionViewCell
+
+- (instancetype)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self addSubview:self.imagev];
+        [self addSubview:self.deleteButton];
+    }
+    return self;
+}
+
+- (UIImageView *)imagev{
+    if (!_imagev) {
+        self.imagev = [[UIImageView alloc] initWithFrame:CGRectMake(0, 3, 45, 45)];
+//        _imagev.backgroundColor = [UIColor blueColor];
+    }
+    return _imagev;
+}
+- (UIButton *)deleteButton{
+    if (!_deleteButton) {
+        self.deleteButton = [UIButton buttonWithType:UIButtonTypeCustom];
+        _deleteButton.frame = CGRectMake(CGRectGetWidth(self.bounds)-20, 0, 20, 20);
+        [_deleteButton setBackgroundImage:[UIImage imageNamed:@"comp_del"] forState:UIControlStateNormal];
+    }
+    return _deleteButton;
+}
+
+@end

+ 28 - 0
jiaPei/Modules/ComplaintModule/ViewModel/NYComplaintPageViewModel.h

@@ -0,0 +1,28 @@
+//
+//  NYComplaintPageViewModel.h
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/6/30.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "NYComplaintPageViewController.h"
+#import "NYSerialQueueManager.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NYComplaintPageViewModel : NSObject
+
+@property (weak,nonatomic) NYComplaintPageViewController *complaintPageViewVC;
+
+//上传
+@property (nonatomic, strong) RACCommand *uploadCommand;
+//删除
+@property (nonatomic, strong) RACCommand *deleteCommand;
+//提交
+@property (nonatomic, strong) RACCommand *submitCommand;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 116 - 0
jiaPei/Modules/ComplaintModule/ViewModel/NYComplaintPageViewModel.m

@@ -0,0 +1,116 @@
+//
+//  NYComplaintPageViewModel.m
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/6/30.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import "NYComplaintPageViewModel.h"
+
+@implementation NYComplaintPageViewModel
+
+- (instancetype)init {
+    self = [super init];
+    if (self) {
+        [self setupCommands];
+    }
+    return self;
+}
+
+- (void)setupCommands {
+    @weakify(self)
+    self.uploadCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
+        @strongify(self);
+        [NYSerialQueueManager.sharedInstance clear];
+        //上传照片-记录ID
+        for (UIImage *image in self.complaintPageViewVC.photosArray) {
+            [NYSerialQueueManager.sharedInstance addTask:^{
+                [self uploadComplaintPicImage:image];
+            } completion:nil];
+        }
+        [MBProgressHUD rq_showProgressHUD:@"上传照片..."];
+        [NYSerialQueueManager.sharedInstance startCompletion:^{
+            self.complaintPageViewVC.isSelectOriginalPhoto = (BOOL)input;
+            [self.complaintPageViewVC.collectionView reloadData];
+            [MBProgressHUD rq_hideHUD];
+        }];
+        return [RACSignal empty];
+    }];
+    self.deleteCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
+        @strongify(self);
+        [self deleteComplaintPicIndex:[input intValue]];
+        return [RACSignal empty];
+    }];
+    self.submitCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
+        @strongify(self);
+        [self submitComplaintdo];
+        return [RACSignal empty];
+    }];
+    
+}
+
+//上传图片
+- (void)uploadComplaintPicImage:(UIImage *)image{
+    
+    __block NSMutableArray *arr = [NSMutableArray array];
+    [RQ_CHECKBODY_MANAGER getImageStrWithImage:image completeBlock:^(NSString *backString) {
+        [arr property:backString forKey:@"pic"];
+    }];
+    [arr property:RQ_USER_MANAGER.currentUser.city  forKey:@"dqbh"];
+    NSString* method = @"uploadComplaintPic";
+    @weakify(self)
+    [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary *dict) {
+        NSLog(@"%@",dict);
+        int code = [dict[@"code"] intValue];
+        if(code == 0 ){
+            [self.complaintPageViewVC.image_idArray addObject:dict[@"body"]];
+        }
+    }];
+}
+
+//删除照片
+- (void)deleteComplaintPicIndex:(int )index{
+    
+    NSMutableArray *arr = [NSMutableArray array];
+    [arr property:RQ_USER_MANAGER.currentUser.city  forKey:@"dqbh"];
+    [arr property:self.complaintPageViewVC.image_idArray[index]  forKey:@"id"];
+    [self.complaintPageViewVC.image_idArray removeObjectAtIndex:index];
+    NSString* method = @"delComplaintPic";
+    [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary *dict) {
+        NSLog(@"%@",dict);
+        int code = [dict[@"code"] intValue];
+        if(code == 0 ){
+            NSLog(@"删除成功");
+        }
+    }];
+}
+//提交投诉
+- (void)submitComplaintdo{
+    
+    NSMutableString *picids = [NSMutableString string];
+    if(self.complaintPageViewVC.image_idArray.count>0){
+        for (id item in self.complaintPageViewVC.image_idArray) {
+            [picids appendFormat:@"%@,",item];
+        }
+        NSRange range = NSMakeRange(picids.length - 1, 1);
+        [picids deleteCharactersInRange:range];
+    }
+    NSString *content = self.complaintPageViewVC.content_textview.text;
+    NSMutableArray *arr = [NSMutableArray array];
+    [arr addPro:@"stunum"            Value:RQ_USER_MANAGER.currentUser.outId];///学员编号
+    [arr addPro:@"type"            Value:@2];///驾校
+    [arr addPro:@"content"            Value:content];///投诉内容
+    [arr addPro:@"phone"            Value:RQ_USER_MANAGER.currentUser.telphone];///学员电话
+    [arr addPro:@"picids"            Value:picids];///照片ID ,,
+    [arr addPro:@"dqbh"            Value:RQ_USER_MANAGER.currentUser.city];///地区编号
+    [MBProgressHUD rq_showProgressHUD:@"提交投诉..."];
+    [jiaPeiManager requestAnythingWithURL:@"uploadComplaint" array:arr data:nil completion:^(NSDictionary * root) {
+        NSString *body = root[@"body"];
+        [MBProgressHUD rq_hideHUD];
+        [RQ_SHARE_FUNCTION showAlertWithMessage:body completion:nil];
+        return;
+    }];
+}
+
+@end

+ 2 - 0
jiaPei/OLD/Util/SingletonManger/ChechBodyManager/CheckBodyManager.h

@@ -40,6 +40,8 @@ typedef void(^CheckBodyCompletedBlock)(BOOL success, NSDictionary * _Nullable di
 /// 设置活体动作图片base64字符串
 /// @param actionImageString 活体动作图片base64字符串
 - (void)setActionImageString:(NSString *)actionImageString;
+/// 获取图片 base64
+- (void)getImageStrWithImage:(UIImage *)image completeBlock:(void(^)(NSString *backString))completeBlock;
 @end
 
 NS_ASSUME_NONNULL_END

+ 22 - 0
jiaPei/Utils/Manager/NYSerialQueueManager.h

@@ -0,0 +1,22 @@
+//
+//  NYSerialQueueManager.h
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/7/2.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NYSerialQueueManager : NSObject
+
++ (instancetype)sharedInstance;
+- (void)addTask:(void (^)(void))task completion:(void (^)(void))completion;
+- (void)startCompletion:(void (^)(void))completion;
+- (void)clear;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 81 - 0
jiaPei/Utils/Manager/NYSerialQueueManager.m

@@ -0,0 +1,81 @@
+//
+//  NYSerialQueueManager.m
+//  jiaPei
+//
+//  Created by Ning.ge on 2023/7/2.
+//  Copyright © 2023 JCZ. All rights reserved.
+//
+
+
+#import "NYSerialQueueManager.h"
+
+@interface NYSerialQueueManager ()
+
+@property (nonatomic, strong) dispatch_queue_t serialQueue;
+@property (nonatomic, strong) NSMutableArray *tasks;
+@property (nonatomic, assign) NSUInteger completedTasksCount;
+
+@end
+
+@implementation NYSerialQueueManager
+
++ (instancetype)sharedInstance {
+    static NYSerialQueueManager *instance;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        instance = [[NYSerialQueueManager alloc] init];
+    });
+    return instance;
+}
+
+- (instancetype)init {
+    self = [super init];
+    if (self) {
+        _serialQueue = dispatch_queue_create("com.example.NYserialQueue", DISPATCH_QUEUE_SERIAL);
+        _tasks = [NSMutableArray array];
+        _completedTasksCount = 0;
+    }
+    return self;
+}
+
+- (void)addTask:(void (^)(void))task completion:(void (^)(void))completion {
+    dispatch_async(self.serialQueue, ^{
+        [self.tasks addObject:task];
+        
+        dispatch_async(dispatch_get_main_queue(), ^{
+            if (completion) {
+                completion();
+            }
+        });
+    });
+}
+
+- (void)startCompletion:(void (^)(void))completion {
+    dispatch_async(self.serialQueue, ^{
+        for (NSUInteger i = 0; i < self.tasks.count; i++) {
+            void (^task)(void) = self.tasks[i];
+            task();
+            self.completedTasksCount++;
+            
+            if (self.completedTasksCount == self.tasks.count) {
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    NSLog(@"All tasks completed.");
+                    // 在这里进行任务完成的提示操作
+                    if (completion) {
+                        completion();
+                    }
+                });
+            }
+        }
+    });
+}
+
+- (void)clear{
+    
+    self.completedTasksCount = 0;
+    if (self.tasks.count){
+        [self.tasks removeAllObjects];
+    }
+}
+
+@end