Commit 2f88385141f0b0063f1410711f9fb954a3a90f4a

Authored by liushiyu
1 parent dfeb3f64

0.2.3

CNLiveCommuntyModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveCommuntyModule' 10 s.name = 'CNLiveCommuntyModule'
11 - s.version = '0.2.2' 11 + s.version = '0.2.3'
12 s.summary = 'A short description of CNLiveCommuntyModule.' 12 s.summary = 'A short description of CNLiveCommuntyModule.'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveCommuntyModule/Classes/Core/CNLiveCommunitHeader.h
@@ -63,4 +63,6 @@ static NSString *const kCNLiveCommuntyNBhdInfoIdentifier = @"kCNLiveCommuntyNBhd @@ -63,4 +63,6 @@ static NSString *const kCNLiveCommuntyNBhdInfoIdentifier = @"kCNLiveCommuntyNBhd
63 static NSString *const kCNLiveCommuntySaveChangeUserInfoNotification = @"kCNLiveCommuntySaveChangeUserInfoNotification"; 63 static NSString *const kCNLiveCommuntySaveChangeUserInfoNotification = @"kCNLiveCommuntySaveChangeUserInfoNotification";
64 64
65 #define isDemo [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] isEqualToString:@"org.cocoapods.demo.CNLiveCommuntyModule-Example"] 65 #define isDemo [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] isEqualToString:@"org.cocoapods.demo.CNLiveCommuntyModule-Example"]
  66 +
  67 +
66 #endif /* CNLiveCommunitHeader_h */ 68 #endif /* CNLiveCommunitHeader_h */
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.m
@@ -1234,7 +1234,6 @@ @@ -1234,7 +1234,6 @@
1234 [_moreButton setTitleColor:UIColorHex(#C8C8C8) forState:UIControlStateNormal]; 1234 [_moreButton setTitleColor:UIColorHex(#C8C8C8) forState:UIControlStateNormal];
1235 [_moreButton setImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_communt_list_more"] forState:UIControlStateNormal]; 1235 [_moreButton setImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_communt_list_more"] forState:UIControlStateNormal];
1236 _moreButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight; 1236 _moreButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
1237 - _moreButton.titleLabel.font = [UIFont systemFontOfSize:14.0f];  
1238 _moreButton.imagePosition = QMUIButtonImagePositionRight; 1237 _moreButton.imagePosition = QMUIButtonImagePositionRight;
1239 _moreButton.spacingBetweenImageAndTitle = 2.5; 1238 _moreButton.spacingBetweenImageAndTitle = 2.5;
1240 _moreButton.userInteractionEnabled = NO; 1239 _moreButton.userInteractionEnabled = NO;
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntListViewController.m
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 self.view.backgroundColor = UIColorHex(#F9F9F9); 54 self.view.backgroundColor = UIColorHex(#F9F9F9);
55 self.dataArray = [[NSMutableArray alloc] init]; 55 self.dataArray = [[NSMutableArray alloc] init];
56 [self addRefreshMainView]; 56 [self addRefreshMainView];
57 - if (self.showType == CNLiveCommuntListShowTypePayCost) self.title = @"物业缴费"; 57 + if (self.showType == CNLiveCommuntListShowTypePayCost) self.title = @"缴费记录";
58 58
59 } 59 }
60 60
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntPaycostViewController.m
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 #import "CNLiveCommuntPaycostViewController.h" 8 #import "CNLiveCommuntPaycostViewController.h"
9 #import "CNLiveCommuntSignUpView.h" 9 #import "CNLiveCommuntSignUpView.h"
10 #import "CNLiveCommuntyResultViewController.h" 10 #import "CNLiveCommuntyResultViewController.h"
11 -@interface CNLiveCommuntPaycostViewController () 11 +@interface CNLiveCommuntPaycostViewController ()<DZNEmptyDataSetSource,DZNEmptyDataSetDelegate>
12 @property (nonatomic, strong) CNLiveCommuntyActivityPaycostListModel * detailModel; 12 @property (nonatomic, strong) CNLiveCommuntyActivityPaycostListModel * detailModel;
13 @property (nonatomic, copy) NSString * payCostId; 13 @property (nonatomic, copy) NSString * payCostId;
14 @property (nonatomic, strong) NSMutableArray * dataArray; 14 @property (nonatomic, strong) NSMutableArray * dataArray;
@@ -60,13 +60,21 @@ @@ -60,13 +60,21 @@
60 [weakSelf.dataArray addObject:@{@"key":@"缴费人",@"value":[detailModel.payerName isNotBlank]?detailModel.payerName:@""}]; 60 [weakSelf.dataArray addObject:@{@"key":@"缴费人",@"value":[detailModel.payerName isNotBlank]?detailModel.payerName:@""}];
61 } 61 }
62 [weakSelf.tableView reloadData]; 62 [weakSelf.tableView reloadData];
  63 +
  64 +// weakSelf.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"电子回执单" style:UIBarButtonItemStylePlain target:self action:@selector(clickWithRightBarButton:)];
63 }]; 65 }];
64 } 66 }
  67 +-(void)clickWithRightBarButton:(UIBarButtonItem *)button
  68 +{
  69 + NSLog(@"电子回执单");
  70 +}
65 - (void)initTableView 71 - (void)initTableView
66 { 72 {
67 [super initTableView]; 73 [super initTableView];
68 self.tableView.delegate = self; 74 self.tableView.delegate = self;
69 self.tableView.dataSource = self; 75 self.tableView.dataSource = self;
  76 + self.tableView.emptyDataSetSource = self;
  77 + self.tableView.emptyDataSetDelegate = self;
70 self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; 78 self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
71 self.tableView.separatorInset = UIEdgeInsetsMake(0, 10, 0, 10); 79 self.tableView.separatorInset = UIEdgeInsetsMake(0, 10, 0, 10);
72 self.tableView.tableFooterView = [[UIView alloc] init]; 80 self.tableView.tableFooterView = [[UIView alloc] init];
@@ -94,10 +102,10 @@ @@ -94,10 +102,10 @@
94 phoneLabel.hidden = ![listModel.propertyPhone isNotBlank]; 102 phoneLabel.hidden = ![listModel.propertyPhone isNotBlank];
95 phoneLabel.backgroundColor = [UIColor whiteColor]; 103 phoneLabel.backgroundColor = [UIColor whiteColor];
96 104
97 - NSString * string = [NSString stringWithFormat:@"物业电话 %@",listModel.propertyPhone]; 105 + NSString * string = [NSString stringWithFormat:@"物业电话%@",listModel.propertyPhone];
98 NSMutableAttributedString *textAttributedString = [[NSMutableAttributedString alloc] initWithString:string]; 106 NSMutableAttributedString *textAttributedString = [[NSMutableAttributedString alloc] initWithString:string];
99 textAttributedString.yy_font = [UIFont systemFontOfSize:10]; 107 textAttributedString.yy_font = [UIFont systemFontOfSize:10];
100 - textAttributedString.yy_color = UIColorHex(#B4B4B4); 108 + textAttributedString.yy_color = UIColorHex(#0091FF);
101 textAttributedString.yy_alignment = NSTextAlignmentCenter; 109 textAttributedString.yy_alignment = NSTextAlignmentCenter;
102 [textAttributedString yy_setTextHighlightRange:[string rangeOfString:listModel.propertyPhone] 110 [textAttributedString yy_setTextHighlightRange:[string rangeOfString:listModel.propertyPhone]
103 color:[UIColor qmui_colorWithHexString:@"0091FF"] 111 color:[UIColor qmui_colorWithHexString:@"0091FF"]
@@ -141,6 +149,49 @@ @@ -141,6 +149,49 @@
141 [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:orderId price:weakSelf.detailModel.totalFee body:[weakSelf.detailModel.propertyName isNotBlank]?weakSelf.detailModel.propertyName:@"物业缴费" NotifyUrl:cn_API_CommuntyApi(@"/housePropertyFeeApi/housePropertyFeeOrderNotify")]; 149 [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:orderId price:weakSelf.detailModel.totalFee body:[weakSelf.detailModel.propertyName isNotBlank]?weakSelf.detailModel.propertyName:@"物业缴费" NotifyUrl:cn_API_CommuntyApi(@"/housePropertyFeeApi/housePropertyFeeOrderNotify")];
142 }]; 150 }];
143 } 151 }
  152 +#pragma mark - DZNEmptyDataSetSource Methods
  153 +- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
  154 +{
  155 +
  156 + return [[NSAttributedString alloc] initWithString:@"暂无物业缴费详情" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]}];
  157 +}
  158 +-(UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
  159 +{
  160 + return [CNLiveCommuntTools cCommunt_setImageWithName:@"c_community_content_empty"];
  161 +}
  162 +- (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView
  163 +{
  164 + return [UIColor whiteColor];
  165 +}
  166 +- (NSAttributedString *)buttonTitleForEmptyDataSet:(UIScrollView *)scrollView forState:(UIControlState)state
  167 +{
  168 +
  169 + return [[NSAttributedString alloc] initWithString:@"重试" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:UIColorHex(#CD0302)}];
  170 +
  171 +}
  172 +- (void)emptyDataSet:(UIScrollView *)scrollView didTapButton:(UIButton *)button
  173 +{
  174 + [self loadData];
  175 +}
  176 +- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView
  177 +{
  178 + return 0;
  179 +}
  180 +
  181 +- (BOOL)emptyDataSetShouldDisplay:(UIScrollView *)scrollView
  182 +{
  183 + return YES;
  184 +}
  185 +
  186 +- (BOOL)emptyDataSetShouldAllowTouch:(UIScrollView *)scrollView
  187 +{
  188 + return YES;
  189 +}
  190 +
  191 +- (BOOL)emptyDataSetShouldAllowScroll:(UIScrollView *)scrollView
  192 +{
  193 + return NO;
  194 +}
144 #pragma mark = 195 #pragma mark =
145 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 196 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
146 { 197 {
CNLiveCommuntyModule/Classes/ViewModel/CNLiveCommuntViewModel.m
@@ -663,7 +663,7 @@ @@ -663,7 +663,7 @@
663 CNLiveCommuntyActivityPaycostListModel * detailModel = [CNLiveCommuntyActivityPaycostListModel mj_objectWithKeyValues:responseObject]; 663 CNLiveCommuntyActivityPaycostListModel * detailModel = [CNLiveCommuntyActivityPaycostListModel mj_objectWithKeyValues:responseObject];
664 if (completerBlock) completerBlock(detailModel); 664 if (completerBlock) completerBlock(detailModel);
665 }else{ 665 }else{
666 - if (completerBlock) completerBlock(nil); 666 +// if (completerBlock) completerBlock(nil);
667 } 667 }
668 }]; 668 }];
669 }]; 669 }];
Example/CNLiveCommuntyModule/CNLIVEViewController.m
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 #import <CNLiveEnvironment/CNLiveEnvironment.h> 32 #import <CNLiveEnvironment/CNLiveEnvironment.h>
33 #import <CNLiveUserManagement/CNUserInfoManager.h> 33 #import <CNLiveUserManagement/CNUserInfoManager.h>
34 #import <CNLiveRequestBastKit/CNLiveNetworking.h> 34 #import <CNLiveRequestBastKit/CNLiveNetworking.h>
35 -@interface CNLIVEViewController ()<UITableViewDelegate,UITableViewDataSource> 35 +@interface CNLIVEViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
36 @property (nonatomic, strong) UITableView * tableView; 36 @property (nonatomic, strong) UITableView * tableView;
37 @property (nonatomic, strong) NSMutableArray * dataArray; 37 @property (nonatomic, strong) NSMutableArray * dataArray;
38 @property (nonatomic, assign) BOOL isChange; 38 @property (nonatomic, assign) BOOL isChange;
@@ -63,6 +63,9 @@ @@ -63,6 +63,9 @@
63 // // Fallback on earlier versions 63 // // Fallback on earlier versions
64 // self.automaticallyAdjustsScrollViewInsets = NO; 64 // self.automaticallyAdjustsScrollViewInsets = NO;
65 // } 65 // }
  66 +
  67 +
  68 +
66 } 69 }
67 - (void)viewDidLoad 70 - (void)viewDidLoad
68 { 71 {
@@ -74,18 +77,32 @@ @@ -74,18 +77,32 @@
74 make.edges.mas_equalTo(self.view); 77 make.edges.mas_equalTo(self.view);
75 }]; 78 }];
76 79
77 - __block NSArray * array = @[@"123",@"123",@"123",@"123",@"123",@"123"];  
78 - __block NSMutableString *picString = [[NSMutableString alloc] init];  
79 - [array enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {  
80 - [picString appendString:obj];  
81 - if (array.count != idx+1) [picString appendString:@","];  
82 - }];  
83 - NSLog(@"===>%@",picString);  
84 - NSString * oldValue = @"1";  
85 - oldValue = [NSString stringWithFormat:@"%.2f",[oldValue floatValue]/100];  
86 - float unitPrice = [oldValue floatValue];  
87 - NSString * p = [NSString stringWithFormat:@"合计: ¥%.2f",(8 * unitPrice)];  
88 - NSLog(@"%@ =>%f ==>%@",oldValue,unitPrice,p); 80 + int h = 23;//小时数
  81 + float mun = 61245.98;//3月累计
  82 + float s = ((21 * 91.954) + 16400);//四月前累计
  83 + float w = ((h * 91.954) + 16400);//五月前累计
  84 + float kou = 2276.25 + 5000 + 1500 + 400;//每月扣
  85 +
  86 + float z = (w + s + mun) - (kou * 5);
  87 + float sui = (z * 0.1) - 2520 - 1767.20;
  88 + NSLog(@"税=>%.2f",sui);
  89 + float dao = w - 2276.25 - sui;
  90 + NSLog(@"到=>%.2f",dao);
  91 +
  92 +
  93 +
  94 +// __block NSArray * array = @[@"123",@"123",@"123",@"123",@"123",@"123"];
  95 +// __block NSMutableString *picString = [[NSMutableString alloc] init];
  96 +// [array enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
  97 +// [picString appendString:obj];
  98 +// if (array.count != idx+1) [picString appendString:@","];
  99 +// }];
  100 +// NSLog(@"===>%@",picString);
  101 +// NSString * oldValue = @"1";
  102 +// oldValue = [NSString stringWithFormat:@"%.2f",[oldValue floatValue]/100];
  103 +// float unitPrice = [oldValue floatValue];
  104 +// NSString * p = [NSString stringWithFormat:@"合计: ¥%.2f",(8 * unitPrice)];
  105 +// NSLog(@"%@ =>%f ==>%@",oldValue,unitPrice,p);
89 } 106 }
90 107
91 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 108 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView