Commit 6a1ef4a6c0a258c8cd484a213971572137eb4355

Authored by yinqiaojuan
1 parent 71c3e8eb

0.0.1

Showing 26 changed files with 801 additions and 153 deletions
CNLiveMyOrderModule.podspec
... ... @@ -56,13 +56,10 @@ TODO: Add long description of the pod here.
56 56 service.source_files = 'CNLiveMyOrderModule/Classes/Service/*.{h,m}'
57 57 service.dependency 'CNLiveMyOrderModule/Controller'
58 58 end
59   - s.subspec 'Address' do |address|
60   - address.source_files = 'CNLiveMyOrderModule/Classes/Address/*.{h,m}'
61   - end
62 59 s.dependency 'CNLiveBeeHive'
63 60 s.dependency 'CNLiveServices'
64 61 #基础库
65   - s.dependency 'CNLiveCommonClass'
  62 + #s.dependency 'CNLiveCommonClass'
66 63 s.dependency 'CNLiveBaseKit'
67 64 s.dependency 'CNLiveCommonCategory'
68 65 s.dependency 'CNLiveCustomUI'
... ... @@ -84,8 +81,14 @@ TODO: Add long description of the pod here.
84 81 s.dependency 'CNLiveTripartiteManagement/SDWebImage'
85 82 s.dependency 'CNLiveTripartiteManagement/MJRefresh'
86 83 s.dependency 'JXCategoryView'
  84 + #电商库
87 85 s.dependency 'DSCnliveShopSDK'
88 86 s.dependency 'CNLiveManager'
  87 + s.dependency 'CNLiveQrCodeModule'
  88 + #业务基础库
  89 + #s.dependency 'CNLiveBusinessBaseModule'
  90 + #s.dependency 'CNLiveCategory'
  91 + #如果依赖组件报找不到文件加上这个
89 92 s.user_target_xcconfig = { 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES'
90 93 }
91 94 s.resource_bundles = {
... ... @@ -94,6 +97,5 @@ TODO: Add long description of the pod here.
94 97  
95 98 # s.public_header_files = 'Pod/Classes/**/*.h'
96 99 s.frameworks = 'UIKit', 'Foundation'
97   - # s.dependency 'AFNetworking', '~> 2.3'
98 100 s.static_framework = true
99 101 end
... ...
CNLiveMyOrderModule/Assets/CNLiveMyOrderModule.bundle/touxiang2@2x.png

4.4 KB | W: | H:

9.25 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
CNLiveMyOrderModule/Assets/CNLiveMyOrderModule.bundle/touxiang2@3x.png

9.71 KB | W: | H:

19.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
CNLiveMyOrderModule/Assets/CNLiveMyOrderModule.bundle/touxiang@2x.png 0 → 100644

14.4 KB

CNLiveMyOrderModule/Assets/CNLiveMyOrderModule.bundle/touxiang@3x.png 0 → 100644

31 KB

CNLiveMyOrderModule/Classes/Address/CNLiveAddressController.m deleted 100644 → 0
1   -//
2   -// CNLiveAddressController.m
3   -// CNLiveMyOrderModule
4   -//
5   -// Created by 殷巧娟 on 2019/12/5.
6   -//
7   -
8   -#import "CNLiveAddressController.h"
9   -#import <DSCnliveShopSDK/DSAddressViewController.h>//收货地址
10   -@interface CNLiveAddressController ()
11   -
12   -@end
13   -
14   -@implementation CNLiveAddressController
15   -
16   -- (void)viewDidLoad {
17   - [super viewDidLoad];
18   -
19   -}
20   -
21   -
22   -
23   -@end
CNLiveMyOrderModule/Classes/Controller/CNLiveApplyRefundController.m
... ... @@ -14,11 +14,26 @@
14 14 #import "CNLiveBaseKit.h"
15 15 #import "CNLiveOrderList.h"
16 16 #import "UIColor+CNLiveExtension.h"
17   -@interface CNLiveApplyRefundController ()<UIGestureRecognizerDelegate,UITableViewDelegate,UITableViewDataSource>
18   -@property (nonatomic, strong) NSArray *images;
19   -@property (nonatomic, strong) CNLiveOrderListOrderItem *orderItem;
20   -@property (nonatomic, strong) UITableView *tableView;
21   -@property (nonatomic, assign) CGFloat height; //最后一个分组的高度
  17 +#import "Masonry.h"
  18 +#import "UIImage+CNLiveAdd.h"
  19 +#import "HUDHelper.h"
  20 +#import "CNLiveNetworking.h"
  21 +#import "CNUserInfoManager.h"
  22 +#import "CNLiveEnvironment.h"
  23 +#import "AFNetworking.h"
  24 +#import "CNLiveOrderHeader.h"
  25 +@interface CNLiveApplyRefundController ()<UIGestureRecognizerDelegate,UITableViewDelegate,UITableViewDataSource,CNLiveUploadVoucherHeightDelegate>
  26 +@property (nonatomic, strong) NSArray *images;
  27 +@property (nonatomic, strong) CNLiveOrderListOrderItem *orderItem;
  28 +@property (nonatomic, strong) UITableView *tableView;
  29 +@property (nonatomic, assign) CGFloat height; //最后一个分组的高度
  30 +@property (nonatomic, strong) UIButton *submitBtn; //提交按钮
  31 +@property (nonatomic, strong) UIView *footerView; //tableView的footerView
  32 +@property (nonatomic, copy) NSString *reasonStr; //退款原因
  33 +@property (nonatomic, copy) NSString *refundAmount; //退款金额
  34 +@property (nonatomic, copy) NSString *refundInstruct; //退款说明
  35 +@property (nonatomic, assign) CGFloat totalPrice; //总价
  36 +@property (nonatomic, strong) NSArray *selectedPhotos; //选择图片
22 37 @end
23 38  
24 39 @implementation CNLiveApplyRefundController
... ... @@ -27,7 +42,107 @@
27 42 [super viewDidLoad];
28 43 self.title = @"申请退款";
29 44 [self.view addSubview:self.tableView];
30   - self.height = (KScreenWidth - 20 - 2*8 - 4)/3 - 8 + 60 + 55 +30;
  45 + self.view.userInteractionEnabled = YES;
  46 + self.tableView.tableFooterView = self.footerView;
  47 + self.tableView.tableFooterView.height = 75;
  48 + self.height = (KScreenWidth - 20 - 2*8 - 4)/3 - 8 + 55;
  49 +}
  50 +- (void)setList:(CNLiveOrderList *)list {
  51 + _list = list;
  52 + self.totalPrice = list.orderItem.totalPrice;
  53 +}
  54 +#pragma mark - 更新图片数量代理
  55 +- (void)updateSelectedPhotos:(NSArray *)selectedPhotos {
  56 + self.selectedPhotos = selectedPhotos;
  57 + CGFloat margin = 8;
  58 + CGFloat itemH = (KScreenWidth - 20 - 2*margin - 4)/3 - margin;
  59 + CGFloat collectionH = 0;
  60 + NSInteger column = 3; //列
  61 + NSInteger row = 0; //行
  62 + NSInteger isSelectPhoto = 0;
  63 + if (selectedPhotos.count > 0) {
  64 + if (selectedPhotos.count == 9) {
  65 + isSelectPhoto = 0;
  66 + }else {
  67 + isSelectPhoto = 1;
  68 + }
  69 + }else {
  70 + isSelectPhoto = 1;
  71 + }
  72 + if ((selectedPhotos.count + isSelectPhoto) %column <=0) {
  73 + row = (selectedPhotos.count + isSelectPhoto) /column;
  74 + }else {
  75 + row = (selectedPhotos.count + isSelectPhoto ) /column + 1;
  76 + }
  77 + collectionH = 2*margin + (row - 1) *8 + row*itemH + 55;
  78 + self.height = collectionH;
  79 + [self.tableView reloadData];
  80 +
  81 +}
  82 +#pragma mark - TargetAction
  83 +- (void)submitBtnAction {
  84 + if (CNLiveStringIsEmpty(self.reasonStr)) {
  85 + [[HUDHelper sharedInstance] tipMessage:@"退款原因不能为空"];
  86 + return;
  87 + }
  88 + if (CNLiveStringIsEmpty(self.refundAmount)) {
  89 + [[HUDHelper sharedInstance]tipMessage:@"退款金额不能为空"];
  90 + return;
  91 + }
  92 + if ([self.refundAmount floatValue] <= 0) {
  93 + [[HUDHelper sharedInstance]tipMessage:@"退款金额要大于0"];
  94 + return;
  95 + }
  96 + NSNumber *totalPriceNumber = [NSNumber numberWithFloat:self.totalPrice];
  97 + NSNumber *refundPriceNumber = [NSNumber numberWithFloat:[self.refundAmount floatValue]];
  98 + if ([refundPriceNumber compare:totalPriceNumber] == NSOrderedDescending) {
  99 + [[HUDHelper sharedInstance]tipMessage:@"退款金额不能大于总金额"];
  100 + return;
  101 + }
  102 + if (![CNLiveNetworking isNetworking]) {
  103 + [[HUDHelper sharedInstance]tipMessage:@"网络已断开"];
  104 + return;
  105 + }
  106 + NSDictionary *param = @{
  107 + @"sid":@"10511059",
  108 + @"appId":AppId,
  109 + @"orderId":self.list.orderItem.orderId,
  110 + @"note":CNLiveStringIsEmpty(self.refundInstruct) ? @"":self.refundInstruct,
  111 + @"refundSum":CNLiveStringIsEmpty(self.refundAmount)? @"":self.refundAmount,
  112 + @"cause":CNLiveStringIsEmpty(self.reasonStr)?@"":self.reasonStr
  113 + };
  114 +
  115 + [CNLiveNetworking uploadNetworkWithURLString:CNApplyRefundUrl Param:param FormDataBlock:^(id<AFMultipartFormData> formData) {
  116 + [self.selectedPhotos enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
  117 + UIImage *image = (UIImage *)obj;
  118 + NSData *imageData = UIImageJPEGRepresentation(image, 0.5);
  119 + NSString *fileName = [NSString stringWithFormat:@"Image%d",(int)idx+1];
  120 + NSString *name = [NSString stringWithFormat:@"Image%d",(int)idx+1];
  121 + /*
  122 + *该方法的参数
  123 + 1. appendPartWithFileData:要上传的照片[二进制流]
  124 + 2. name:对应网站上[upload.php中]处理文件的字段(比如upload)
  125 + 3. fileName:要保存在服务器上的文件名
  126 + 4. mimeType:上传的文件的类型
  127 + */
  128 + [formData appendPartWithFileData:imageData name:name fileName:fileName mimeType:@"image/jpeg"];
  129 + }];
  130 + } ProgressBlock:^(NSProgress *progress) {
  131 +
  132 + } CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  133 + [QMUITips hideAllTipsInView:self.view];
  134 + if (!error) {
  135 + if ([responseObject[@"errorCode"] integerValue] == 0) {
  136 + [self.navigationController popViewControllerAnimated:YES];
  137 + [[NSNotificationCenter defaultCenter]postNotificationName:CNApplyRefundSuccessNotification object:nil];
  138 + }else {
  139 + [[HUDHelper sharedInstance]tipMessage:@"申请退款失败"];
  140 + }
  141 + }else {
  142 + [[HUDHelper sharedInstance]tipMessage:error.description];
  143 + }
  144 + }];
  145 +
31 146 }
32 147 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
33 148 return 4;
... ... @@ -45,6 +160,7 @@
45 160 return 0;
46 161 }
47 162 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  163 + __weak typeof(self) weakSelf = self;
48 164 static NSString *basicIdentifier = @"CNLiveRefundBasicCell";
49 165 static NSString *basicPriceIdentifier = @"CNLiveRefundBasicPriceCell";
50 166 static NSString *canOrNORefIdentifier = @"CNLiveCanOrNoRefundCell";
... ... @@ -62,15 +178,12 @@
62 178 return basicPriceCell;
63 179 }else {
64 180 NSArray *basicTitles = @[@"基本信息",@"",@"服务内容",@"服务费",@"运费",@"配送方式"];
65   - NSArray *detailArray = @[@"",@"",@"对战",@"0.00",@"0.00",@"自取"];
66 181 CNLiveRefundBasicCell *basicCell = [tableView dequeueReusableCellWithIdentifier:basicIdentifier];
67 182 if (!basicCell) {
68 183 basicCell = [[CNLiveRefundBasicCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:basicIdentifier indexPath:indexPath];
69 184 }
70 185 NSString *text = basicTitles[indexPath.row];
71   - NSString *detaielText = detailArray[indexPath.row];
72 186 basicCell.text = text;
73   - basicCell.detaielText = detaielText;
74 187 basicCell.list = self.list;
75 188 return basicCell;
76 189 }
... ... @@ -94,18 +207,29 @@
94 207 if (!reasonCell) {
95 208 reasonCell = [[CNLiveRefundReasonCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reasonIdentifier];
96 209 }
  210 + reasonCell.refundReasonBlock = ^(NSString * _Nonnull reasonStr) {
  211 + weakSelf.reasonStr = reasonStr;
  212 + };
97 213 return reasonCell;
98 214 }else if ((indexPath.row == 1) || (indexPath.row == 2)) {
99 215 CNLiveRefundInstructionsCell *instructionsCell = [tableView dequeueReusableCellWithIdentifier:instructionsIdentifier];
100 216 if (!instructionsCell) {
101 217 instructionsCell = [[CNLiveRefundInstructionsCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:instructionsIdentifier indexPath:indexPath];
102 218 }
  219 + instructionsCell.refundDetailsBlock = ^(NSString * _Nonnull refundText) {
  220 + if (indexPath.row == 1) {
  221 + weakSelf.refundAmount = refundText;
  222 + }else if (indexPath.row == 2){
  223 + weakSelf.refundInstruct = refundText;
  224 + }
  225 + };
103 226 return instructionsCell;
104 227 }else if (indexPath.row == 3){
105 228 CNLiveRefundCredentialCell *credentialCell = [tableView dequeueReusableCellWithIdentifier:credentialIdentifier];
106 229 if (!credentialCell) {
107 230 credentialCell = [[CNLiveRefundCredentialCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:credentialIdentifier];
108 231 }
  232 + credentialCell.delegate = self;
109 233 return credentialCell;
110 234 }
111 235 }
... ... @@ -154,9 +278,31 @@
154 278 _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, kNavigationBarHeight, KScreenWidth, KScreenHeight - kNavigationBarHeight) style:UITableViewStylePlain];
155 279 _tableView.delegate = self;
156 280 _tableView.dataSource = self;
  281 + _tableView.estimatedRowHeight = (KScreenWidth - 20 - 2*8 - 4)/3 - 8 + 55;
157 282 _tableView.userInteractionEnabled = YES;
  283 + _tableView.backgroundColor = CNLiveColorWithHexString(@"F5F5F8");
158 284 }
159 285 return _tableView;
160 286 }
  287 +- (UIButton *)submitBtn {
  288 + if (!_submitBtn) {
  289 + _submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  290 + _submitBtn.frame = CGRectMake(15, 10, KScreenWidth - 30, 55);
  291 + [_submitBtn setBackgroundImage:CNLiveUIImageWithColor(KYellowColor) forState:UIControlStateNormal];
  292 + [_submitBtn setBackgroundImage:CNLiveUIImageWithColor(KYellowHightColor) forState:UIControlStateHighlighted];
  293 + [_submitBtn setTitle:@"提交" forState:UIControlStateNormal];
  294 + _submitBtn.layer.cornerRadius = 3;
  295 + _submitBtn.layer.masksToBounds = YES;
  296 + [_submitBtn addTarget:self action:@selector(submitBtnAction) forControlEvents:UIControlEventTouchUpInside];
  297 + }
  298 + return _submitBtn;
  299 +}
  300 +- (UIView *)footerView {
  301 + if (!_footerView) {
  302 + _footerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 75)];
  303 + [_footerView addSubview:self.submitBtn];
  304 + }
  305 + return _footerView;
  306 +}
161 307  
162 308 @end
... ...
CNLiveMyOrderModule/Classes/Controller/CNLiveEvaluateController.m
... ... @@ -16,6 +16,7 @@
16 16 #import "CNLiveOrderHeader.h"
17 17 #import "CNLiveOrderViewModel.h"
18 18 #import "CNLiveOrderList.h"
  19 +#import "CNLiveOrderHeader.h"
19 20 @interface CNLiveEvaluateController ()<CNUploadVoucherDelegate,CNLiveEvaluateStarViewDelegate,UIGestureRecognizerDelegate,QMUITextViewDelegate,CNUploadVoucherDelegate>
20 21 @property (nonatomic, assign) int score;
21 22 @property (nonatomic, strong) NSArray *images;
... ...
CNLiveMyOrderModule/Classes/Address/CNLiveAddressController.h renamed to CNLiveMyOrderModule/Classes/Controller/CNLiveMyOrderDetaielController.h
1 1 //
2   -// CNLiveAddressController.h
  2 +// CNLiveMyOrderDetaielController.h
3 3 // CNLiveMyOrderModule
4 4 //
5   -// Created by 殷巧娟 on 2019/12/5.
  5 +// Created by 殷巧娟 on 2019/12/18.
6 6 //
7 7  
8 8 #import <CNLiveCommonClass/CNLiveCommonClass.h>
9   -
10 9 NS_ASSUME_NONNULL_BEGIN
11 10  
12   -@interface CNLiveAddressController : CNCommonViewController
13   -
  11 +@interface CNLiveMyOrderDetaielController : CNCommonViewController
  12 +@property (nonatomic, strong) NSString *orderId;
14 13 @end
15 14  
16 15 NS_ASSUME_NONNULL_END
... ...
CNLiveMyOrderModule/Classes/Controller/CNLiveMyOrderDetaielController.m 0 → 100644
  1 +//
  2 +// CNLiveMyOrderDetaielController.m
  3 +// CNLiveMyOrderModule
  4 +//
  5 +// Created by 殷巧娟 on 2019/12/18.
  6 +//
  7 +
  8 +#import "CNLiveMyOrderDetaielController.h"
  9 +#import "CNLiveRefundBasicCell.h"
  10 +#import "CNLiveOrderList.h"
  11 +#import "CNLiveBaseKit.h"
  12 +#import "UIColor+CNLiveExtension.h"
  13 +#import "Masonry.h"
  14 +@interface CNLiveMyOrderDetaielController ()<UITableViewDelegate,UITableViewDataSource>
  15 +@property (nonatomic, strong) UITableView *tableView;
  16 +@property (nonatomic, strong) CNLiveOrderList *orderList;
  17 +@end
  18 +
  19 +@implementation CNLiveMyOrderDetaielController
  20 +
  21 +- (void)viewDidLoad {
  22 + [super viewDidLoad];
  23 + [self.view addSubview:self.tableView];
  24 + self.title = @"订单详情";
  25 + [_tableView mas_makeConstraints:^(MASConstraintMaker *make) {
  26 + make.left.right.mas_equalTo(self.view);
  27 + make.top.mas_equalTo(kNavigationBarHeight);
  28 + make.height.mas_equalTo(KScreenHeight - kNavigationBarHeight);
  29 + }];
  30 +}
  31 +#pragma mark -tableViewDelegate
  32 +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  33 + return 7;
  34 +}
  35 +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  36 + if (section == 0) {
  37 + return 4;
  38 + }else if (section == 1) {
  39 + return 3;
  40 + }else if (section == 2){
  41 + return 1;
  42 + }else if (section == 3){
  43 + return 7;
  44 + }else if (section == 4) {
  45 + return 1;
  46 + }else if (section == 5) {
  47 + return 1;
  48 + }else if (section == 6){
  49 + return 4;
  50 + }
  51 + return 0.01;
  52 +}
  53 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  54 + NSArray *tradIngArr = @[@"交易状态:",@"订单编号:",@"收获时间:",@"实付金额:"];
  55 + NSArray *infoFormationArr = @[@"收货人:",@"联系电话:",@"收获地址:"];
  56 + NSArray *basicArr = @[@"",@"商品信息",@"",@"服务内容",@"服务费",@"运费",@"配送方式"];
  57 + NSArray *timeArray = @[@"创建时间:",@"确认时间:",@"支付时间:",@"发货时间:"];
  58 + static NSString *tradingIdentifier = @"CNliveOrdeTradingCell";
  59 +// static NSString *infoIdentifier = @"CNliveOrdeInformationCell";
  60 + static NSString *connectIdentifier = @"CNLiveOrderContactCell";
  61 + static NSString *personIdentifier = @"CNLiveOrderPersonCell";
  62 + static NSString *basicIdentifier = @"CNLiveRefundBasicCell";
  63 + static NSString *basicPriceIdentifier = @"CNLiveRefundBasicPriceCell";
  64 + static NSString *refundIdentifier = @"CNLiveCanOrNoRefundCell";
  65 + static NSString *goodsPriceIdentifier = @"CNLiveRefundGoodsPriceCell";
  66 + static NSString *timeIdentifier = @"CNLiveOrderTimeCell";
  67 + if (indexPath.section == 0 || indexPath.section == 1) {
  68 + CNliveOrdeInformationCell *tradingCell = [tableView dequeueReusableCellWithIdentifier:tradingIdentifier];
  69 + if (!tradingCell) {
  70 + tradingCell = [[CNliveOrdeInformationCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:tradingIdentifier indexPath:indexPath];
  71 + }
  72 + if (indexPath.section == 0) {
  73 + tradingCell.title = tradIngArr[indexPath.row];
  74 + }else if (indexPath.section == 1){
  75 + tradingCell.title = infoFormationArr[indexPath.row];
  76 + }
  77 + tradingCell.orderList = self.orderList;
  78 + return tradingCell;
  79 + }else if (indexPath.section == 2){
  80 + CNLiveOrderContactCell *connectCell = [tableView dequeueReusableCellWithIdentifier:connectIdentifier];
  81 + if (!connectCell) {
  82 + connectCell = [[CNLiveOrderContactCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:connectIdentifier];
  83 + }
  84 + connectCell.orderList = self.orderList;
  85 + return connectCell;
  86 + }else if (indexPath.section == 3){
  87 + if (indexPath.row == 0) {
  88 + CNLiveOrderPersonCell *personCell = [tableView dequeueReusableCellWithIdentifier:personIdentifier];
  89 + if (!personCell) {
  90 + personCell = [[CNLiveOrderPersonCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:personIdentifier];
  91 + }
  92 + personCell.orderList = self.orderList;
  93 + return personCell;
  94 + }else {
  95 + if (indexPath.row == 2) {
  96 + CNLiveRefundBasicPriceCell *basicPriceCell = [tableView dequeueReusableCellWithIdentifier:basicPriceIdentifier];
  97 + if (!basicPriceCell) {
  98 + basicPriceCell = [[CNLiveRefundBasicPriceCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:basicPriceIdentifier];
  99 + }
  100 + basicPriceCell.list = self.orderList;
  101 + return basicPriceCell;
  102 + }else {
  103 + CNLiveRefundBasicCell *basicCell = [tableView dequeueReusableCellWithIdentifier:basicIdentifier];
  104 + if (!basicCell) {
  105 + basicCell = [[CNLiveRefundBasicCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:basicIdentifier indexPath:indexPath];
  106 + }
  107 + basicCell.text = basicArr[indexPath.row];
  108 + basicCell.list = self.orderList;
  109 + return basicCell;
  110 + }
  111 + }
  112 + }else if (indexPath.section == 4){
  113 + CNLiveCanOrNoRefundCell *refundCell = [tableView dequeueReusableCellWithIdentifier:refundIdentifier];
  114 + if (!refundCell) {
  115 + refundCell = [[CNLiveCanOrNoRefundCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:refundIdentifier];
  116 + }
  117 + refundCell.list = self.orderList;
  118 + return refundCell;
  119 + }else if (indexPath.section == 5) {
  120 + CNLiveRefundGoodsPriceCell *goodsPriceCell = [tableView dequeueReusableCellWithIdentifier:goodsPriceIdentifier];
  121 + if (!goodsPriceCell) {
  122 + goodsPriceCell = [[CNLiveRefundGoodsPriceCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:goodsPriceIdentifier];
  123 + }
  124 + goodsPriceCell.list = self.orderList;
  125 + return goodsPriceCell;
  126 + }else if (indexPath.section == 6){
  127 + CNLiveOrderTimeCell *timeCell = [tableView dequeueReusableCellWithIdentifier:timeIdentifier];
  128 + if (!timeCell) {
  129 + timeCell = [[CNLiveOrderTimeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:timeIdentifier];
  130 + }
  131 + timeCell.title = timeArray[indexPath.row];
  132 + timeCell.orderList = self.orderList;
  133 + return timeCell;
  134 + }
  135 + return nil;
  136 +}
  137 +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  138 + if (indexPath.section == 0) {
  139 + return 40;
  140 + }else if (indexPath.section == 1) {
  141 + return 40;
  142 + }else if (indexPath.section == 2) {
  143 + return 60;
  144 + }else if (indexPath.section == 3) {
  145 + if (indexPath.row == 0) {
  146 + return 80;
  147 + }else if (indexPath.row == 2){
  148 + return 85;
  149 + }else {
  150 + return 45;
  151 + }
  152 + }else if (indexPath.section == 4){
  153 + return 50;
  154 + }else if (indexPath.section == 5){
  155 + return 125;
  156 + }else if (indexPath.section == 6){
  157 + return 25;
  158 + }
  159 + return 0.01;
  160 +}
  161 +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  162 + UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0,KScreenWidth , 10)];
  163 + view.backgroundColor = CNLiveColorWithHexString(@"F5F5F8");
  164 + return view;
  165 +}
  166 +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
  167 + if (section ==0 || section == 1) {
  168 + return 0.01;
  169 + }else {
  170 + return 10;
  171 + }
  172 +}
  173 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  174 +
  175 +}
  176 +#pragma mark - Lazy
  177 +- (UITableView *)tableView {
  178 + if (!_tableView) {
  179 + _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, kNavigationBarHeight, KScreenWidth, KScreenHeight - kNavigationBarHeight) style:UITableViewStylePlain];
  180 + _tableView.delegate = self;
  181 + _tableView.dataSource = self;
  182 + _tableView.estimatedRowHeight = 50;
  183 + _tableView.backgroundColor = CNLiveColorWithHexString(@"F5F5F8");
  184 + }
  185 + return _tableView;
  186 +}
  187 +@end
... ...
CNLiveMyOrderModule/Classes/Controller/CNLiveOrderDetailController.m
... ... @@ -24,11 +24,11 @@
24 24 #import "CNLiveOrderViewModel.h"
25 25 #import "CNLiveEvaluateController.h"
26 26 #import <DSCnliveShopSDK/DSCnliveShopSDK.h>
  27 +#import "CNLiveApplyRefundController.h"
  28 +#import "CNLiveQrCodeServiceProtocol.h"
27 29 #define Default_H 45
28   -#define OrderIdKey @"OrderIdKey" //订单号
29 30 @interface CNLiveOrderDetailController ()<CNLiveRefundVoucherViewDelegate,CNAddPopFuncViewDelegate,CNLiveAddressViewDelegate>
30 31 @property (nonatomic, strong) UIScrollView *scrollView;
31   -@property (strong, nonatomic) UIPageControl * pageControl;
32 32 @property (nonatomic, strong) CNLiveAddPopFuncView *popFunItemView;
33 33 //点击navbar右上角弹出的view
34 34 @property (nonatomic, strong) CNLiveOrderDetailStatusView *statusView;
... ... @@ -148,7 +148,7 @@
148 148 {
149 149 _moreBtn = [UIButton buttonWithType:UIButtonTypeCustom];
150 150 _moreBtn.frame = CGRectMake(0, 0, 30, 30);
151   - [_moreBtn setImage:[UIImage cnLive_getImageNameWithBundle:@"dd_gengduo2" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
  151 + [_moreBtn setImage:[UIImage cnliveImageInBundleWithImageName:@"dd_gengduo2" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
152 152 [_moreBtn addTarget:self action:@selector(rightNavItemAction:) forControlEvents:UIControlEventTouchUpInside];
153 153 _moreBtn.hidden = YES;
154 154 UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:_moreBtn];
... ... @@ -455,7 +455,7 @@
455 455 [QMUITips hideAllToastInView:strongSelf.view animated:YES];
456 456 CNLiveOrderListOrderItem *orderItem = list.orderItem;
457 457 CNLiveOrderRefundItem *refundItem = list.refundMsg;
458   - strongSelf.qrParameterDic = @{OrderIdKey:orderItem.orderId};
  458 +// strongSelf.qrParameterDic = @{OrderIdKey:orderItem.orderId};
459 459 if (refundItem.imgPathArray.count > 0) {
460 460 strongSelf.showVoucher = YES;
461 461 strongSelf.voucherView.hidden = NO;
... ... @@ -875,12 +875,13 @@
875 875 break;
876 876  
877 877 case CNLiveMineOrderButtonItemTypeRefund: { //申请退款
878   -// CNLiveApplyRefundController *applyVc = [[CNLiveApplyRefundController alloc]init]
879   -// ;
880   -// [CNLiveOrderEventHandle applyForRefund:weakSelf.list jumpBlock:^(CNLiveOrderList * _Nonnull orderList) {
881   -// applyVc.list = orderList;
882   -// [weakSelf.navigationController pushViewController:applyVc animated:YES];
883   -// }];
  878 + CNLiveApplyRefundController *applyVc = [[CNLiveApplyRefundController alloc]init]
  879 + ;
  880 + [CNLiveOrderEventHandle applyForRefund:weakSelf.list jumpBlock:^(CNLiveOrderList * _Nonnull orderList) {
  881 + applyVc.list = orderList;
  882 + [weakSelf.navigationController pushViewController:applyVc animated:YES];
  883 + }];
  884 +
884 885 }
885 886 break;
886 887  
... ... @@ -913,16 +914,22 @@
913 914  
914 915 };
915 916 }
  917 +#pragma mark - CNAddPopFuncViewDelegate
  918 +- (void)popFuncView:(CNLiveAddPopFuncView *)popView indexPath:(NSInteger)row {
  919 + NSString *orderId = self.list.orderItem.orderId;
  920 + if (CNLiveStringIsEmpty(orderId)) {
  921 + [QMUITips showError:@"提示" detailText:@"参数不全,生成二维码失败" inView:self.view hideAfterDelay:1.5];
  922 + return;
  923 + }
  924 + id <CNLiveQrCodeServiceProtocol> service = [[BeeHive shareInstance]createService:@protocol(CNLiveQrCodeServiceProtocol)];
  925 + [service pushToGenerateQrCodeController:orderId];
  926 +}
916 927 #pragma mark - CNAddressViewDelegate
917 928 - (void)selectedAddressComplete {
918 929 [self.scrollView layoutSubviews];
919 930 self.scrollView.contentSize = CGSizeMake(KScreenWidth, self.funcView.bottom);
920 931 }
921   -#pragma mark - CNAddPopFuncViewDelegate
922   -- (void)popFuncView:(CNLiveAddPopFuncView *)popView indexPath:(NSInteger)row
923   -{
924   -
925   -}
  932 +
926 933 #pragma mark -通知
927 934 - (void)evaluateSuccess {
928 935 [self requestData:self.orderId];
... ...
CNLiveMyOrderModule/Classes/Controller/CNLiveRefundController.m
... ... @@ -67,7 +67,7 @@ static const CGFloat KCategoryViewHeight = 44;
67 67 _listArr = [NSMutableArray array];
68 68 _page = 1;
69 69 self.index = 0;
70   - UIBarButtonItem *callItem = [[UIBarButtonItem alloc]initWithImage:[UIImage cnLive_getImageNameWithBundle:@"dd_dianhua" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] style:UIBarButtonItemStylePlain target:self action:@selector(callItemAction)];
  70 + UIBarButtonItem *callItem = [[UIBarButtonItem alloc]initWithImage:[UIImage cnliveImageInBundleWithImageName:@"dd_dianhua" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] style:UIBarButtonItemStylePlain target:self action:@selector(callItemAction)];
71 71 self.navigationItem.rightBarButtonItem = callItem;
72 72 // [self.view addSubview:self.tableView];
73 73 [self.view addSubview:self.scrollView];
... ... @@ -323,7 +323,7 @@ static const CGFloat KCategoryViewHeight = 44;
323 323 - (CNLiveNoOrderView *)noDataView {
324 324 if (!_noDataView) {
325 325 _noDataView = [[CNLiveNoOrderView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight - kNavigationBarHeight)];
326   - [_noDataView setImageName:[UIImage cnLive_getImageNameWithBundle:@"dd_wutuikuan" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"您还没有相关退款的订单" customTopH:109];
  326 + [_noDataView setImageName:[UIImage cnliveImageInBundleWithImageName:@"dd_wutuikuan" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"您还没有相关退款的订单" customTopH:109];
327 327 }
328 328 return _noDataView;
329 329 }
... ...
CNLiveMyOrderModule/Classes/Controller/CNLiveServiceOrderController.m
... ... @@ -15,6 +15,7 @@
15 15 #import "CNLiveOrderDetailController.h"
16 16 #import "CNLiveEvaluateController.h"
17 17 #import "CNLiveApplyRefundController.h"
  18 +//#import "CNLiveMyOrderDetaielController.h"
18 19 #define kLineGrayColor [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1.00]
19 20 static const CGFloat KCategoryViewHeight = 44;
20 21 @interface CNLiveServiceOrderController ()<JXCategoryViewDelegate>
... ... @@ -131,6 +132,10 @@ static const CGFloat KCategoryViewHeight = 44;
131 132 CNLiveOrderDetailController *vc = [[CNLiveOrderDetailController alloc]init];
132 133 vc.orderId = orderId;
133 134 [weakSelf.navigationController pushViewController:vc animated:NO];
  135 +// CNLiveMyOrderDetaielController *vc = [[CNLiveMyOrderDetaielController alloc]init];
  136 +// vc.orderId = orderId;
  137 +// [weakSelf.navigationController pushViewController:vc animated:YES];
  138 +
134 139 };
135 140 }
136 141 break;
... ... @@ -291,7 +296,6 @@ static const CGFloat KCategoryViewHeight = 44;
291 296 - (CNLiveOrderListCommonView *)evaluateTblView {
292 297 if (!_evaluateTblView) {
293 298 _evaluateTblView = [[CNLiveOrderListCommonView alloc]initWithFrame:CGRectMake(KScreenWidth *3, 0, KScreenWidth, KScreenHeight - KCategoryViewHeight -kNavigationBarHeight) orderStatus:3];
294   -// _evaluateTblView.backgroundColor = [UIColor purpleColor];
295 299 }
296 300 return _evaluateTblView;
297 301 }
... ...
CNLiveMyOrderModule/Classes/Service/CNLiveOrderService.m
... ... @@ -12,6 +12,7 @@
12 12 #import <CNLiveBeeHive/BeeHive.h>
13 13 #import <UIKit/UIKit.h>
14 14 #import <DSCnliveShopSDK/DSAddressViewController.h>//收货地址
  15 +#import <DSCnliveShopSDK/DSOMyGivingGiftsListViewController.h>
15 16 @interface CNLiveOrderService ()<CNLiveOrderServiceProtocol>
16 17 @end
17 18  
... ... @@ -49,6 +50,16 @@
49 50 DSAddressViewController *addressVc = [[DSAddressViewController alloc]init];
50 51 [[self navigationViewController]pushViewController:addressVc animated:YES];
51 52 }
  53 +#pragma mark - 获取我的礼盒
  54 +- (UIViewController *)getGiftBoxViewController {
  55 + DSOMyGivingGiftsListViewController *giftVc = [[DSOMyGivingGiftsListViewController alloc]init];
  56 + return giftVc;
  57 +}
  58 +#pragma mark - 跳转到我的礼盒
  59 +- (void)pushToGiftBoxViewController{
  60 + DSOMyGivingGiftsListViewController *giftVc = [[DSOMyGivingGiftsListViewController alloc]init];
  61 + [[self navigationViewController]pushViewController:giftVc animated:YES];
  62 +}
52 63 #pragma mark -获取当前导航栏
53 64 - (UINavigationController *)navigationViewController {
54 65  
... ...
CNLiveMyOrderModule/Classes/View/CNLiveErrorOrNoNetView.m
... ... @@ -168,7 +168,7 @@ static const char retryKey;
168 168 {
169 169 if (!_iconView) {
170 170 _iconView = [[UIImageView alloc] init];
171   - _iconView.image = [UIImage cnLive_getImageNameWithBundle:@"wufalianjie" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
  171 + _iconView.image = [UIImage cnliveImageInBundleWithImageName:@"wufalianjie" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
172 172 }
173 173 return _iconView;
174 174 }
... ...
CNLiveMyOrderModule/Classes/View/CNLiveMineOrderView.m
... ... @@ -119,7 +119,7 @@
119 119 - (void)setList:(CNLiveOrderList *)list {
120 120 _list = list;
121 121 CNLiveOrderListIconBean *iconBean = list.iconBean;
122   - [self.iconView sd_setImageWithURL:[NSURL URLWithString:iconBean.image] placeholderImage:[UIImage cnLive_getImageNameWithBundle:@"touxiang2" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]]];
  122 + [self.iconView sd_setImageWithURL:[NSURL URLWithString:iconBean.image] placeholderImage:[UIImage cnliveImageInBundleWithImageName:@"touxiang2" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]]];
123 123 [self.nameBtn setTitle:iconBean.nickName forState:UIControlStateNormal];
124 124  
125 125 }
... ... @@ -168,7 +168,7 @@
168 168 - (UIImageView *)detailView{
169 169 if (!_detailView) {
170 170 _detailView = [UIImageView new];
171   - _detailView.image = [UIImage cnLive_getImageNameWithBundle:@"pyq_gengduo" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
  171 + _detailView.image = [UIImage cnliveImageInBundleWithImageName:@"pyq_gengduo" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
172 172 }
173 173 return _detailView;
174 174 }
... ... @@ -1529,7 +1529,7 @@
1529 1529 if (!_copyingBtn) {
1530 1530 _copyingBtn = [UIButton buttonWithType:UIButtonTypeCustom];
1531 1531 [_copyingBtn setTitle:@"复制编号" forState:UIControlStateNormal];
1532   - [_copyingBtn setImage:[UIImage cnLive_getImageNameWithBundle:@"dd_fuzhi2" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
  1532 + [_copyingBtn setImage:[UIImage cnliveImageInBundleWithImageName:@"dd_fuzhi2" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
1533 1533 [_copyingBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
1534 1534 _copyingBtn.titleLabel.font = UIFontCNMake(14);
1535 1535 [_copyingBtn setTitleEdgeInsets:UIEdgeInsetsMake(0, 5, 0, 0)];
... ... @@ -1578,7 +1578,7 @@
1578 1578 - (UIButton *)contactBtn{
1579 1579 if (!_contactBtn) {
1580 1580 _contactBtn = [UIButton buttonWithType:UIButtonTypeCustom];
1581   - [_contactBtn setImage:[UIImage cnLive_getImageNameWithBundle:@"dd_sixindaren" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
  1581 + [_contactBtn setImage:[UIImage cnliveImageInBundleWithImageName:@"dd_sixindaren" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
1582 1582 [_contactBtn setTitle:@"联系达人" forState:UIControlStateNormal];
1583 1583 [_contactBtn setTitleColor:KTextBlackColor forState:UIControlStateNormal];
1584 1584 _contactBtn.titleLabel.font = UIFontCNMake(14);
... ... @@ -1947,7 +1947,7 @@
1947 1947 - (UIImageView *)firstSuccView{
1948 1948 if (!_firstSuccView) {
1949 1949 _firstSuccView = [[UIImageView alloc] init];
1950   - _firstSuccView.image = [UIImage cnLive_getImageNameWithBundle:@"dd_tuikuanchenggong" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
  1950 + _firstSuccView.image = [UIImage cnliveImageInBundleWithImageName:@"dd_tuikuanchenggong" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
1951 1951 _firstSuccView.hidden = YES;
1952 1952 }
1953 1953 return _firstSuccView;
... ... @@ -1956,7 +1956,7 @@
1956 1956 - (UIImageView *)secondSuccView{
1957 1957 if (!_secondSuccView) {
1958 1958 _secondSuccView = [[UIImageView alloc] init];
1959   - _secondSuccView.image = [UIImage cnLive_getImageNameWithBundle:@"dd_tuikuanchenggong" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
  1959 + _secondSuccView.image = [UIImage cnliveImageInBundleWithImageName:@"dd_tuikuanchenggong" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
1960 1960 _secondSuccView.hidden = YES;
1961 1961 }
1962 1962 return _secondSuccView;
... ... @@ -1965,7 +1965,7 @@
1965 1965 - (UIImageView *)thirdSuccView{
1966 1966 if (!_thirdSuccView) {
1967 1967 _thirdSuccView = [[UIImageView alloc] init];
1968   - _thirdSuccView.image = [UIImage cnLive_getImageNameWithBundle:@"dd_tuikuanchenggong" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
  1968 + _thirdSuccView.image = [UIImage cnliveImageInBundleWithImageName:@"dd_tuikuanchenggong" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
1969 1969 _thirdSuccView.hidden = YES;
1970 1970 }
1971 1971 return _thirdSuccView;
... ... @@ -2100,7 +2100,7 @@
2100 2100 _reasonBtn = [CNLiveSelectRefundButton buttonWithType:UIButtonTypeCustom];
2101 2101 [_reasonBtn setTitle:@"点击选取退款原因" forState:UIControlStateNormal];
2102 2102 [_reasonBtn setTitleColor:KGray153Color forState:UIControlStateNormal];
2103   - [_reasonBtn setImage:[UIImage cnLive_getImageNameWithBundle:@"dd_xialajiantou" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
  2103 + [_reasonBtn setImage:[UIImage cnliveImageInBundleWithImageName:@"dd_xialajiantou" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
2104 2104 [_reasonBtn addTarget:self action:@selector(moreBtnDidSelected) forControlEvents:UIControlEventTouchUpInside];
2105 2105 }
2106 2106 return _reasonBtn;
... ... @@ -2564,7 +2564,7 @@
2564 2564 - (CNLiveStarsControl *)starsControlView
2565 2565 {
2566 2566 if (!_starsControlView) {
2567   - _starsControlView = [[CNLiveStarsControl alloc]initWithFrame:CGRectMake(_iconImgView.right+19, 36, 185 , 55) stars:5 starSize:CGSizeMake(25, 25) noramlStarImage:[UIImage cnLive_getImageNameWithBundle:@"drd_xing_kong" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] highlightedStarImage:[UIImage cnLive_getImageNameWithBundle:@"drd_xing_quan" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]]];
  2567 + _starsControlView = [[CNLiveStarsControl alloc]initWithFrame:CGRectMake(_iconImgView.right+19, 36, 185 , 55) stars:5 starSize:CGSizeMake(25, 25) noramlStarImage:[UIImage cnliveImageInBundleWithImageName:@"drd_xing_kong" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] highlightedStarImage:[UIImage cnliveImageInBundleWithImageName:@"drd_xing_quan" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]]];
2568 2568 _starsControlView.delegate = self;
2569 2569 _starsControlView.allowFraction = YES;
2570 2570 _starsControlView.score = 3.f;
... ...
CNLiveMyOrderModule/Classes/View/CNLiveOrderListCommonView.m
... ... @@ -130,16 +130,16 @@ static const CGFloat KCategoryViewHeight = 44;
130 130 - (void)setNODataViewByStatus:(NSInteger)status {
131 131 switch (status) {
132 132 case 0:
133   - [self.noDataView setImageName:[UIImage cnLive_getImageNameWithBundle:@"dd_quanbumeiyou" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"目前没有订单" customTopH:0];
  133 + [self.noDataView setImageName:[UIImage cnliveImageInBundleWithImageName:@"dd_quanbumeiyou" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"目前没有订单" customTopH:0];
134 134 break;
135 135 case 1:
136   - [self.noDataView setImageName:[UIImage cnLive_getImageNameWithBundle:@"dd_wufukuan" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"目前没有订单需要付款" customTopH:0];
  136 + [self.noDataView setImageName:[UIImage cnliveImageInBundleWithImageName:@"dd_wufukuan" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"目前没有订单需要付款" customTopH:0];
137 137 break;
138 138 case 2:
139   - [self.noDataView setImageName:[UIImage cnLive_getImageNameWithBundle:@"dd_wushouhuo" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"目前没有订单需要收获" customTopH:0];
  139 + [self.noDataView setImageName:[UIImage cnliveImageInBundleWithImageName:@"dd_wushouhuo" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"目前没有订单需要收获" customTopH:0];
140 140 break;
141 141 case 3:
142   - [self.noDataView setImageName:[UIImage cnLive_getImageNameWithBundle:@"dd_wupingjia" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"目前没有订单需要评价" customTopH:0];
  142 + [self.noDataView setImageName:[UIImage cnliveImageInBundleWithImageName:@"dd_wupingjia" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] title:@"目前没有订单需要评价" customTopH:0];
143 143 break;
144 144 default:
145 145 break;
... ...
CNLiveMyOrderModule/Classes/View/CNLiveRefundBasicCell.h
... ... @@ -30,22 +30,43 @@ NS_ASSUME_NONNULL_BEGIN
30 30 @end
31 31 //退款原因
32 32 @interface CNLiveRefundReasonCell : UITableViewCell
  33 +@property (nonatomic, copy) void (^refundReasonBlock) (NSString *reasonStr);
33 34 @end
34 35  
35 36 //退款金额和退款说明
36 37 @interface CNLiveRefundInstructionsCell : UITableViewCell
37 38 - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier indexPath:(NSIndexPath *)indexPath;
38 39 @property (nonatomic, strong) CNLiveOrderList *list;
  40 +@property (nonatomic, copy) void (^refundDetailsBlock)(NSString *refundText); //退款金额和退款说明
39 41 @end
40 42  
41 43 //上传凭证cell
42   -@protocol CNLiveRefundVoucherDelegate <NSObject>
43 44  
44   -@optional
45   -- (void)picSelected:(NSArray *)imagesArr urls:(NSArray *)urls thumbUrlsArr:(NSArray *)thumbUrlsArr selectedView:(SDAnimatedImageView *)selectedView index:(NSInteger)index;
  45 +@protocol CNLiveUploadVoucherHeightDelegate <NSObject>
  46 +
  47 +- (void)updateSelectedPhotos:(NSArray *)selectedPhotos;
  48 +
46 49 @end
47 50 @interface CNLiveRefundCredentialCell : UITableViewCell
48   -@property (nonatomic, weak) id <CNLiveRefundVoucherDelegate> delegate;
49   -
  51 +@property (nonatomic, weak) id <CNLiveUploadVoucherHeightDelegate> delegate;
  52 +@end
  53 +//订单详情那里,最上面个人信息的两个cell
  54 +@interface CNliveOrdeInformationCell : UITableViewCell
  55 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier indexPath:(NSIndexPath *)indexPath;
  56 +@property (nonatomic, copy) NSString *title; //前面的展示
  57 +@property (nonatomic, strong) CNLiveOrderList *orderList;
  58 +@end
  59 +//联系达人
  60 +@interface CNLiveOrderContactCell : UITableViewCell
  61 +@property (nonatomic, strong) CNLiveOrderList *orderList;
  62 +@end
  63 +//个人信息
  64 +@interface CNLiveOrderPersonCell : UITableViewCell
  65 +@property (nonatomic, strong) CNLiveOrderList *orderList;
  66 +@end
  67 +//创建时间,支付时间等那里显示
  68 +@interface CNLiveOrderTimeCell : UITableViewCell
  69 +@property (nonatomic, strong) CNLiveOrderList *orderList;
  70 +@property (nonatomic, copy) NSString *title;
50 71 @end
51 72 NS_ASSUME_NONNULL_END
... ...
CNLiveMyOrderModule/Classes/View/CNLiveRefundBasicCell.m
... ... @@ -17,6 +17,8 @@
17 17 #import "CNLiveSelectedRefundReasonView.h"
18 18 #import "CNLiveUploadVoucher.h"
19 19 #import "UIImage+CNLiveAdd.h"
  20 +#import "UIImage+Bundle.h"
  21 +#import <QMUIKit/QMUIKit.h>
20 22 #define KDefaultLeftSpace 15
21 23 #define KDefaultBottomSpace 10
22 24 @interface CNLiveRefundBasicCell ()
... ... @@ -58,10 +60,6 @@
58 60 _text = text;
59 61 self.titleLabel.text = text;
60 62 }
61   -- (void)setDetaielText:(NSString *)detaielText {
62   - _detaielText = detaielText;
63   - self.detailLabel.text = detaielText;
64   -}
65 63 - (void)setList:(CNLiveOrderList *)list {
66 64 _list = list;
67 65 CNLiveOrderListOrderItem *orderItem = list.orderItem;
... ... @@ -139,7 +137,7 @@
139 137 for (CNLiveEditGoodsModel *model in list.orderItem.goodsInfo) {
140 138 _nameLabel.text = model.title ;
141 139 _priceLabel.text = [NSString stringWithFormat:@"¥ %.2f", model.price];
142   - _numberLabel.text = [NSString stringWithFormat:@"x %ld", model.quantity];
  140 + _numberLabel.text = [NSString stringWithFormat:@"x %ld", (long)model.quantity];
143 141 NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:_priceLabel.text];
144 142 [string addAttribute:NSFontAttributeName value:UIFontCNMake(13) range:NSMakeRange(0, 1)];
145 143 _priceLabel.attributedText = string;
... ... @@ -359,7 +357,6 @@
359 357 @interface CNLiveRefundReasonCell ()
360 358 @property (nonatomic, strong) UILabel *refundReasonL; //退款原因
361 359 @property (nonatomic, strong) CNLiveSelectRefundButton *refundReasonBtn;
362   -@property (nonatomic, copy) NSString *refundReasonStr; //退款原因
363 360 @end
364 361 @implementation CNLiveRefundReasonCell
365 362  
... ... @@ -397,6 +394,9 @@
397 394 reaasonView.refundReasonBlock = ^(NSString * _Nonnull text) {
398 395 [weakSelf.refundReasonBtn setTitle:text forState:UIControlStateNormal];
399 396 [weakSelf.refundReasonBtn setTitleColor:KTextBlackColor forState:UIControlStateNormal];
  397 + if (weakSelf.refundReasonBlock) {
  398 + weakSelf.refundReasonBlock(text);
  399 + }
400 400 };
401 401 [reaasonView refundReasonShow];
402 402 }
... ... @@ -417,7 +417,7 @@
417 417 _refundReasonBtn = [CNLiveSelectRefundButton buttonWithType:UIButtonTypeCustom];
418 418 [_refundReasonBtn setTitle:@"点击选取退款原因" forState:UIControlStateNormal];
419 419 [_refundReasonBtn setTitleColor:KGray153Color forState:UIControlStateNormal];
420   - [_refundReasonBtn setImage:[UIImage cnLive_getImageNameWithBundle:@"dd_xialajiantou" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
  420 + [_refundReasonBtn setImage:[UIImage cnliveImageInBundleWithImageName:@"dd_xialajiantou" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
421 421 [_refundReasonBtn addTarget:self action:@selector(moreBtnAAction) forControlEvents:UIControlEventTouchUpInside];
422 422 }
423 423 return _refundReasonBtn;
... ... @@ -520,6 +520,15 @@
520 520 }
521 521 return YES;
522 522 }
  523 +- (void)textFieldDidEndEditing:(UITextField *)textField {
  524 +
  525 + NSString *totalText = textField.text;
  526 + NSString *trimmText = [totalText stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];//去除 空格 \n 后
  527 + if (self.refundDetailsBlock) {
  528 + self.refundDetailsBlock(trimmText);
  529 + }
  530 +
  531 +}
523 532 #pragma mark - Lazy
524 533 - (UILabel *)refundLabel {
525 534 if (!_refundLabel) {
... ... @@ -554,7 +563,6 @@
554 563 #pragma mark - 上传凭证
555 564 @interface CNLiveRefundCredentialCell ()<CNUploadVoucherDelegate>
556 565 @property (nonatomic, strong) CNLiveUploadVoucher *voucherView; //上传凭证(图片)
557   -@property (nonatomic, strong) UIButton *submitBtn ;//提交
558 566 @end
559 567  
560 568 @implementation CNLiveRefundCredentialCell
... ... @@ -570,42 +578,23 @@
570 578 }
571 579 return self;
572 580 }
573   -//- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
574   -// UIView *hitView= [super hitTest:point withEvent:event];
575   -//
576   -// if ([NSStringFromClass([hitView class]) isEqualToString:@"UITableViewCellContentView"]) {
577   -// return nil;
578   -// }
579   -// for (UIView *subView in self.subviews) {
580   -//
581   -// }
582   -// if ([hitView isKindOfClass:[UIView class]]) {
583   -// return nil;
584   -// }
585   -// return hitView;
586   -//}
587 581 #pragma mark - Init
588 582 - (void)addSubViews {
589 583 __weak typeof(self) weakSelf = self;
590 584 CGFloat height = (KScreenWidth - 20 - 2*8 - 4)/3 - 8 + 60;
591 585 [self.contentView addSubview:self.voucherView];
592   - [self.contentView addSubview:self.submitBtn];
593 586 [_voucherView mas_makeConstraints:^(MASConstraintMaker *make) {
594 587 make.left.mas_equalTo(weakSelf.contentView);
595 588 make.top.mas_equalTo(weakSelf.contentView.mas_top).offset(KDefaultBottomSpace);
596   - make.width.mas_equalTo(height);
  589 + make.width.mas_equalTo(KScreenWidth);
  590 + make.height.mas_equalTo(height);
597 591 }];
598   - [_submitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
599   - make.left.mas_equalTo(weakSelf.contentView.mas_left).offset (KDefaultLeftSpace);
600   - make.bottom.mas_equalTo(weakSelf.contentView.mas_bottom).offset(-KDefaultLeftSpace);
601   - make.width.mas_equalTo(KScreenWidth - 2*15);
602   - make.height.mas_equalTo(55);
603   - }];
604   -
605 592 }
606   -#pragma mark - targetAction
607   -- (void)submitBtnAction {
608   -
  593 +
  594 +- (void)updateImages:(NSArray *)images {
  595 + if (self.delegate && [self.delegate respondsToSelector:@selector(updateSelectedPhotos:)]) {
  596 + [self.delegate updateSelectedPhotos:images];
  597 + }
609 598 }
610 599 #pragma mark - Lazy
611 600 - (CNLiveUploadVoucher *)voucherView {
... ... @@ -621,19 +610,296 @@
621 610 }
622 611 return _voucherView;
623 612 }
624   -- (UIButton *)submitBtn {
625   - if (!_submitBtn) {
626   - _submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
627   - [_submitBtn setBackgroundImage:CNLiveUIImageWithColor(KYellowColor) forState:UIControlStateNormal];
628   - [_submitBtn setBackgroundImage:CNLiveUIImageWithColor(KYellowHightColor) forState:UIControlStateHighlighted];
629   - [_submitBtn setTitle:@"提交" forState:UIControlStateNormal];
630   - _submitBtn.layer.cornerRadius = 3;
631   - _submitBtn.layer.masksToBounds = YES;
632   - [_submitBtn addTarget:self action:@selector(submitBtnAction) forControlEvents:UIControlEventTouchUpInside];
  613 +@end
  614 +//订单详情最上面的两个cell
  615 +@interface CNliveOrdeInformationCell ()
  616 +@property (nonatomic, strong) UILabel *titleLabel; //前面的label
  617 +@property (nonatomic, strong) UILabel *detaielLabel; //后面的展示label
  618 +@property (nonatomic, strong) QMUIButton *copyBtn; //复制编号
  619 +@property (nonatomic, strong) NSIndexPath *indexPath;
  620 +@end
  621 +
  622 +@implementation CNliveOrdeInformationCell
  623 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier indexPath:(NSIndexPath *)indexPath {
  624 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  625 + if (self) {
  626 + if (indexPath.section == 0) {
  627 + self.backgroundColor = [UIColor lightGrayColor];
  628 + }else if (indexPath.section == 1) {
  629 + self.backgroundColor = [UIColor whiteColor];
  630 + }
  631 + self.indexPath = indexPath;
  632 + [self addSubViews];
  633 + }
  634 + self.selectionStyle = UITableViewCellSelectionStyleNone;
  635 + return self;
  636 +}
  637 +#pragma mark - Init
  638 +- (void)addSubViews {
  639 + [self.contentView addSubview:self.titleLabel];
  640 + [self.contentView addSubview:self.detaielLabel];
  641 + [self setUPLayout];
  642 + [self showOrHidenCopyBtn];
  643 +}
  644 +
  645 +- (void)setUPLayout {
  646 + __weak typeof(self) weakSelf = self;
  647 + CGFloat topMargin = 0;
  648 + if (self.indexPath.row == 0) {
  649 + topMargin = 15;
  650 + }else {
  651 + topMargin = 10;
  652 + }
  653 + [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  654 + make.left.mas_equalTo(weakSelf.contentView.mas_left).offset(10);
  655 + make.top.mas_equalTo(weakSelf.contentView.mas_top).offset(topMargin);
  656 + make.height.mas_equalTo(20);
  657 + make.width.mas_equalTo(80);
  658 + }];
  659 + [_detaielLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  660 + make.top.mas_equalTo(weakSelf.contentView.mas_top).offset(topMargin);
  661 + make.left.mas_equalTo(weakSelf.titleLabel.mas_left).offset(5);
  662 + make.height.mas_equalTo(20);
  663 + }];
  664 +}
  665 +#pragma mark - getterAndSetter
  666 +- (void)setTitle:(NSString *)title {
  667 + _title = title;
  668 + _titleLabel.text = title;
  669 +}
  670 +- (void)setOrderList:(CNLiveOrderList *)orderList {
  671 + _orderList = orderList;
  672 +}
  673 +#pragma mark - TargetAction
  674 +- (void)copyBtnAction {
  675 +
  676 +}
  677 +- (void)showOrHidenCopyBtn {
  678 + __weak typeof(self) weaakSelf = self;
  679 + if (self.indexPath.section == 0) {
  680 + if (self.indexPath.row == 0) {
  681 + [self.contentView addSubview:self.copyBtn];
  682 + [_copyBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  683 + make.top.mas_equalTo (weaakSelf.contentView.mas_top).offset(15);
  684 + make.right.mas_equalTo(weaakSelf.contentView.mas_right).offset(-20);
  685 + make.height.mas_equalTo(30);
  686 + make.width.mas_equalTo(100);
  687 + }];
  688 + }else {
  689 + self.copyBtn.hidden = YES;
  690 + [self.copyBtn removeFromSuperview];
  691 + }
  692 + }else{
  693 + self.copyBtn.hidden = YES;
  694 + [self.copyBtn removeFromSuperview];
  695 + }
  696 +}
  697 +#pragma mark -Lazy
  698 +- (UILabel *)titleLabel {
  699 + if (!_titleLabel) {
  700 + _titleLabel = [[UILabel alloc]init];
  701 + _titleLabel.font = [UIFont systemFontOfSize:15.0f];
  702 + if (self.indexPath.section == 0) {
  703 + _titleLabel.textColor = [UIColor whiteColor];
  704 + }else if (self.indexPath.section == 1) {
  705 + _titleLabel.textColor = KTextBlackColor;
  706 + }
  707 + }
  708 + return _titleLabel;
  709 +}
  710 +- (UILabel *)detaielLabel {
  711 + if (!_detaielLabel) {
  712 + _detaielLabel = [[UILabel alloc]init];
  713 + _detaielLabel.font = [UIFont systemFontOfSize:15.0f];
  714 + if (self.indexPath.section == 0) {
  715 + _detaielLabel.textColor = [UIColor whiteColor];
  716 + }else if (self.indexPath.section == 1){
  717 + _detaielLabel.textColor = KTextBlackColor;
  718 + }
  719 +
  720 + }
  721 + return _detaielLabel;
  722 +}
  723 +- (QMUIButton *)copyBtn {
  724 + if (!_copyBtn) {
  725 + _copyBtn = [[QMUIButton alloc]init];
  726 + [_copyBtn setTitle:@"复制编号" forState:UIControlStateNormal];
  727 + [_copyBtn setImage:[UIImage cnliveImageInBundleWithImageName:@"dd_fuzhi2" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
  728 + _copyBtn.titleLabel.font = [UIFont systemFontOfSize:14.0f];
  729 + [_copyBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  730 + _copyBtn.imagePosition = QMUIButtonImagePositionLeft;
  731 + _copyBtn.spacingBetweenImageAndTitle = 10;
  732 + [_copyBtn addTarget:self action:@selector(copyBtnAction) forControlEvents:UIControlEventTouchUpInside];
  733 + }
  734 + return _copyBtn;
  735 +}
  736 +@end
  737 +@interface CNLiveOrderContactCell ()
  738 +@property (nonatomic, strong) QMUIButton *connectBtn; //联系达人
  739 +@end
  740 +
  741 +@implementation CNLiveOrderContactCell
  742 +
  743 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  744 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  745 + if (self) {
  746 + self.selectionStyle = UITableViewCellSelectionStyleNone;
  747 + [self addSubViews];
  748 + }
  749 + return self;
  750 +}
  751 +- (void)addSubViews {
  752 + [self.contentView addSubview:self.connectBtn];
  753 + __weak typeof(self) weakSelf = self;
  754 + [_connectBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  755 + make.centerX.mas_equalTo(weakSelf.contentView.mas_centerX);
  756 + make.centerY.mas_equalTo(weakSelf.contentView.mas_centerY);
  757 + make.size.mas_equalTo(CGSizeMake(120, 40));
  758 + }];
  759 +}
  760 +#pragma mark - targetAction
  761 +- (void)connectBtnAction {
  762 +
  763 +}
  764 +#pragma mark -Lazy
  765 +- (QMUIButton *)connectBtn {
  766 + if (!_connectBtn) {
  767 + _connectBtn = [[QMUIButton alloc]init];
  768 + [_connectBtn setTitle:@"联系达人" forState:UIControlStateNormal];
  769 + [_connectBtn setImage:[UIImage cnliveImageInBundleWithImageName:@"dd_sixindaren" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
  770 + [_connectBtn setTitleColor:KTextBlackColor forState:UIControlStateNormal];
  771 + _connectBtn.titleLabel.font = [UIFont systemFontOfSize:14];
  772 + _connectBtn.imagePosition = QMUIButtonImagePositionLeft;
  773 + _connectBtn.spacingBetweenImageAndTitle = 10;
  774 + [_connectBtn addTarget:self action:@selector(connectBtnAction) forControlEvents:UIControlEventTouchUpInside];
633 775 }
634   - return _submitBtn;
  776 + return _connectBtn;
635 777 }
  778 +@end
636 779  
  780 +//个人信息头像那个cell
  781 +@interface CNLiveOrderPersonCell ()
  782 +@property (nonatomic, strong) UIImageView *icon; //头像
  783 +@property (nonatomic, strong) QMUIButton *nameBtn; //名称
637 784 @end
  785 +@implementation CNLiveOrderPersonCell
  786 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  787 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  788 + if (self) {
  789 + self.selectionStyle = UITableViewCellSelectionStyleNone;
  790 + [self addSubViews];
  791 + }
  792 + return self;
  793 +}
  794 +#pragma mark - init
  795 +- (void)addSubViews {
  796 + [self.contentView addSubview:self.icon];
  797 + [self.contentView addSubview:self.nameBtn];
  798 + [self setUPLayout];
  799 +}
  800 +- (void)setUPLayout {
  801 + __weak typeof(self) weakSelf = self;
  802 + [_icon mas_makeConstraints:^(MASConstraintMaker *make) {
  803 + make.left.mas_equalTo(weakSelf.contentView.mas_left).offset(15);
  804 + make.top.mas_equalTo(weakSelf.contentView.mas_top).offset(15);
  805 + make.size.mas_equalTo(CGSizeMake(40, 40));
  806 + }];
  807 + [_nameBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  808 + make.left.mas_equalTo(weakSelf.icon.mas_right).offset(5);
  809 + make.centerY.mas_equalTo(weakSelf.icon.mas_centerY);
  810 + make.width.mas_equalTo(80);
  811 + make.height.mas_equalTo(30);
  812 + }];
  813 +}
  814 +#pragma mark - targetAction
  815 +- (void)nameBtnAction {
  816 +
  817 +}
  818 +#pragma mark -lazy
  819 +- (UIImageView *)icon {
  820 + if (!_icon) {
  821 + _icon = [[UIImageView alloc]init];
  822 + _icon.layer.cornerRadius = 20;
  823 + _icon.image = [UIImage cnliveImageInBundleWithImageName:@"touxiang" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
  824 + }
  825 + return _icon;
  826 +}
  827 +- (QMUIButton *)nameBtn {
  828 + if (!_nameBtn) {
  829 + _nameBtn = [[QMUIButton alloc]init];
  830 + [_nameBtn setTitle:@"昵称" forState:UIControlStateNormal];
  831 + [_nameBtn setImage:[UIImage cnliveImageInBundleWithImageName:@"dd_gengduo2" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
  832 + _nameBtn.imagePosition = QMUIButtonImagePositionRight;
  833 + _nameBtn.spacingBetweenImageAndTitle = 10;
  834 + [_nameBtn addTarget:self action:@selector(nameBtnAction) forControlEvents:UIControlEventTouchUpInside];
  835 + }
  836 + return _nameBtn;
  837 +}
  838 +@end
  839 +//创建时间,支付时间那里
  840 +@interface CNLiveOrderTimeCell ()
  841 +@property (nonatomic, strong) UILabel *titleLabel; //前面的label
  842 +@property (nonatomic, strong) UILabel *detaielLabel; //后面的label
  843 +@end
  844 +
  845 +@implementation CNLiveOrderTimeCell
  846 +
  847 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  848 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  849 + if (self) {
  850 + self.selectionStyle = UITableViewCellSelectionStyleNone;
  851 + [self addSubViews];
  852 + }
  853 + return self;
  854 +}
  855 +#pragma mark - init
  856 +- (void)addSubViews {
  857 + __weak typeof(self) weakSelf = self;
  858 + [self.contentView addSubview:self.titleLabel];
  859 + [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  860 + make.left.mas_equalTo(weakSelf.contentView.mas_left).offset(10);
  861 + make.top.mas_equalTo(weakSelf.contentView.mas_top).offset(8);
  862 + make.width.mas_equalTo(60);
  863 + make.height.mas_equalTo(15);
  864 + }];
  865 + [_detaielLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  866 + make.left.mas_equalTo(weakSelf.titleLabel.mas_right).offset(8);
  867 + make.top.mas_equalTo(weakSelf.contentView.mas_top).offset(8);
  868 + make.right.mas_equalTo(weakSelf.contentView.mas_right).offset(-10);
  869 + make.height.mas_equalTo(20);
  870 + }];
  871 +}
  872 +- (void)setTitle:(NSString *)title {
  873 + _title = title;
  874 + self.titleLabel.text = title;
  875 +}
  876 +- (void)setOrderList:(CNLiveOrderList *)orderList {
  877 + _orderList = orderList;
  878 +}
  879 +#pragma mark - lazy
  880 +- (UILabel *)titleLabel {
  881 + if (!_titleLabel) {
  882 + _titleLabel = [[UILabel alloc]init];
  883 + _titleLabel.textColor = KGray153Color;
  884 + _titleLabel.font = [UIFont systemFontOfSize:12];
  885 + _titleLabel.numberOfLines = 0;
  886 + _titleLabel.textAlignment = NSTextAlignmentLeft;
  887 + }
  888 + return _titleLabel;
  889 +}
  890 +- (UILabel *)detaielLabel {
  891 + if (!_detaielLabel) {
  892 + _detaielLabel = [[UILabel alloc]init];
  893 + _detaielLabel.textColor = KGray153Color;
  894 + _detaielLabel.font = [UIFont systemFontOfSize:12];
  895 + _detaielLabel.numberOfLines = 0;
  896 + _detaielLabel.textAlignment = NSTextAlignmentLeft;
  897 + }
  898 + return _detaielLabel;
  899 +}
  900 +@end
  901 +
  902 +
  903 +
638 904  
639 905  
... ...
CNLiveMyOrderModule/Classes/View/CNLiveUploadVoucher.m
... ... @@ -118,7 +118,7 @@
118 118 cell.gifLable.hidden = YES;
119 119  
120 120 if (indexPath.row == _selectedPhotos.count) {
121   - cell.imageView.image = [UIImage cnLive_getImageNameWithBundle:@"pj_tianjiazhaopian" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
  121 + cell.imageView.image = [UIImage cnliveImageInBundleWithImageName:@"pj_tianjiazhaopian" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
122 122 cell.deleteBtn.hidden = YES;
123 123 } else {
124 124 cell.imageView.image = _selectedPhotos[indexPath.row];
... ... @@ -188,18 +188,14 @@
188 188 UIImage *image = _selectedPhotos[sourceIndexPath.item];
189 189 [_selectedPhotos removeObjectAtIndex:sourceIndexPath.item];
190 190 [_selectedPhotos insertObject:image atIndex:destinationIndexPath.item];
191   -
192 191 id asset = _selectedAssets[sourceIndexPath.item];
193 192 [_selectedAssets removeObjectAtIndex:sourceIndexPath.item];
194 193 [_selectedAssets insertObject:asset atIndex:destinationIndexPath.item];
195   -
196 194 [_collectionView reloadData];
197   -
198 195 if (self.delegate && [self.delegate respondsToSelector:@selector(updateImages:)]) {
199 196 [self.delegate updateImages:_selectedAssets];
200 197 }
201 198 }
202   -
203 199 #pragma mark - UIImagePickerController
204 200 - (void)takePhoto {
205 201 AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
... ...
CNLiveMyOrderModule/Classes/View/TZTestCell.m
... ... @@ -28,18 +28,16 @@
28 28 self.clipsToBounds = YES;
29 29  
30 30 _videoImageView = [[UIImageView alloc] init];
31   - _videoImageView.image = [UIImage cnLive_getImageNameWithBundle:@"fb_bof" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
  31 + _videoImageView.image = [UIImage cnliveImageInBundleWithImageName:@"fb_bof" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]];
32 32 _videoImageView.contentMode = UIViewContentModeScaleAspectFill;
33 33 _videoImageView.hidden = YES;
34 34 [self addSubview:_videoImageView];
35 35  
36 36 _deleteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
37   -// [_deleteBtn setImage:[CNLiveGetImage cnliveGetImageWithName:@"fb_shanchu" bundle:@"CNLiveMyOrder.bundle/CNLiveMyOrder" targetClass:[self class]] forState:UIControlStateNormal];
38   - [_deleteBtn setImage:[UIImage cnLive_getImageNameWithBundle:@"fb_shanchu" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
  37 + [_deleteBtn setImage:[UIImage cnliveImageInBundleWithImageName:@"fb_shanchu" bundle:@"CNLiveMyOrderModule.bundle/CNLiveMyOrderModule" targetClass:[self class]] forState:UIControlStateNormal];
39 38 _deleteBtn.imageEdgeInsets = UIEdgeInsetsMake(-10, 0, 0, -10);
40 39 _deleteBtn.alpha = 0.6;
41 40 [self addSubview:_deleteBtn];
42   -
43 41 _gifLable = [[UILabel alloc] init];
44 42 _gifLable.text = @"GIF";
45 43 _gifLable.textColor = [UIColor whiteColor];
... ...
CNLiveMyOrderModule/Classes/ViewModel/CNLiveOrderHeader.h
... ... @@ -2,11 +2,12 @@
2 2 // CNLiveOrderHeader.h
3 3 // CNLiveMyOrderModule
4 4 //
5   -// Created by 殷巧娟 on 2019/11/21.
  5 +// Created by 殷巧娟 on 2019/12/11.
6 6 //
7 7  
8 8 #ifndef CNLiveOrderHeader_h
9 9 #define CNLiveOrderHeader_h
  10 +
10 11 #ifndef CNRefundReason
11 12 #define CNRefundReason @"CNRefundReason"
12 13 #endif
... ... @@ -15,5 +16,4 @@
15 16 #define CNDisconnectNotification @"CNDisconnectNotification"
16 17 #define CNEvaluateSuccessNotioncation @"CNEvaluateSuccessNotioncation" //评论成功
17 18 #define CNApplyRefundSuccessNotification @"CNApplyRefundSuccessNotification" //申请退款成功
18   -
19 19 #endif /* CNLiveOrderHeader_h */
... ...
Example/CNLiveMyOrderModule.xcodeproj/project.pbxproj
... ... @@ -341,10 +341,12 @@
341 341 inputPaths = (
342 342 "${PODS_ROOT}/Target Support Files/Pods-CNLiveMyOrderModule_Example/Pods-CNLiveMyOrderModule_Example-resources.sh",
343 343 "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveMyOrderModule/CNLiveMyOrderModule.bundle",
  344 + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveQrCodeModule/CNLiveQrCodeModule.bundle",
344 345 );
345 346 name = "[CP] Copy Pods Resources";
346 347 outputPaths = (
347 348 "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveMyOrderModule.bundle",
  349 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveQrCodeModule.bundle",
348 350 );
349 351 runOnlyForDeploymentPostprocessing = 0;
350 352 shellPath = /bin/sh;
... ... @@ -367,12 +369,15 @@
367 369 "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework",
368 370 "${BUILT_PRODUCTS_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework",
369 371 "${BUILT_PRODUCTS_DIR}/CNLiveCacheManagerKit/CNLiveCacheManagerKit.framework",
  372 + "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework",
370 373 "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework",
371 374 "${BUILT_PRODUCTS_DIR}/CNLiveCommonClass/CNLiveCommonClass.framework",
  375 + "${BUILT_PRODUCTS_DIR}/CNLiveCustomControl/CNLiveCustomControl.framework",
372 376 "${BUILT_PRODUCTS_DIR}/CNLiveCustomUI/CNLiveCustomUI.framework",
373 377 "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework",
374 378 "${BUILT_PRODUCTS_DIR}/CNLiveImagePickerController/CNLiveImagePickerController.framework",
375 379 "${BUILT_PRODUCTS_DIR}/CNLiveManager/CNLiveManager.framework",
  380 + "${BUILT_PRODUCTS_DIR}/CNLiveNavigationClass/CNLiveNavigationClass.framework",
376 381 "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework",
377 382 "${PODS_ROOT}/CNLiveSDKs/CNLiveSDKs/Classes/CNLivePaySDK.framework",
378 383 "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework",
... ... @@ -394,6 +399,7 @@
394 399 "${BUILT_PRODUCTS_DIR}/SAMKeychain/SAMKeychain.framework",
395 400 "${BUILT_PRODUCTS_DIR}/SDAutoLayout/SDAutoLayout.framework",
396 401 "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
  402 + "${BUILT_PRODUCTS_DIR}/SGQRCode/SGQRCode.framework",
397 403 "${PODS_ROOT}/TXIMSDK_iOS/ImSDK.framework",
398 404 "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework",
399 405 );
... ... @@ -408,12 +414,15 @@
408 414 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework",
409 415 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessTools.framework",
410 416 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCacheManagerKit.framework",
  417 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework",
411 418 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework",
412 419 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonClass.framework",
  420 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomControl.framework",
413 421 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomUI.framework",
414 422 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework",
415 423 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveImagePickerController.framework",
416 424 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveManager.framework",
  425 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveNavigationClass.framework",
417 426 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework",
418 427 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLivePaySDK.framework",
419 428 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework",
... ... @@ -435,6 +444,7 @@
435 444 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SAMKeychain.framework",
436 445 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDAutoLayout.framework",
437 446 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
  447 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SGQRCode.framework",
438 448 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ImSDK.framework",
439 449 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework",
440 450 );
... ...
Example/CNLiveMyOrderModule/CNLIVEAppDelegate.m
... ... @@ -11,6 +11,7 @@
11 11 #import <CNLiveRequestBastKit/CNLiveNetworking.h>
12 12 #import "CNLiveEnvironment.h"
13 13 #import <DSCnliveShopSDK/DSCnliveShopSDK.h>
  14 +#import "CNNavigationController.h"
14 15 static NSString * uuid;
15 16 @implementation CNLIVEAppDelegate
16 17  
... ... @@ -19,7 +20,8 @@ static NSString * uuid;
19 20 self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
20 21 self.window.backgroundColor = [UIColor whiteColor];
21 22 CNLIVEViewController *vc = [[CNLIVEViewController alloc]init];
22   - UINavigationController *nav =[[UINavigationController alloc]initWithRootViewController:vc];
  23 + CNNavigationController *nav =[[CNNavigationController alloc]initWithRootViewController:vc];
  24 + nav.navigationBar.backgroundColor = [UIColor whiteColor];
23 25 self.window.rootViewController = nav;
24 26 [self.window makeKeyAndVisible];
25 27 [self networkParamAction];
... ...
Example/CNLiveMyOrderModule/CNLIVEViewController.m
... ... @@ -29,22 +29,52 @@
29 29 [button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
30 30 [self.view addSubview:button];
31 31 }
  32 + NSArray *bottomArray = @[@"收获地址",@"我的礼盒"];
  33 + for (int i = 0; i < 2; i++) {
  34 + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  35 + button.frame = CGRectMake((20+90) *i, 180, 90, 40);
  36 + button.tag = 200 + i;
  37 + button.titleLabel.font = [UIFont systemFontOfSize:15.0f];
  38 + [button setTitle:bottomArray[i] forState:UIControlStateNormal];
  39 + button.backgroundColor = [UIColor greenColor];
  40 + [button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
  41 + [self.view addSubview:button];
  42 + }
32 43 }
33 44 - (void)buttonClicked:(UIButton *)button {
  45 + if (button.tag >=200) {
  46 + if (button.tag - 200 == 0) {
  47 + id<CNLiveOrderServiceProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveOrderServiceProtocol)];
  48 + [service pushToAddressViewController];
  49 + }else if (button.tag - 200 == 1){
  50 + id<CNLiveOrderServiceProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveOrderServiceProtocol)];
  51 + [service pushToGiftBoxViewController];
  52 + }
  53 +
  54 + }else {
  55 +
34 56 if ((button.tag - 100) == 4) {
35   -// CNLiveRefundController *refundVc = [[CNLiveRefundController alloc]init];
36   -// [self.navigationController pushViewController:refundVc animated:YES];
37   -// id<CNLiveOrderServiceProtocol> service = [[BeeHive shareInstance]createService:@protocol(CNLiveOrderServiceProtocol)];
38   -// [service pushToRefundViewController:0];
39   - id<CNLiveOrderServiceProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveOrderServiceProtocol)];
40   - [service pushToAddressViewController];
  57 +
  58 + id<CNLiveOrderServiceProtocol> service = [[BeeHive shareInstance]createService:@protocol(CNLiveOrderServiceProtocol)];
  59 + [service pushToRefundViewController:0];
  60 +
41 61 }else {
42 62 id<CNLiveOrderServiceProtocol> service = [[BeeHive shareInstance]createService:@protocol(CNLiveOrderServiceProtocol)];
43 63 [service pushToOrderViewController:button.tag - 100];
44 64 }
  65 + }
45 66  
  67 +// UIImage *iamage = [self getImageWithImageName:@"aaa" bundle:@"'MyOrderModule.bundle/MyOrderModule" targetClass:[self class]];
  68 +}
  69 +- (UIImage *)getImageWithImageName:(NSString *)imageName bundle:(NSString *)bundleName targetClass:(Class)targetClass{
  70 + NSInteger scale = [[UIScreen mainScreen]scale];
  71 + NSBundle *bundle = [NSBundle bundleForClass:targetClass];
  72 + NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"];
  73 + NSBundle *targetBundle = [NSBundle bundleWithURL:url];
  74 + NSString *imgName = [NSString stringWithFormat:@"%@@%zdx.png",imageName,scale];
  75 + UIImage *image = [UIImage imageNamed:imgName inBundle:targetBundle compatibleWithTraitCollection:nil];
  76 + return (image)? (image):(([UIImage imageNamed:imgName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil])?([UIImage imageNamed:imgName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil]):([UIImage new]));
46 77 }
47   -
48 78 - (void)didReceiveMemoryWarning
49 79 {
50 80 [super didReceiveMemoryWarning];
... ...
Example/Podfile
... ... @@ -5,17 +5,8 @@ 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'
16   -# pod 'CNLiveBeeHive'
17   -# pod 'CNLiveServices'
18   -# pod 'CNLiveEnvironment'
  8 +
  9 +pod 'CNLiveNavigationClass'
19 10 pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
20 11 end
21 12 target 'CNLiveMyOrderModule_Tests' do
... ...