openlockPPP 1 жил өмнө
parent
commit
d3240f10b8

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


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

@@ -103,6 +103,7 @@
     NYComplaintListViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"NYComplaintListViewCell"];
     [cell setComplaintInfoModel:self.complaintListViewModel.complaintList[indexPath.row]];
     cell.cancelCommand = self.complaintListViewModel.cancelCommand;
+    cell.imagesCommand = self.complaintListViewModel.imagesCommand;
     return cell;
 }
 

+ 3 - 1
jiaPei/Modules/ComplaintModule/View/NYComplaintListViewCell.h

@@ -25,8 +25,10 @@ NS_ASSUME_NONNULL_BEGIN
 @property (weak, nonatomic) IBOutlet UIButton *cancel_button;
 
 @property (strong, nonatomic) ComplaintInfoModel *complaintInfoModel;
-
+//撤销
 @property (nonatomic, strong) RACCommand *cancelCommand;
+//图片浏览
+@property (nonatomic, strong) RACCommand *imagesCommand;
 
 @end
 

+ 1 - 2
jiaPei/Modules/ComplaintModule/View/NYComplaintListViewCell.m

@@ -91,6 +91,7 @@
 
 #pragma mark UICollectionViewDelegate
 - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
+    [self.imagesCommand execute:@[self.photosArray,@(indexPath.row)]];
 }
 
 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
@@ -105,8 +106,6 @@
     return cell;
     
 }
-
-
 #pragma mark - Lray
 
 - (NSMutableArray *)photosArray{

+ 2 - 1
jiaPei/Modules/ComplaintModule/ViewModel/NYComplaintListViewModel.h

@@ -27,7 +27,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, strong) RACCommand *addCommand;
 //撤销投诉
 @property (nonatomic, strong) RACCommand *cancelCommand;
-
+//图片浏览
+@property (nonatomic, strong) RACCommand *imagesCommand;
 - (void)getComplaintList;
 
 - (void)getComplaintListMore;

+ 9 - 0
jiaPei/Modules/ComplaintModule/ViewModel/NYComplaintListViewModel.m

@@ -33,6 +33,13 @@
         [self cancelHandledo:input];
         return [RACSignal empty];
     }];
+    self.imagesCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
+        @strongify(self);
+        int currentIndex = [input[1] intValue];
+        NSArray *images = input[0];
+        [RQ_SHARE_FUNCTION showPhotoBrowserWithDataSource:images currentIndex:currentIndex isCanSave:NO];
+        return [RACSignal empty];
+    }];
     
 }
 
@@ -128,4 +135,6 @@
     return _complaintList;
 }
 
+
+
 @end