Commit 400e23abbfcd76f85e7164111cedd76fe0cf59aa

Authored by yinqiaojuan
1 parent 956725d8

提交订单界面

CNLiveMyOrderModule.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveMyOrderModule'
11   - s.version = '0.0.2'
  11 + s.version = '0.0.1'
12 12 s.summary = '我的订单组件化'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ... @@ -30,62 +30,57 @@ TODO: Add long description of the pod here.
30 30  
31 31 s.ios.deployment_target = '9.0'
32 32  
33   - s.source_files = 'CNLiveMyOrderModule/Classes/**/*'
34   -
  33 + # s.source_files = 'CNLiveMyOrderModule/Classes/**/*'
  34 + s.subspec 'Model' do |model|
  35 + model.source_files = 'CNLiveMyOrderModule/Classes/Model/*.{h,m}'
  36 + end
  37 + s.subspec 'ViewModel' do |viewModel|
  38 + viewModel.source_files = 'CNLiveMyOrderModule/Classes/ViewModel/*.{h,m}'
  39 + viewModel.dependency 'CNLiveMyOrderModule/Model'
  40 + end
  41 + s.subspec 'View' do |view|
  42 + view.source_files = 'CNLiveMyOrderModule/Classes/View/*.{h,m}'
  43 +# view.dependency 'CNLiveMyOrderModule/Model'
  44 + view.dependency 'CNLiveMyOrderModule/ViewModel'
  45 + end
35 46 s.subspec 'Controller' do |controller|
36 47 controller.source_files = 'CNLiveMyOrderModule/Classes/Controller/*.{h,m}'
37   - controller.dependency 'CNLiveCommonClass'
38   - controller.dependency 'CNLiveCommonCategory'
39   - controller.dependency 'CNLiveBaseKit'
40   - controller.dependency 'CNLiveTripartiteManagement/Masonry'
41   - controller.dependency 'JXCategoryView'
42 48 controller.dependency 'CNLiveMyOrderModule/View'
43   - controller.dependency 'CNLiveTripartiteManagement/QMUIKit'
44   - controller.dependency 'CNLiveTripartiteManagement/Masonry'
45   - controller.dependency 'CNLiveTripartiteManagement/YYKit'
46   - controller.dependency 'CNLiveTripartiteManagement/MJExtension'
47   - controller.dependency 'CNLiveIMBaseSDK'
48   - end
49   - s.subspec 'View' do |view|
50   - view.source_files = 'CNLiveMyOrderModule/Classes/View/*.{h,m}'
51   - view.dependency 'CNLiveTripartiteManagement/QMUIKit'
52   - view.dependency 'CNLiveTripartiteManagement/Masonry'
53   - view.dependency 'CNLiveMyOrderModule/Model'
54   - view.dependency 'CNLiveCommonCategory'
55   - view.dependency 'CNLiveTripartiteManagement/SDWebImage'
56   - view.dependency 'CNLiveTripartiteManagement/YYKit'
57   - view.dependency 'CNLiveTripartiteManagement/MJRefresh'
58   - view.dependency 'CNLiveCustomUI'
59   - view.dependency 'CNLiveTripartiteManagement/MJExtension'
60   - view.dependency 'CNLiveEnvironment'
61   - view.dependency 'CNLiveUserManagement'
62   - view.dependency 'CNLiveIMBaseSDK'
63   - view.dependency 'CNLiveMyOrderModule/ViewModel'
64   - view.dependency 'CNLiveImagePickerController'
65   - end
66   - s.subspec 'ViewModel' do |viewModel|
67   - viewModel.source_files = 'CNLiveMyOrderModule/Classes/ViewModel/*.{h,m}'
68   - viewModel.dependency 'CNLiveUserManagement'
69   - viewModel.dependency 'CNLiveEnvironment'
70   - viewModel.dependency 'CNLiveRequestBastKit'
71   - viewModel.dependency 'CNLiveMyOrderModule/Model'
72   - viewModel.dependency 'CNLiveTripartiteManagement/QMUIKit'
73   - viewModel.dependency 'CNLiveTripartiteManagement/MJExtension'
  49 +# controller.dependency 'CNLiveMyOrderModule/Model'
  50 +# controller.dependency 'CNLiveMyOrderModule/ViewModel'
74 51 end
75 52 s.subspec 'Module' do |modules|
76 53 modules.source_files = 'CNLiveMyOrderModule/Classes/Module/*.{h,m}'
77 54 end
78   - s.subspec 'Model' do |model|
79   - model.source_files = 'CNLiveMyOrderModule/Classes/Model/*.{h,m}'
80   - model.dependency 'CNLiveTripartiteManagement/MJExtension'
81   - end
82 55 s.subspec 'Service' do |service|
83 56 service.source_files = 'CNLiveMyOrderModule/Classes/Service/*.{h,m}'
84 57 service.dependency 'CNLiveMyOrderModule/Controller'
85 58 end
86 59 s.dependency 'CNLiveBeeHive'
87 60 s.dependency 'CNLiveServices'
  61 + #基础库
  62 + s.dependency 'CNLiveCommonClass'
88 63 s.dependency 'CNLiveBaseKit'
  64 + s.dependency 'CNLiveCommonCategory'
  65 + s.dependency 'CNLiveCustomUI'
  66 + #环境库
  67 + s.dependency 'CNLiveEnvironment'
  68 + #用户库
  69 + s.dependency 'CNLiveUserManagement'
  70 + #IM
  71 + # s.dependency 'CNLiveIMBaseSDK'
  72 + #相册
  73 +# s.dependency 'CNLiveImagePickerController'
  74 + #网络请求
  75 + s.dependency 'CNLiveRequestBastKit'
  76 + #三方库
  77 + s.dependency 'CNLiveTripartiteManagement/Masonry'
  78 + s.dependency 'CNLiveTripartiteManagement/QMUIKit'
  79 + s.dependency 'CNLiveTripartiteManagement/YYKit'
  80 + s.dependency 'CNLiveTripartiteManagement/MJExtension'
  81 + s.dependency 'CNLiveTripartiteManagement/SDWebImage'
  82 + s.dependency 'CNLiveTripartiteManagement/MJRefresh'
  83 + s.dependency 'JXCategoryView'
89 84 s.user_target_xcconfig = { 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES'
90 85 }
91 86 s.resource_bundles = {
... ...
CNLiveMyOrderModule/Classes/Controller/CNLiveOrderDetailController.m
... ... @@ -16,8 +16,8 @@
16 16 #import "Masonry.h"
17 17 #import "CNLiveErrorOrNoNetView.h"
18 18 #import "CNLiveOrderEventHandle.h"
19   -#import "TIMAdapter.h"
20   -#import "CommonLibrary.h"
  19 +//#import "TIMAdapter.h"
  20 +//#import "CommonLibrary.h"
21 21 #import "CNLiveCommonCategory.h"
22 22 #import "CNLiveAddPopFuncView.h"
23 23 #import "CNLiveOrderDetailContentView.h"
... ... @@ -857,7 +857,7 @@
857 857  
858 858 case CNLiveMineOrderButtonItemTypeReminder: { //催单
859 859 [CNLiveOrderEventHandle reminderOrder:weakSelf.list superView:weakSelf.view complete:^(NSString *msg) {
860   - [[HUDHelper sharedInstance] tipMessage:msg];
  860 +// [[HUDHelper sharedInstance] tipMessage:msg];
861 861 }];
862 862  
863 863 }
... ...
CNLiveMyOrderModule/Classes/View/CNLiveMineOrderTableViewCell.m
... ... @@ -9,7 +9,6 @@
9 9 #import "CNLiveMineOrderView.h"
10 10 #import "Masonry.h"
11 11 #import "CNLiveBaseKit.h"
12   -#import "CNLiveOrderEventHandle.h"
13 12 #define Line_H 0.5
14 13 /** 通用的间距值 */
15 14 CGFloat const ZXMargin = 10;
... ...
CNLiveMyOrderModule/Classes/View/CNLiveMineOrderView.m
... ... @@ -12,7 +12,7 @@
12 12 #import <QMUIKit/QMUIKit.h>
13 13 #import "CNLiveCommonCategory.h"
14 14 #import "CNLiveBaseKit.h"
15   -#import "TIMAdapter.h"
  15 +//#import "TIMAdapter.h"
16 16 #import <SDWebImage/SDWebImage.h>
17 17 #import "DSAddressModel.h"
18 18 #import "CNLiveSelectRefundButton.h"
... ... @@ -2513,7 +2513,7 @@
2513 2513  
2514 2514 - (void)setList:(CNLiveOrderList *)list {
2515 2515 CNLiveOrderListIconBean *icon = list.iconBean;
2516   - [_iconImgView sd_setImageWithURL:[NSURL URLWithString:icon.image] placeholderImage:kDefaultUserIcon];
  2516 +// [_iconImgView sd_setImageWithURL:[NSURL URLWithString:icon.image] placeholderImage:kDefaultUserIcon];
2517 2517 }
2518 2518  
2519 2519 - (void)starsControl:(CNLiveStarsControl *)starsControl didChangeScore:(CGFloat)score {
... ...
CNLiveMyOrderModule/Classes/View/CNLiveOrderListCommonView.m
... ... @@ -17,8 +17,8 @@
17 17 #import "CNLiveMineOrderItem.h"
18 18 #import "MJExtension.h"
19 19 #import "CNUserInfoManager.h"
20   -#import "TIMAdapter.h"
21   -#import "CommonLibrary.h"
  20 +//#import "TIMAdapter.h"
  21 +//#import "CommonLibrary.h"
22 22 #import "CNLiveCommonCategory.h"
23 23 #import "CNLiveOrderViewModel.h"
24 24 #import "CNLiveOrderList.h"
... ... @@ -211,7 +211,7 @@ static const CGFloat KCategoryViewHeight = 44;
211 211  
212 212 case CNLiveMineOrderButtonItemTypeReminder: { //催单
213 213 [CNLiveOrderEventHandle reminderOrder:model superView:self complete:^(NSString *msg) {
214   - [[HUDHelper sharedInstance] tipMessage:msg];
  214 +// [[HUDHelper sharedInstance] tipMessage:msg];
215 215 }];
216 216 }
217 217 break;
... ...
CNLiveMyOrderModule/Classes/View/CNLiveUploadVoucher.m
... ... @@ -6,34 +6,34 @@
6 6 //
7 7  
8 8 #import "CNLiveUploadVoucher.h"
9   -#import <CNLiveImagePickerController/TZImagePickerController.h>
10   -#import "TZImageManager.h"
11   -#import "LxGridViewFlowLayout.h"
12   -#import "TZTestCell.h"
13   -#import <AssetsLibrary/AssetsLibrary.h>
14   -#import <Photos/Photos.h>
15   -#import <YYKit/YYKit.h>
16   -#import "CNImagePickerController.h"
17   -#import "CNLiveBaseKit.h"
18   -#import <QMUIKit/QMUIKit.h>
19   -#import <Masonry/Masonry.h>
20   -#import "CNLiveCommonCategory.h"
21   -@interface CNLiveUploadVoucher ()<TZImagePickerControllerDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate,UICollectionViewDataSource,UICollectionViewDelegate,UIActionSheetDelegate>{
  9 +//#import <CNLiveImagePickerController/TZImagePickerController.h>
  10 +//#import "TZImageManager.h"
  11 +//#import "LxGridViewFlowLayout.h"
  12 +//#import "TZTestCell.h"
  13 +//#import <AssetsLibrary/AssetsLibrary.h>
  14 +//#import <Photos/Photos.h>
  15 +//#import <YYKit/YYKit.h>
  16 +//#import "CNImagePickerController.h"
  17 +//#import "CNLiveBaseKit.h"
  18 +//#import <QMUIKit/QMUIKit.h>
  19 +//#import <Masonry/Masonry.h>
  20 +//#import "CNLiveCommonCategory.h"
  21 +@interface CNLiveUploadVoucher ()<UINavigationControllerDelegate,UIImagePickerControllerDelegate,UICollectionViewDataSource,UICollectionViewDelegate,UIActionSheetDelegate>{
22 22 }
23   -@property (nonatomic, strong) UIImagePickerController *imagePickerVc;
24   -
25   -@property (nonatomic, strong) UILabel *titleLab;
26   -@property (nonatomic, strong) UICollectionView *collectionView;
27   -@property (nonatomic, strong) LxGridViewFlowLayout *layout;
28   -@property (nonatomic, strong) CLLocation *location;
29   -@property (nonatomic, strong) NSMutableArray *selectedPhotos;
30   -@property (nonatomic, strong) NSMutableArray *selectedAssets;
31   -@property (nonatomic, assign) BOOL isSelectOriginalPhoto;
32   -@property (nonatomic, assign) CGFloat itemWH;
33   -@property (nonatomic, assign) CGFloat margin;
34   -@property (nonatomic, assign) CGFloat collHeight;
35   -@property (nonatomic, assign) CGFloat add; //是否隐藏加号
36   -@property (nonatomic, assign) CGFloat colTop; //collectionView 距离顶部坐标
  23 +//@property (nonatomic, strong) UIImagePickerController *imagePickerVc;
  24 +//
  25 +//@property (nonatomic, strong) UILabel *titleLab;
  26 +//@property (nonatomic, strong) UICollectionView *collectionView;
  27 +//@property (nonatomic, strong) LxGridViewFlowLayout *layout;
  28 +//@property (nonatomic, strong) CLLocation *location;
  29 +//@property (nonatomic, strong) NSMutableArray *selectedPhotos;
  30 +//@property (nonatomic, strong) NSMutableArray *selectedAssets;
  31 +//@property (nonatomic, assign) BOOL isSelectOriginalPhoto;
  32 +//@property (nonatomic, assign) CGFloat itemWH;
  33 +//@property (nonatomic, assign) CGFloat margin;
  34 +//@property (nonatomic, assign) CGFloat collHeight;
  35 +//@property (nonatomic, assign) CGFloat add; //是否隐藏加号
  36 +//@property (nonatomic, assign) CGFloat colTop; //collectionView 距离顶部坐标
37 37 @end
38 38 @implementation CNLiveUploadVoucher
39 39 #pragma clang diagnostic push
... ... @@ -47,9 +47,9 @@
47 47 self = [super initWithFrame:frame];
48 48 if (self) {
49 49 self.backgroundColor = [UIColor whiteColor];
50   - _add = 1;
51   - _selectedPhotos = [[NSMutableArray alloc] init];
52   - _selectedAssets = [[NSMutableArray alloc] init];
  50 +// _add = 1;
  51 +// _selectedPhotos = [[NSMutableArray alloc] init];
  52 +// _selectedAssets = [[NSMutableArray alloc] init];
53 53 [self configCollectionView];
54 54 }
55 55 return self;
... ... @@ -57,386 +57,386 @@
57 57 #pragma mark - 添加collectionView
58 58 - (void)configCollectionView {
59 59 // 如不需要长按排序效果,将LxGridViewFlowLayout类改成UICollectionViewFlowLayout即可
60   - _layout = [[LxGridViewFlowLayout alloc] init];
61   - _margin = 8;
62   - _itemWH = (KScreenWidth - 20 - 2 * _margin - 4) / 3 - _margin;
63   - _layout.itemSize = CGSizeMake(_itemWH, _itemWH);
64   - _layout.minimumInteritemSpacing = _margin;
65   - _layout.minimumLineSpacing = _margin;
66   - _colTop = 20;
67   - if (self.titleLabel) {
68   - _colTop += self.titleLabel.height+15;
69   - [self addSubview:self.titleLabel];
70   - }
71   - _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(10, _colTop, KScreenWidth-20, _itemWH+10) collectionViewLayout:_layout];
72   - _collectionView.alwaysBounceVertical = YES;
73   - _collectionView.backgroundColor = [UIColor whiteColor];
74   - _collectionView.contentInset = UIEdgeInsetsMake(4, 4, 4, 4);
75   - _collectionView.dataSource = self;
76   - _collectionView.delegate = self;
77   - _collectionView.scrollEnabled = NO;
78   - _collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
79   - [self addSubview:_collectionView];
80   - [_collectionView registerClass:[TZTestCell class] forCellWithReuseIdentifier:@"TZTestCell"];
  60 +// _layout = [[LxGridViewFlowLayout alloc] init];
  61 +// _margin = 8;
  62 +// _itemWH = (KScreenWidth - 20 - 2 * _margin - 4) / 3 - _margin;
  63 +// _layout.itemSize = CGSizeMake(_itemWH, _itemWH);
  64 +// _layout.minimumInteritemSpacing = _margin;
  65 +// _layout.minimumLineSpacing = _margin;
  66 +// _colTop = 20;
  67 +// if (self.titleLabel) {
  68 +// _colTop += self.titleLabel.height+15;
  69 +// [self addSubview:self.titleLabel];
  70 +// }
  71 +// _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(10, _colTop, KScreenWidth-20, _itemWH+10) collectionViewLayout:_layout];
  72 +// _collectionView.alwaysBounceVertical = YES;
  73 +// _collectionView.backgroundColor = [UIColor whiteColor];
  74 +// _collectionView.contentInset = UIEdgeInsetsMake(4, 4, 4, 4);
  75 +// _collectionView.dataSource = self;
  76 +// _collectionView.delegate = self;
  77 +// _collectionView.scrollEnabled = NO;
  78 +// _collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
  79 +// [self addSubview:_collectionView];
  80 +// [_collectionView registerClass:[TZTestCell class] forCellWithReuseIdentifier:@"TZTestCell"];
81 81 }
82 82  
83 83 #pragma mark - Action
84 84 #pragma mark - Action
85   -- (void)deleteBtnClik:(UIButton *)sender {
86   - __weak typeof(self) weakSelf = self;
87   - [_selectedPhotos removeObjectAtIndex:sender.tag];
88   - [_selectedAssets removeObjectAtIndex:sender.tag];
89   - [_collectionView performBatchUpdates:^{
90   - NSIndexPath *indexPath = [NSIndexPath indexPathForItem:sender.tag inSection:0];
91   - [weakSelf.collectionView deleteItemsAtIndexPaths:@[indexPath]];
92   - } completion:^(BOOL finished) {
93   - weakSelf.add = 1;
94   - [weakSelf updateHeight];
95   - }];
96   -
97   -}
98   -
99   -#pragma mark - UICollectionViewdelegate
100   -
101   -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
102   - return self.selectedPhotos.count + self.add;
103   -}
104   -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
105   - TZTestCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TZTestCell" forIndexPath:indexPath];
106   - cell.videoImageView.hidden = YES;
107   - cell.gifLable.hidden = YES;
108   -
109   - if (indexPath.row == _selectedPhotos.count) {
110   - cell.imageView.image = [UIImage cnLive_getImageNameWithBundle:@"pj_tianjiazhaopian" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
111   - cell.deleteBtn.hidden = YES;
112   - } else {
113   - cell.imageView.image = _selectedPhotos[indexPath.row];
114   - cell.asset = _selectedAssets[indexPath.row];
115   - cell.deleteBtn.hidden = NO;
116   - }
117   -
118   - cell.deleteBtn.tag = indexPath.row;
119   - [cell.deleteBtn addTarget:self action:@selector(deleteBtnClik:) forControlEvents:UIControlEventTouchUpInside];
120   - return cell;
121   -}
122   -
123   -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
124   - __weak typeof(self) weakSelf = self;
125   - if (indexPath.row == _selectedPhotos.count) {
126   -
127   - [self createAlertViewTitleArray:@[@"拍照",@"从相册选取"] textColor:KTextBlackColor font:UIFontMake(15) actionBlock:^(UIButton *button, NSInteger didRow) {
128   -
129   - switch (didRow) {
130   - case 0: {
131   - [self takePhoto];
132   - }
133   - break;
134   -
135   - case 1: {
136   - [self pushTZImagePickerController];
137   - }
138   - break;
139   -
140   - default:
141   - break;
142   - }
143   -
144   - }];
145   -
146   - } else { //预览照片
147   - CNImagePickerController *imagePickerVc = [[CNImagePickerController alloc] initWithSelectedAssets:_selectedAssets selectedPhotos:_selectedPhotos index:indexPath.row];
148   - [imagePickerVc configTZImagePicker];
149   - imagePickerVc.maxImagesCount = 9;
150   - imagePickerVc.allowPickingGif = NO;
151   - imagePickerVc.allowPickingOriginalPhoto = YES;
152   - imagePickerVc.allowPickingMultipleVideo = NO;
153   - imagePickerVc.isSelectOriginalPhoto = _isSelectOriginalPhoto;
154   - [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
155   - weakSelf.selectedPhotos = [NSMutableArray arrayWithArray:photos];
156   - weakSelf.selectedAssets = [NSMutableArray arrayWithArray:assets];
157   - weakSelf.isSelectOriginalPhoto = isSelectOriginalPhoto;
158   - [weakSelf.collectionView reloadData];
159   - weakSelf.collectionView.contentSize = CGSizeMake(0, ((weakSelf.selectedPhotos.count + 2) / 3 ) * (weakSelf.margin + weakSelf.itemWH));
160   - }];
161   - [self.viewController presentViewController:imagePickerVc animated:YES completion:nil];
162   -
163   - }
164   -}
165   -#pragma mark - LxGridViewDataSource
166   -/// 以下三个方法为长按排序相关代码
167   -- (BOOL)collectionView:(UICollectionView *)collectionView canMoveItemAtIndexPath:(NSIndexPath *)indexPath {
168   - return indexPath.item < _selectedPhotos.count;
169   -}
170   -
171   -- (BOOL)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)sourceIndexPath canMoveToIndexPath:(NSIndexPath *)destinationIndexPath {
172   - return (sourceIndexPath.item < _selectedPhotos.count && destinationIndexPath.item < _selectedPhotos.count);
173   -}
174   -
175   -- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)sourceIndexPath didMoveToIndexPath:(NSIndexPath *)destinationIndexPath {
176   - UIImage *image = _selectedPhotos[sourceIndexPath.item];
177   - [_selectedPhotos removeObjectAtIndex:sourceIndexPath.item];
178   - [_selectedPhotos insertObject:image atIndex:destinationIndexPath.item];
179   -
180   - id asset = _selectedAssets[sourceIndexPath.item];
181   - [_selectedAssets removeObjectAtIndex:sourceIndexPath.item];
182   - [_selectedAssets insertObject:asset atIndex:destinationIndexPath.item];
183   -
184   - [_collectionView reloadData];
185   -
186   - if (self.delegate && [self.delegate respondsToSelector:@selector(updateImages:)]) {
187   - [self.delegate updateImages:_selectedAssets];
188   - }
189   -}
190   -
191   -#pragma mark - UIImagePickerController
192   -- (void)takePhoto {
193   - AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
194   - if ((authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied) && iOS7Later) {
195   - // 无相机权限 做一个友好的提示
196   - if (iOS8Later) {
197   - UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"无法使用相机" message:@"请在iPhone的“设置-隐私-相机“中允许访问相机" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:nil, nil];//设置
198   -
199   - [alert show];
200   - }
201   - } else if (authStatus == AVAuthorizationStatusNotDetermined) {
202   - // fix issue 466, 防止用户首次拍照拒绝授权时相机页黑屏
203   - if (iOS7Later) {
204   - [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {
205   - if (granted) {
206   - dispatch_sync(dispatch_get_main_queue(), ^{
207   - [self takePhoto];
208   - });
209   - }
210   - }];
211   - } else {
212   - [self takePhoto];
213   - }
214   - // 拍照之前还需要检查相册权限
215   - } else if ([TZImageManager authorizationStatus] == 2) { // 已被拒绝,没有相册权限,将无法保存拍的照片
216   - if (iOS8Later) {
217   - UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"无法访问相册" message:@"请在iPhone的“设置-隐私-相册“中允许访问相册" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:nil, nil];//设置
218   - [alert show];
219   - }
220   - } else if ([TZImageManager authorizationStatus] == 0) { // 未请求过相册权限
221   - [[TZImageManager manager] requestAuthorizationWithCompletion:^{
222   - [self takePhoto];
223   - }];
224   - } else {
225   - [self pushImagePickerController];
226   - }
227   -}
228   -// 调用相机
229   -- (void)pushImagePickerController {
230   - UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera;
231   - if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) {
232   - self.imagePickerVc.sourceType = sourceType;
233   - if(iOS8Later) {
234   - _imagePickerVc.modalPresentationStyle = UIModalPresentationOverCurrentContext;
235   - }
236   - [self.viewController presentViewController:_imagePickerVc animated:YES completion:nil];
237   - } else {
238   - NSLog(@"模拟器中无法打开照相机,请在真机中使用");
239   - }
240   -}
241   -#pragma mark - TZImagePickerController
242   -- (void)pushTZImagePickerController {
243   - CNImagePickerController *imagePickerVc = [[CNImagePickerController alloc]initWithMaxImagesCount:9 columnNumber:4 delegate:self pushPhotoPickerVc:YES];
244   - [imagePickerVc configTZImagePicker];//配置
245   -#pragma mark - 五类个性化设置,这些参数都可以不传,此时会走默认设置
246   - imagePickerVc.isSelectOriginalPhoto = _isSelectOriginalPhoto;
247   -
248   - imagePickerVc.selectedAssets = _selectedAssets; //目前已经选中的图片数组
249   - imagePickerVc.allowTakePicture = NO; //在内部显示拍照按钮
250   - imagePickerVc.allowPickingVideo = NO; //是否允许选择视频
251   - imagePickerVc.allowPickingImage = YES; //是否允许选择图片
252   - imagePickerVc.allowPickingOriginalPhoto = YES; //选择原图
253   - imagePickerVc.allowPickingGif = NO; //选择Gif
254   - imagePickerVc.allowPickingMultipleVideo = NO; // 是否可以多选视频
255   - imagePickerVc.sortAscendingByModificationDate = YES;//排序
256   - imagePickerVc.showSelectBtn = NO;
257   - imagePickerVc.allowCrop = NO; //是否允许裁剪
258   - imagePickerVc.needCircleCrop = NO; //是否使用圆形裁剪
259   -
260   - // 你可以通过block或者代理,来得到用户选择的照片.
261   - [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
262   -
263   - }];
264   - [self.viewController presentViewController:imagePickerVc animated:YES completion:nil];
265   -}
266   -- (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
267   - [picker dismissViewControllerAnimated:YES completion:nil];
268   - NSString *type = [info objectForKey:UIImagePickerControllerMediaType];
269   - if ([type isEqualToString:@"public.image"]) {
270   - TZImagePickerController *tzImagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:1 delegate:self];
271   - tzImagePickerVc.modalPresentationStyle = UIModalPresentationFullScreen;
272   - tzImagePickerVc.sortAscendingByModificationDate = YES;
273   - [tzImagePickerVc showProgressHUD];
274   - UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
275   -
276   - // save photo and get asset / 保存图片,获取到asset
277   - [[TZImageManager manager] savePhotoWithImage:image location:nil completion:^(NSError *error){
278   - [tzImagePickerVc hideProgressHUD];
279   - if (error) {
280   - [tzImagePickerVc hideProgressHUD];
281   - NSLog(@"图片保存失败 %@",error);
282   - } else {
283   - [[TZImageManager manager] getCameraRollAlbum:NO allowPickingImage:YES needFetchAssets:YES completion:^(TZAlbumModel *model) {
284   - [[TZImageManager manager] getAssetsFromFetchResult:model.result allowPickingVideo:NO allowPickingImage:YES completion:^(NSArray<TZAssetModel *> *models) {
285   - [tzImagePickerVc hideProgressHUD];
286   - TZAssetModel *assetModel = [models firstObject];
287   - if (tzImagePickerVc.sortAscendingByModificationDate) {
288   - assetModel = [models lastObject];
289   - }
290   -
291   - [self refreshCollectionViewWithAddedAsset:assetModel.asset image:image];
292   -
293   - }];
294   - }];
295   - }
296   - }];
297   - }
298   -}
299   -
300   -- (void)refreshCollectionViewWithAddedAsset:(id)asset image:(UIImage *)image {
301   - [_selectedAssets addObject:asset];
302   - [_selectedPhotos addObject:image];
303   - [_collectionView reloadData];
304   -
305   - if (_selectedPhotos.count == 9) {
306   - _add = 0;
307   - } else {
308   - _add = 1;
309   - }
310   -
311   - [self updateHeight];
312   -
313   -}
314   -- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
315   - if ([picker isKindOfClass:[UIImagePickerController class]]) {
316   - [picker dismissViewControllerAnimated:YES completion:nil];
317   - }
318   -}
319   -
320   -#pragma mark - UIActionSheetDelegate
321   -
322   -- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
323   - if (buttonIndex == 0) { // take photo / 去拍照
324   - [self takePhoto];
325   - } else if (buttonIndex == 1) {
326   - [self pushTZImagePickerController];
327   - }
328   -}
329   -
330   -#pragma mark - UIAlertViewDelegate
331   -- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
332   - if (buttonIndex == 1) { // 去设置界面,开启相机访问权限
333   - if (iOS8Later) {
334   - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
335   - }
336   - }
337   -}
338   -
339   -#pragma mark - TZImagePickerControllerDelegate
340   -- (void)tz_imagePickerControllerDidCancel:(TZImagePickerController *)picker {
341   - // NSLog(@"cancel");
342   -}
343   -
344   -- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos {
345   - _selectedPhotos = [NSMutableArray arrayWithArray:photos];
346   - _selectedAssets = [NSMutableArray arrayWithArray:assets];
347   - _isSelectOriginalPhoto = isSelectOriginalPhoto;
348   -
349   - if (_selectedPhotos.count == 9) {
350   - _add = 0;
351   - } else {
352   - _add = 1;
353   - }
354   -
355   - [self updateHeight];
356   -
357   -}
358   -
359   -//更新自身高度
360   -- (void)updateHeight {
361   -
362   - NSInteger num = 0;
363   - if (_selectedAssets.count == 9) {
364   - num = 9;
365   - } else {
366   - num = _selectedAssets.count+1;
367   - }
368   -
369   - NSInteger integer = num/3;
370   - NSInteger remainder = num%3;
371   -
372   - if (remainder > 0) {
373   - integer += 1;
374   - }
375   -
376   - _collectionView.frame = CGRectMake(10, _colTop, KScreenWidth-20, _itemWH*integer + integer*_margin +10);
377   - [_collectionView reloadData];
378   -
379   - CGFloat h = _collectionView.height + integer*_margin + 60;
380   - [self mas_updateConstraints:^(MASConstraintMaker *make) {
381   - make.height.mas_equalTo(h);
382   - }];
383   -
384   - if (self.delegate && [self.delegate respondsToSelector:@selector(updateImages:)]) {
385   - [self.delegate updateImages:_selectedPhotos];
386   - }
387   -
388   -}
389   -
390   -
391   -// Decide album show or not't
392   -// 决定相册显示与否
393   -- (BOOL)isAlbumCanSelect:(NSString *)albumName result:(id)result {
394   - return YES;
395   -}
396   -
397   -// Decide asset show or not't
398   -// 决定asset显示与否
399   -- (BOOL)isAssetCanSelect:(id)asset {
400   - return YES;
401   -}
402   -
403   -#pragma mark -
404   -#pragma mark - Getter
405   -- (UILabel *)titleLab
406   -{
407   - if (!_titleLab) {
408   - _titleLab = [[UILabel alloc] init];
409   - _titleLab.font = [UIFont systemFontOfSize:15];
410   - _titleLab.text = @"上传照片";
411   - }
412   - return _titleLab;
413   -}
414   -
415   -- (UIImagePickerController *)imagePickerVc {
416   - if (_imagePickerVc == nil) {
417   - _imagePickerVc = [[UIImagePickerController alloc] init];
418   - _imagePickerVc.delegate = self;
419   - // set appearance / 改变相册选择页的导航栏外观
420   - if (iOS7Later) {
421   - _imagePickerVc.navigationBar.barTintColor = self.viewController.navigationController.navigationBar.barTintColor;
422   - }
423   - _imagePickerVc.navigationBar.tintColor = self.viewController.navigationController.navigationBar.tintColor;
424   - UIBarButtonItem *tzBarItem, *BarItem;
425   - if (iOS9Later) {
426   - tzBarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]];
427   - BarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UIImagePickerController class]]];
428   - } else {
429   - tzBarItem = [UIBarButtonItem appearanceWhenContainedIn:[TZImagePickerController class], nil];
430   - BarItem = [UIBarButtonItem appearanceWhenContainedIn:[UIImagePickerController class], nil];
431   - }
432   - NSDictionary *titleTextAttributes = [tzBarItem titleTextAttributesForState:UIControlStateNormal];
433   - [BarItem setTitleTextAttributes:titleTextAttributes forState:UIControlStateNormal];
434   -
435   - }
436   - return _imagePickerVc;
437   -}
438   -
439   -#pragma clang diagnostic pop
  85 +//- (void)deleteBtnClik:(UIButton *)sender {
  86 +// __weak typeof(self) weakSelf = self;
  87 +// [_selectedPhotos removeObjectAtIndex:sender.tag];
  88 +// [_selectedAssets removeObjectAtIndex:sender.tag];
  89 +// [_collectionView performBatchUpdates:^{
  90 +// NSIndexPath *indexPath = [NSIndexPath indexPathForItem:sender.tag inSection:0];
  91 +// [weakSelf.collectionView deleteItemsAtIndexPaths:@[indexPath]];
  92 +// } completion:^(BOOL finished) {
  93 +// weakSelf.add = 1;
  94 +// [weakSelf updateHeight];
  95 +// }];
  96 +//
  97 +//}
  98 +//
  99 +//#pragma mark - UICollectionViewdelegate
  100 +//
  101 +//- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
  102 +// return self.selectedPhotos.count + self.add;
  103 +//}
  104 +//- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
  105 +// TZTestCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TZTestCell" forIndexPath:indexPath];
  106 +// cell.videoImageView.hidden = YES;
  107 +// cell.gifLable.hidden = YES;
  108 +//
  109 +// if (indexPath.row == _selectedPhotos.count) {
  110 +// cell.imageView.image = [UIImage cnLive_getImageNameWithBundle:@"pj_tianjiazhaopian" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
  111 +// cell.deleteBtn.hidden = YES;
  112 +// } else {
  113 +// cell.imageView.image = _selectedPhotos[indexPath.row];
  114 +// cell.asset = _selectedAssets[indexPath.row];
  115 +// cell.deleteBtn.hidden = NO;
  116 +// }
  117 +//
  118 +// cell.deleteBtn.tag = indexPath.row;
  119 +// [cell.deleteBtn addTarget:self action:@selector(deleteBtnClik:) forControlEvents:UIControlEventTouchUpInside];
  120 +// return cell;
  121 +//}
  122 +//
  123 +//- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
  124 +// __weak typeof(self) weakSelf = self;
  125 +// if (indexPath.row == _selectedPhotos.count) {
  126 +//
  127 +// [self createAlertViewTitleArray:@[@"拍照",@"从相册选取"] textColor:KTextBlackColor font:UIFontMake(15) actionBlock:^(UIButton *button, NSInteger didRow) {
  128 +//
  129 +// switch (didRow) {
  130 +// case 0: {
  131 +// [self takePhoto];
  132 +// }
  133 +// break;
  134 +//
  135 +// case 1: {
  136 +// [self pushTZImagePickerController];
  137 +// }
  138 +// break;
  139 +//
  140 +// default:
  141 +// break;
  142 +// }
  143 +//
  144 +// }];
  145 +//
  146 +// } else { //预览照片
  147 +// CNImagePickerController *imagePickerVc = [[CNImagePickerController alloc] initWithSelectedAssets:_selectedAssets selectedPhotos:_selectedPhotos index:indexPath.row];
  148 +// [imagePickerVc configTZImagePicker];
  149 +// imagePickerVc.maxImagesCount = 9;
  150 +// imagePickerVc.allowPickingGif = NO;
  151 +// imagePickerVc.allowPickingOriginalPhoto = YES;
  152 +// imagePickerVc.allowPickingMultipleVideo = NO;
  153 +// imagePickerVc.isSelectOriginalPhoto = _isSelectOriginalPhoto;
  154 +// [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
  155 +// weakSelf.selectedPhotos = [NSMutableArray arrayWithArray:photos];
  156 +// weakSelf.selectedAssets = [NSMutableArray arrayWithArray:assets];
  157 +// weakSelf.isSelectOriginalPhoto = isSelectOriginalPhoto;
  158 +// [weakSelf.collectionView reloadData];
  159 +// weakSelf.collectionView.contentSize = CGSizeMake(0, ((weakSelf.selectedPhotos.count + 2) / 3 ) * (weakSelf.margin + weakSelf.itemWH));
  160 +// }];
  161 +// [self.viewController presentViewController:imagePickerVc animated:YES completion:nil];
  162 +//
  163 +// }
  164 +//}
  165 +//#pragma mark - LxGridViewDataSource
  166 +///// 以下三个方法为长按排序相关代码
  167 +//- (BOOL)collectionView:(UICollectionView *)collectionView canMoveItemAtIndexPath:(NSIndexPath *)indexPath {
  168 +// return indexPath.item < _selectedPhotos.count;
  169 +//}
  170 +//
  171 +//- (BOOL)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)sourceIndexPath canMoveToIndexPath:(NSIndexPath *)destinationIndexPath {
  172 +// return (sourceIndexPath.item < _selectedPhotos.count && destinationIndexPath.item < _selectedPhotos.count);
  173 +//}
  174 +//
  175 +//- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)sourceIndexPath didMoveToIndexPath:(NSIndexPath *)destinationIndexPath {
  176 +// UIImage *image = _selectedPhotos[sourceIndexPath.item];
  177 +// [_selectedPhotos removeObjectAtIndex:sourceIndexPath.item];
  178 +// [_selectedPhotos insertObject:image atIndex:destinationIndexPath.item];
  179 +//
  180 +// id asset = _selectedAssets[sourceIndexPath.item];
  181 +// [_selectedAssets removeObjectAtIndex:sourceIndexPath.item];
  182 +// [_selectedAssets insertObject:asset atIndex:destinationIndexPath.item];
  183 +//
  184 +// [_collectionView reloadData];
  185 +//
  186 +// if (self.delegate && [self.delegate respondsToSelector:@selector(updateImages:)]) {
  187 +// [self.delegate updateImages:_selectedAssets];
  188 +// }
  189 +//}
  190 +//
  191 +//#pragma mark - UIImagePickerController
  192 +//- (void)takePhoto {
  193 +// AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
  194 +// if ((authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied) && iOS7Later) {
  195 +// // 无相机权限 做一个友好的提示
  196 +// if (iOS8Later) {
  197 +// UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"无法使用相机" message:@"请在iPhone的“设置-隐私-相机“中允许访问相机" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:nil, nil];//设置
  198 +//
  199 +// [alert show];
  200 +// }
  201 +// } else if (authStatus == AVAuthorizationStatusNotDetermined) {
  202 +// // fix issue 466, 防止用户首次拍照拒绝授权时相机页黑屏
  203 +// if (iOS7Later) {
  204 +// [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {
  205 +// if (granted) {
  206 +// dispatch_sync(dispatch_get_main_queue(), ^{
  207 +// [self takePhoto];
  208 +// });
  209 +// }
  210 +// }];
  211 +// } else {
  212 +// [self takePhoto];
  213 +// }
  214 +// // 拍照之前还需要检查相册权限
  215 +// } else if ([TZImageManager authorizationStatus] == 2) { // 已被拒绝,没有相册权限,将无法保存拍的照片
  216 +// if (iOS8Later) {
  217 +// UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"无法访问相册" message:@"请在iPhone的“设置-隐私-相册“中允许访问相册" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:nil, nil];//设置
  218 +// [alert show];
  219 +// }
  220 +// } else if ([TZImageManager authorizationStatus] == 0) { // 未请求过相册权限
  221 +// [[TZImageManager manager] requestAuthorizationWithCompletion:^{
  222 +// [self takePhoto];
  223 +// }];
  224 +// } else {
  225 +// [self pushImagePickerController];
  226 +// }
  227 +//}
  228 +//// 调用相机
  229 +//- (void)pushImagePickerController {
  230 +// UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera;
  231 +// if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) {
  232 +// self.imagePickerVc.sourceType = sourceType;
  233 +// if(iOS8Later) {
  234 +// _imagePickerVc.modalPresentationStyle = UIModalPresentationOverCurrentContext;
  235 +// }
  236 +// [self.viewController presentViewController:_imagePickerVc animated:YES completion:nil];
  237 +// } else {
  238 +// NSLog(@"模拟器中无法打开照相机,请在真机中使用");
  239 +// }
  240 +//}
  241 +//#pragma mark - TZImagePickerController
  242 +////- (void)pushTZImagePickerController {
  243 +//// CNImagePickerController *imagePickerVc = [[CNImagePickerController alloc]initWithMaxImagesCount:9 columnNumber:4 delegate:self pushPhotoPickerVc:YES];
  244 +//// [imagePickerVc configTZImagePicker];//配置
  245 +////#pragma mark - 五类个性化设置,这些参数都可以不传,此时会走默认设置
  246 +//// imagePickerVc.isSelectOriginalPhoto = _isSelectOriginalPhoto;
  247 +////
  248 +//// imagePickerVc.selectedAssets = _selectedAssets; //目前已经选中的图片数组
  249 +//// imagePickerVc.allowTakePicture = NO; //在内部显示拍照按钮
  250 +//// imagePickerVc.allowPickingVideo = NO; //是否允许选择视频
  251 +//// imagePickerVc.allowPickingImage = YES; //是否允许选择图片
  252 +//// imagePickerVc.allowPickingOriginalPhoto = YES; //选择原图
  253 +//// imagePickerVc.allowPickingGif = NO; //选择Gif
  254 +//// imagePickerVc.allowPickingMultipleVideo = NO; // 是否可以多选视频
  255 +//// imagePickerVc.sortAscendingByModificationDate = YES;//排序
  256 +//// imagePickerVc.showSelectBtn = NO;
  257 +//// imagePickerVc.allowCrop = NO; //是否允许裁剪
  258 +//// imagePickerVc.needCircleCrop = NO; //是否使用圆形裁剪
  259 +////
  260 +//// // 你可以通过block或者代理,来得到用户选择的照片.
  261 +//// [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
  262 +////
  263 +//// }];
  264 +//// [self.viewController presentViewController:imagePickerVc animated:YES completion:nil];
  265 +////}
  266 +//- (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
  267 +// [picker dismissViewControllerAnimated:YES completion:nil];
  268 +// NSString *type = [info objectForKey:UIImagePickerControllerMediaType];
  269 +// if ([type isEqualToString:@"public.image"]) {
  270 +// TZImagePickerController *tzImagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:1 delegate:self];
  271 +// tzImagePickerVc.modalPresentationStyle = UIModalPresentationFullScreen;
  272 +// tzImagePickerVc.sortAscendingByModificationDate = YES;
  273 +// [tzImagePickerVc showProgressHUD];
  274 +// UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
  275 +//
  276 +// // save photo and get asset / 保存图片,获取到asset
  277 +// [[TZImageManager manager] savePhotoWithImage:image location:nil completion:^(NSError *error){
  278 +// [tzImagePickerVc hideProgressHUD];
  279 +// if (error) {
  280 +// [tzImagePickerVc hideProgressHUD];
  281 +// NSLog(@"图片保存失败 %@",error);
  282 +// } else {
  283 +// [[TZImageManager manager] getCameraRollAlbum:NO allowPickingImage:YES needFetchAssets:YES completion:^(TZAlbumModel *model) {
  284 +// [[TZImageManager manager] getAssetsFromFetchResult:model.result allowPickingVideo:NO allowPickingImage:YES completion:^(NSArray<TZAssetModel *> *models) {
  285 +// [tzImagePickerVc hideProgressHUD];
  286 +// TZAssetModel *assetModel = [models firstObject];
  287 +// if (tzImagePickerVc.sortAscendingByModificationDate) {
  288 +// assetModel = [models lastObject];
  289 +// }
  290 +//
  291 +// [self refreshCollectionViewWithAddedAsset:assetModel.asset image:image];
  292 +//
  293 +// }];
  294 +// }];
  295 +// }
  296 +// }];
  297 +// }
  298 +//}
  299 +//
  300 +//- (void)refreshCollectionViewWithAddedAsset:(id)asset image:(UIImage *)image {
  301 +// [_selectedAssets addObject:asset];
  302 +// [_selectedPhotos addObject:image];
  303 +// [_collectionView reloadData];
  304 +//
  305 +// if (_selectedPhotos.count == 9) {
  306 +// _add = 0;
  307 +// } else {
  308 +// _add = 1;
  309 +// }
  310 +//
  311 +// [self updateHeight];
  312 +//
  313 +//}
  314 +//- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
  315 +// if ([picker isKindOfClass:[UIImagePickerController class]]) {
  316 +// [picker dismissViewControllerAnimated:YES completion:nil];
  317 +// }
  318 +//}
  319 +//
  320 +//#pragma mark - UIActionSheetDelegate
  321 +//
  322 +//- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
  323 +// if (buttonIndex == 0) { // take photo / 去拍照
  324 +// [self takePhoto];
  325 +// } else if (buttonIndex == 1) {
  326 +// [self pushTZImagePickerController];
  327 +// }
  328 +//}
  329 +//
  330 +//#pragma mark - UIAlertViewDelegate
  331 +//- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
  332 +// if (buttonIndex == 1) { // 去设置界面,开启相机访问权限
  333 +// if (iOS8Later) {
  334 +// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
  335 +// }
  336 +// }
  337 +//}
  338 +//
  339 +//#pragma mark - TZImagePickerControllerDelegate
  340 +//- (void)tz_imagePickerControllerDidCancel:(TZImagePickerController *)picker {
  341 +// // NSLog(@"cancel");
  342 +//}
  343 +//
  344 +//- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos {
  345 +// _selectedPhotos = [NSMutableArray arrayWithArray:photos];
  346 +// _selectedAssets = [NSMutableArray arrayWithArray:assets];
  347 +// _isSelectOriginalPhoto = isSelectOriginalPhoto;
  348 +//
  349 +// if (_selectedPhotos.count == 9) {
  350 +// _add = 0;
  351 +// } else {
  352 +// _add = 1;
  353 +// }
  354 +//
  355 +// [self updateHeight];
  356 +//
  357 +//}
  358 +//
  359 +////更新自身高度
  360 +//- (void)updateHeight {
  361 +//
  362 +// NSInteger num = 0;
  363 +// if (_selectedAssets.count == 9) {
  364 +// num = 9;
  365 +// } else {
  366 +// num = _selectedAssets.count+1;
  367 +// }
  368 +//
  369 +// NSInteger integer = num/3;
  370 +// NSInteger remainder = num%3;
  371 +//
  372 +// if (remainder > 0) {
  373 +// integer += 1;
  374 +// }
  375 +//
  376 +// _collectionView.frame = CGRectMake(10, _colTop, KScreenWidth-20, _itemWH*integer + integer*_margin +10);
  377 +// [_collectionView reloadData];
  378 +//
  379 +// CGFloat h = _collectionView.height + integer*_margin + 60;
  380 +// [self mas_updateConstraints:^(MASConstraintMaker *make) {
  381 +// make.height.mas_equalTo(h);
  382 +// }];
  383 +//
  384 +// if (self.delegate && [self.delegate respondsToSelector:@selector(updateImages:)]) {
  385 +// [self.delegate updateImages:_selectedPhotos];
  386 +// }
  387 +//
  388 +//}
  389 +//
  390 +//
  391 +//// Decide album show or not't
  392 +//// 决定相册显示与否
  393 +//- (BOOL)isAlbumCanSelect:(NSString *)albumName result:(id)result {
  394 +// return YES;
  395 +//}
  396 +//
  397 +//// Decide asset show or not't
  398 +//// 决定asset显示与否
  399 +//- (BOOL)isAssetCanSelect:(id)asset {
  400 +// return YES;
  401 +//}
  402 +//
  403 +//#pragma mark -
  404 +//#pragma mark - Getter
  405 +//- (UILabel *)titleLab
  406 +//{
  407 +// if (!_titleLab) {
  408 +// _titleLab = [[UILabel alloc] init];
  409 +// _titleLab.font = [UIFont systemFontOfSize:15];
  410 +// _titleLab.text = @"上传照片";
  411 +// }
  412 +// return _titleLab;
  413 +//}
  414 +//
  415 +//- (UIImagePickerController *)imagePickerVc {
  416 +// if (_imagePickerVc == nil) {
  417 +// _imagePickerVc = [[UIImagePickerController alloc] init];
  418 +// _imagePickerVc.delegate = self;
  419 +// // set appearance / 改变相册选择页的导航栏外观
  420 +// if (iOS7Later) {
  421 +// _imagePickerVc.navigationBar.barTintColor = self.viewController.navigationController.navigationBar.barTintColor;
  422 +// }
  423 +// _imagePickerVc.navigationBar.tintColor = self.viewController.navigationController.navigationBar.tintColor;
  424 +// UIBarButtonItem *tzBarItem, *BarItem;
  425 +// if (iOS9Later) {
  426 +// tzBarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]];
  427 +// BarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UIImagePickerController class]]];
  428 +// } else {
  429 +// tzBarItem = [UIBarButtonItem appearanceWhenContainedIn:[TZImagePickerController class], nil];
  430 +// BarItem = [UIBarButtonItem appearanceWhenContainedIn:[UIImagePickerController class], nil];
  431 +// }
  432 +// NSDictionary *titleTextAttributes = [tzBarItem titleTextAttributesForState:UIControlStateNormal];
  433 +// [BarItem setTitleTextAttributes:titleTextAttributes forState:UIControlStateNormal];
  434 +//
  435 +// }
  436 +// return _imagePickerVc;
  437 +//}
  438 +//
  439 +//#pragma clang diagnostic pop
440 440  
441 441  
442 442  
... ...
CNLiveMyOrderModule/Classes/ViewModel/CNLiveOrderEventHandle.h
... ... @@ -6,8 +6,8 @@
6 6 //
7 7  
8 8 #import <Foundation/Foundation.h>
9   -#import "CNLiveOrderList.h"
10   -#import "CNLiveAdminAddressModel.h"
  9 +@class CNLiveOrderList;
  10 +@class CNLiveAdminAddressModel;
11 11 NS_ASSUME_NONNULL_BEGIN
12 12 typedef void(^PayBlock)(int code);
13 13 @interface CNLiveOrderEventHandle : NSObject
... ... @@ -71,66 +71,6 @@ typedef void(^PayBlock)(int code);
71 71 /**
72 72 * 去支付
73 73 */
74   -+ (void)pay:(CNLiveOrderList *)orderList payBlock:(PayBlock)block;/**
75   -* 提交订单
76   -*/
77   -+ (void)submitOrder:(CNLiveOrderList *)orderList address:(CNLiveAdminAddressModel *)model superView:(UIView *)view complete:(void(^)(BOOL ret))complete;
78   -/**
79   - * 删除订单
80   - */
81   -+ (void)deleteOrder:(CNLiveOrderList *)orderList itemId:(NSString *)itemId superView:(UIView *)view complete:(void(^)(BOOL ret))complete;
82   -/**
83   - * 催单
84   - */
85   -+ (void)reminderOrder:(CNLiveOrderList *)orderList superView:(UIView *)view complete:(void(^)(NSString *msg))complete;
86   -/**
87   - * 联系达人
88   - */
89   -+ (void)contactUser:(CNLiveOrderList *)orderList pop:(BOOL)pop jumpBlock:(void(^)(BOOL isPop))jumpBlock;
90   -/**
91   - * 退款详情
92   - */
93   -+ (void)refundDetail:(CNLiveOrderList *)orderList jumpBlock:(void(^)(NSString *orderId))jumpBlock;
94   -/**
95   - * 订单详情
96   - */
97   -+ (void)orderDetail:(CNLiveOrderList *)orderList orderBlock:(void (^)(NSString *orderId))orderBlock;
98   -/**
99   - * 订单详情
100   - */
101   -// + (void)orderDetailByOrderId:(NSString *)orderId;
102   -/**
103   - * 申请退款
104   - */
105   -+ (void)applyForRefund:(CNLiveOrderList *)orderList jumpBlock:(void (^)(CNLiveOrderList *orderList))jumpBlock;
106   -/**
107   - * 确认收货
108   - */
109   -+ (void)confirmRecv:(CNLiveOrderList *)orderList itemId:(NSString *)itemId superView:(UIView *)view complete:(void(^)(BOOL ret))complete;
110   -/**
111   - * 取消订单
112   - */
113   -+ (void)cancelOrder:(CNLiveOrderList *)orderList superView:(UIView *)view complete:(void(^)(BOOL ret))complete;
114   -/**
115   - * 订单有误
116   - */
117   -+ (void)orderError:(CNLiveOrderList *)orderList superView:(UIView *)view complete:(void(^)(BOOL ret))complete;
118   -/**
119   - * 确认订单
120   - */
121   -+ (void)confirmOrder:(CNLiveOrderList *)orderList superView:(UIView *)view complete:(void(^)(BOOL ret))complete;
122   -/**
123   - * 评价订单
124   - */
125   -+ (void)evaluateOrder:(CNLiveOrderList *)orderList jumpBlock:(void (^)(CNLiveOrderList *orderList))jumpBlock;
126   -/**
127   - * 达人主页
128   - */
129   -+ (void)darenHome:(CNLiveOrderList *)orderList jumpBlock:(void (^)(NSString *userId))jumpBlock;
130   -
131   -/**
132   - * 去支付
133   - */
134 74 + (void)pay:(CNLiveOrderList *)orderList payBlock:(PayBlock)block;
135 75 @end
136 76  
... ...
CNLiveMyOrderModule/Classes/ViewModel/CNLiveOrderEventHandle.m
... ... @@ -13,6 +13,8 @@
13 13 #import <CNLiveRequestBastKit/CNLiveNetworking.h>
14 14 #import "CNLiveEnvironment.h"
15 15 #import "CNUserInfoManager.h"
  16 +#import "CNLiveOrderList.h"
  17 +#import "CNLiveAdminAddressModel.h"
16 18 @implementation CNLiveOrderEventHandle
17 19 #pragma mark -提交订单
18 20 + (void)submitOrder:(CNLiveOrderList *)orderList address:(DSAddressModel *)model superView:(UIView *)view complete:(void (^)(BOOL))complete {
... ...
Example/CNLiveMyOrderModule.xcodeproj/project.pbxproj
... ... @@ -207,8 +207,7 @@
207 207 6003F586195388D20070C39A /* Sources */,
208 208 6003F587195388D20070C39A /* Frameworks */,
209 209 6003F588195388D20070C39A /* Resources */,
210   - B3C4AEE6B682DFE3670D8608 /* [CP] Embed Pods Frameworks */,
211   - F110CD7F28D0CF6F4889A2A2 /* [CP] Copy Pods Resources */,
  210 + 845F81D6903EC723010F3D5B /* [CP] Embed Pods Frameworks */,
212 211 );
213 212 buildRules = (
214 213 );
... ... @@ -321,7 +320,7 @@
321 320 shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
322 321 showEnvVarsInLog = 0;
323 322 };
324   - B3C4AEE6B682DFE3670D8608 /* [CP] Embed Pods Frameworks */ = {
  323 + 845F81D6903EC723010F3D5B /* [CP] Embed Pods Frameworks */ = {
325 324 isa = PBXShellScriptBuildPhase;
326 325 buildActionMask = 2147483647;
327 326 files = (
... ... @@ -330,91 +329,43 @@
330 329 "${PODS_ROOT}/Target Support Files/Pods-CNLiveMyOrderModule_Example/Pods-CNLiveMyOrderModule_Example-frameworks.sh",
331 330 "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
332 331 "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework",
333   - "${BUILT_PRODUCTS_DIR}/CNLiveBaseTools/CNLiveBaseTools.framework",
334 332 "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework",
335   - "${BUILT_PRODUCTS_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework",
336   - "${BUILT_PRODUCTS_DIR}/CNLiveCacheManagerKit/CNLiveCacheManagerKit.framework",
337 333 "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework",
338 334 "${BUILT_PRODUCTS_DIR}/CNLiveCommonClass/CNLiveCommonClass.framework",
339 335 "${BUILT_PRODUCTS_DIR}/CNLiveCustomUI/CNLiveCustomUI.framework",
340 336 "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework",
341   - "${BUILT_PRODUCTS_DIR}/CNLiveImagePickerController/CNLiveImagePickerController.framework",
342 337 "${BUILT_PRODUCTS_DIR}/CNLiveMyOrderModule/CNLiveMyOrderModule.framework",
343 338 "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework",
344 339 "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework",
345   - "${BUILT_PRODUCTS_DIR}/CNLiveUploadManager/CNLiveUploadManager.framework",
346 340 "${BUILT_PRODUCTS_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework",
347   - "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
348   - "${BUILT_PRODUCTS_DIR}/GPUImage/GPUImage.framework",
349   - "${BUILT_PRODUCTS_DIR}/HappyDNS/HappyDNS.framework",
350 341 "${BUILT_PRODUCTS_DIR}/JXCategoryView/JXCategoryView.framework",
351   - "${BUILT_PRODUCTS_DIR}/Ks3SDK/Ks3SDK.framework",
352   - "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework",
353 342 "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework",
354 343 "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework",
355 344 "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",
356   - "${BUILT_PRODUCTS_DIR}/PGDatePicker/PGDatePicker.framework",
357   - "${BUILT_PRODUCTS_DIR}/PGPickerView/PGPickerView.framework",
358   - "${PODS_ROOT}/PLPlayerKit/Pod/Library/PLPlayerKit.framework",
359 345 "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework",
360   - "${BUILT_PRODUCTS_DIR}/Qiniu/Qiniu.framework",
361   - "${BUILT_PRODUCTS_DIR}/RSKImageCropper/RSKImageCropper.framework",
362   - "${BUILT_PRODUCTS_DIR}/SAMKeychain/SAMKeychain.framework",
363   - "${BUILT_PRODUCTS_DIR}/SDAutoLayout/SDAutoLayout.framework",
364   - "${BUILT_PRODUCTS_DIR}/SDCycleScrollView/SDCycleScrollView.framework",
365 346 "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
366   - "${BUILT_PRODUCTS_DIR}/SGPagingView/SGPagingView.framework",
367   - "${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework",
368   - "${PODS_ROOT}/TXIMSDK_iOS/ImSDK.framework",
369   - "${BUILT_PRODUCTS_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework",
370 347 "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework",
371   - "${BUILT_PRODUCTS_DIR}/libksygpulive_ks3/libksygpulive.framework",
372   - "${BUILT_PRODUCTS_DIR}/lottie-ios/Lottie.framework",
373 348 );
374 349 name = "[CP] Embed Pods Frameworks";
375 350 outputPaths = (
376 351 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
377 352 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework",
378   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseTools.framework",
379 353 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework",
380   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessTools.framework",
381   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCacheManagerKit.framework",
382 354 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework",
383 355 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonClass.framework",
384 356 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomUI.framework",
385 357 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework",
386   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveImagePickerController.framework",
387 358 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveMyOrderModule.framework",
388 359 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework",
389 360 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework",
390   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUploadManager.framework",
391 361 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserManagement.framework",
392   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
393   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GPUImage.framework",
394   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HappyDNS.framework",
395 362 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JXCategoryView.framework",
396   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Ks3SDK.framework",
397   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework",
398 363 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework",
399 364 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework",
400 365 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework",
401   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PGDatePicker.framework",
402   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PGPickerView.framework",
403   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PLPlayerKit.framework",
404 366 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework",
405   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Qiniu.framework",
406   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RSKImageCropper.framework",
407   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SAMKeychain.framework",
408   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDAutoLayout.framework",
409   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDCycleScrollView.framework",
410 367 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
411   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SGPagingView.framework",
412   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework",
413   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ImSDK.framework",
414   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebViewJavascriptBridge.framework",
415 368 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework",
416   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libksygpulive.framework",
417   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Lottie.framework",
418 369 );
419 370 runOnlyForDeploymentPostprocessing = 0;
420 371 shellPath = /bin/sh;
... ... @@ -443,26 +394,6 @@
443 394 shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
444 395 showEnvVarsInLog = 0;
445 396 };
446   - F110CD7F28D0CF6F4889A2A2 /* [CP] Copy Pods Resources */ = {
447   - isa = PBXShellScriptBuildPhase;
448   - buildActionMask = 2147483647;
449   - files = (
450   - );
451   - inputPaths = (
452   - "${PODS_ROOT}/Target Support Files/Pods-CNLiveMyOrderModule_Example/Pods-CNLiveMyOrderModule_Example-resources.sh",
453   - "${PODS_ROOT}/BaiduMapKit/BaiduMapKit/BaiduMapAPI_Map.framework/mapapi.bundle",
454   - "${PODS_ROOT}/Weibo_SDK/libWeiboSDK/WeiboSDK.bundle",
455   - );
456   - name = "[CP] Copy Pods Resources";
457   - outputPaths = (
458   - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/mapapi.bundle",
459   - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WeiboSDK.bundle",
460   - );
461   - runOnlyForDeploymentPostprocessing = 0;
462   - shellPath = /bin/sh;
463   - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveMyOrderModule_Example/Pods-CNLiveMyOrderModule_Example-resources.sh\"\n";
464   - showEnvVarsInLog = 0;
465   - };
466 397 /* End PBXShellScriptBuildPhase section */
467 398  
468 399 /* Begin PBXSourcesBuildPhase section */
... ...
Example/Podfile
... ... @@ -5,14 +5,14 @@ platform :ios, &#39;9.0&#39;
5 5  
6 6 target 'CNLiveMyOrderModule_Example' do
7 7 pod 'CNLiveMyOrderModule', :path => '../'
8   - pod 'JXCategoryView'
9   - pod 'CNLiveCommonClass'
10   - pod 'CNLiveCommonCategory'
11   - pod 'CNLiveBaseKit'
12   - pod 'CNLiveTripartiteManagement/Masonry'
13   - pod 'CNLiveUserManagement'
14   - pod 'CNLiveEnvironment'
15   - pod 'CNLiveRequestBastKit'
  8 +# pod 'JXCategoryView'
  9 +# pod 'CNLiveCommonClass'
  10 +# pod 'CNLiveCommonCategory'
  11 +# pod 'CNLiveBaseKit'
  12 +# pod 'CNLiveTripartiteManagement/Masonry'
  13 +# pod 'CNLiveUserManagement'
  14 +# pod 'CNLiveEnvironment'
  15 +# pod 'CNLiveRequestBastKit'
16 16 pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
17 17 end
18 18 target 'CNLiveMyOrderModule_Tests' do
... ...
README.md
1 1 # CNLiveMyOrderModule
2   -
  2 +本地验证
  3 +pod lib lint --sources=http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git,https://github.com/CocoaPods/Specs.git --allow-warnings --use-libraries
  4 +远端验证
  5 +pod spec lint --sources=http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git,https://github.com/CocoaPods/Specs.git --allow-warnings --use-libraries
  6 +远程推送
  7 +pod repo push CNLiveRepos CNLiveMyOrderModule.podspec --allow-warnings --use-libraries
3 8 [![CI Status](https://img.shields.io/travis/殷巧娟/CNLiveMyOrderModule.svg?style=flat)](https://travis-ci.org/殷巧娟/CNLiveMyOrderModule)
4 9 [![Version](https://img.shields.io/cocoapods/v/CNLiveMyOrderModule.svg?style=flat)](https://cocoapods.org/pods/CNLiveMyOrderModule)
5 10 [![License](https://img.shields.io/cocoapods/l/CNLiveMyOrderModule.svg?style=flat)](https://cocoapods.org/pods/CNLiveMyOrderModule)
... ...