Commit d9d044b0cbe2c3da4490f4625bf247b50b7dc160

Authored by liushiyu
1 parent cff85fea

0.2.1

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.0' 11 + s.version = '0.2.1'
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/CNLiveCommunitModuleProtocol.h
@@ -27,7 +27,8 @@ NS_ASSUME_NONNULL_BEGIN @@ -27,7 +27,8 @@ NS_ASSUME_NONNULL_BEGIN
27 /// @param orderId 订单id 27 /// @param orderId 订单id
28 /// @param price 价格 28 /// @param price 价格
29 /// @param body 支付名 29 /// @param body 支付名
30 --(void)pushMainProjectWithPayManagerWithOrderId:(NSString *)orderId price:(NSString *)price body:(NSString *)body; 30 +/// @param notifyUrl 授权回调地址
  31 +-(void)pushMainProjectWithPayManagerWithOrderId:(NSString *)orderId price:(NSString *)price body:(NSString *)body NotifyUrl:(NSString *)notifyUrl;
31 32
32 33
33 /// 获取主工程的视讯相关界面逻辑 34 /// 获取主工程的视讯相关界面逻辑
CNLiveCommuntyModule/Classes/Core/CNLiveCommuntyModule.h
@@ -39,6 +39,10 @@ static NSString *const kCNLiveHiddenModalViewWithQrNotification = @"kCNLiveHidde @@ -39,6 +39,10 @@ static NSString *const kCNLiveHiddenModalViewWithQrNotification = @"kCNLiveHidde
39 /// 跳转到报修编辑界面 39 /// 跳转到报修编辑界面
40 /// @param nbhdId 小区id 40 /// @param nbhdId 小区id
41 -(void)pushCommuntyRepairEditWithNBhdId:(NSString *)nbhdId; 41 -(void)pushCommuntyRepairEditWithNBhdId:(NSString *)nbhdId;
  42 +
  43 +/// 跳转到支付结果界面
  44 +/// @param status 支付结果
  45 +-(void)pushCommuntyPayCostResultWithStatus:(BOOL)status;
42 @end 46 @end
43 47
44 NS_ASSUME_NONNULL_END 48 NS_ASSUME_NONNULL_END
CNLiveCommuntyModule/Classes/Core/CNLiveCommuntyModule.m
@@ -98,4 +98,13 @@ @@ -98,4 +98,13 @@
98 CNLiveCommuntInformViewController * informView = [[CNLiveCommuntInformViewController alloc] initWithNBhdId:nbhdId]; 98 CNLiveCommuntInformViewController * informView = [[CNLiveCommuntInformViewController alloc] initWithNBhdId:nbhdId];
99 [[self displayViewController] dsPushViewController:informView animated:YES]; 99 [[self displayViewController] dsPushViewController:informView animated:YES];
100 } 100 }
  101 +
  102 +
  103 +/// 跳转到支付结果界面
  104 +/// @param status 支付结果
  105 +-(void)pushCommuntyPayCostResultWithStatus:(BOOL)status
  106 +{
  107 + CNLiveCommuntyResultViewController * resultView = [[CNLiveCommuntyResultViewController alloc] initWithStatus:status];
  108 + [[self displayViewController] dsPushViewController:resultView animated:YES];
  109 +}
101 @end 110 @end
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.h
@@ -125,6 +125,21 @@ NS_ASSUME_NONNULL_BEGIN @@ -125,6 +125,21 @@ NS_ASSUME_NONNULL_BEGIN
125 @property (nonatomic, copy) NSString *createId; 125 @property (nonatomic, copy) NSString *createId;
126 @end 126 @end
127 127
  128 +/// 物业缴费model
  129 +@interface CNLiveCommuntyActivityPaycostListModel : NSObject
  130 +@property (nonatomic, copy) NSString *idStr;
  131 +@property (nonatomic, copy) NSString *locality;
  132 +/**0未缴费 1已缴费*/
  133 +@property (nonatomic, copy) NSString *payStatus;
  134 +@property (nonatomic, copy) NSString *totalFee;
  135 +@property (nonatomic, copy) NSString *payerName;
  136 +@property (nonatomic, strong) NSNumber *beginTime;
  137 +@property (nonatomic, strong) NSNumber *endTime;
  138 +@property (nonatomic, strong) NSNumber *payTime;
  139 +/**收费单位*/
  140 +@property (nonatomic, copy) NSString *propertyName;
  141 +@end
  142 +
128 @interface CNLiveCommuntyActivityMaintainsListModel : NSObject 143 @interface CNLiveCommuntyActivityMaintainsListModel : NSObject
129 @property (nonatomic, copy) NSString *idStr; 144 @property (nonatomic, copy) NSString *idStr;
130 @property (nonatomic, copy) NSString *name; 145 @property (nonatomic, copy) NSString *name;
CNLiveCommuntyModule/Classes/Model/CNLiveCommuntyHomeModel.m
@@ -172,6 +172,54 @@ MJCodingImplementation @@ -172,6 +172,54 @@ MJCodingImplementation
172 172
173 @end 173 @end
174 174
  175 +@implementation CNLiveCommuntyActivityPaycostListModel
  176 +
  177 +MJCodingImplementation
  178 +
  179 ++ (NSDictionary *)mj_replacedKeyFromPropertyName
  180 +{
  181 + return @{@"idStr":@"id"};
  182 +}
  183 +//- (void)mj_didConvertToObjectWithKeyValues:(NSDictionary *)keyValues
  184 +//{
  185 +//
  186 +//
  187 +// NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  188 +// [dateFormatter setDateFormat:@"yyyy-MM"];
  189 +//
  190 +// NSNumber * beginTime = [keyValues numberValueForKey:@"beginTime" default:@0];
  191 +// NSDate *detaildate_beginTime = [NSDate dateWithTimeIntervalSince1970:([beginTime doubleValue]/1000)];
  192 +// self.beginTimeString = [dateFormatter stringFromDate:detaildate_beginTime];
  193 +//
  194 +// NSNumber * endTime = [keyValues numberValueForKey:@"endTime" default:@0];
  195 +// NSDate *detaildate_endTime = [NSDate dateWithTimeIntervalSince1970:([endTime doubleValue]/1000)];
  196 +// self.endTimeString = [dateFormatter stringFromDate:detaildate_endTime];
  197 +// NSLog(@"%@",keyValues);
  198 +//}
  199 +- (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
  200 +{
  201 + BOOL isNULL = [oldValue isKindOfClass:NSNull.class] || oldValue == nil;
  202 + oldValue = [NSString stringWithFormat:@"%@",isNULL?@"":oldValue];
  203 + if ([property.name isEqualToString:@"totalFee"]) {
  204 + oldValue = [NSString stringWithFormat:@"%.2f",[oldValue floatValue]/100];
  205 + }
  206 +// if ([property.name isEqualToString:@"beginTime"]) {
  207 +// NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  208 +// NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  209 +// [dateFormatter setDateFormat:@"yyyy-MM"];
  210 +// self.beginTimeString = [dateFormatter stringFromDate:detaildate];
  211 +// }
  212 +// if ([property.name isEqualToString:@"endTime"]) {
  213 +// NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:([oldValue doubleValue]/1000)];
  214 +// NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  215 +// [dateFormatter setDateFormat:@"yyyy-MM"];
  216 +// self.endTimeString = [dateFormatter stringFromDate:detaildate];
  217 +// }
  218 + return oldValue;
  219 +}
  220 +
  221 +@end
  222 +
175 @implementation CNLiveCommuntyActivityMaintainsListModel 223 @implementation CNLiveCommuntyActivityMaintainsListModel
176 MJCodingImplementation 224 MJCodingImplementation
177 225
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.h
@@ -131,4 +131,31 @@ NS_ASSUME_NONNULL_BEGIN @@ -131,4 +131,31 @@ NS_ASSUME_NONNULL_BEGIN
131 131
132 @end 132 @end
133 133
  134 +@interface CNLiveCommuntPayCostListViewCell : UITableViewCell
  135 +@property (nonatomic, strong) UIView * mainView;
  136 +@property (nonatomic, strong) UILabel * nameLabel;
  137 +@property (nonatomic, strong) UILabel * timeLabel;
  138 +@property (nonatomic, strong) QMUIButton * moreButton;
  139 +@property (nonatomic, strong) UILabel * lineLabel;
  140 +@property (nonatomic, strong) UILabel * priceLabel;
  141 +
  142 +@property (nonatomic, strong) CNLiveCommuntyActivityPaycostListModel * payModel;
  143 +
  144 ++(CNLiveCommuntPayCostListViewCell *)setTableView:(UITableView *)tableView payCostModel:(CNLiveCommuntyActivityPaycostListModel *)payModel;
  145 +@end
  146 +
  147 +@interface CNLiveCommuntPayCostDetailViewCell : UITableViewCell
  148 +@property (nonatomic, strong) UIView * mainView;
  149 +@property (nonatomic, strong) UILabel * nameLabel;
  150 +@property (nonatomic, strong) UILabel * descLabel;
  151 +
  152 +/// 数据源
  153 +@property (nonatomic, strong) NSDictionary * paramDict;
  154 +
  155 +/// 初始化界面显示
  156 +/// @param tableView tableView
  157 +/// @param paramDict 数据源
  158 ++(CNLiveCommuntPayCostDetailViewCell *)setTableView:(UITableView *)tableView ParamDict:(NSDictionary *)paramDict;
  159 +@end
  160 +
134 NS_ASSUME_NONNULL_END 161 NS_ASSUME_NONNULL_END
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.m
@@ -1110,3 +1110,233 @@ @@ -1110,3 +1110,233 @@
1110 return _bottemLabel; 1110 return _bottemLabel;
1111 } 1111 }
1112 @end 1112 @end
  1113 +
  1114 +@implementation CNLiveCommuntPayCostListViewCell
  1115 +
  1116 ++(CNLiveCommuntPayCostListViewCell *)setTableView:(UITableView *)tableView payCostModel:(nonnull CNLiveCommuntyActivityPaycostListModel *)payModel
  1117 +{
  1118 + CNLiveCommuntPayCostListViewCell * textCell = [tableView dequeueReusableCellWithIdentifier:@"CNLiveCommuntPayCostListViewCell"];
  1119 + if (!textCell) {
  1120 + textCell = [[CNLiveCommuntPayCostListViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CNLiveCommuntPayCostListViewCell"];
  1121 + }
  1122 + textCell.payModel = payModel;
  1123 + return textCell;
  1124 +}
  1125 +
  1126 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  1127 +{
  1128 + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  1129 + self.contentView.backgroundColor = [UIColor clearColor];
  1130 + self.selectionStyle = UITableViewCellSelectionStyleNone;
  1131 + self.backgroundColor = [UIColor clearColor];
  1132 + [self.contentView addSubview:self.mainView];
  1133 + [self.mainView addSubview:self.nameLabel];
  1134 + [self.mainView addSubview:self.timeLabel];
  1135 +
  1136 + [self.mainView addSubview:self.moreButton];
  1137 + [self.mainView addSubview:self.lineLabel];
  1138 + [self.mainView addSubview:self.priceLabel];
  1139 +
  1140 + }
  1141 + return self;
  1142 +}
  1143 +-(void)setPayModel:(CNLiveCommuntyActivityPaycostListModel *)payModel
  1144 +{
  1145 + _payModel = payModel;
  1146 + self.nameLabel.text = payModel.locality;
  1147 +
  1148 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  1149 + [dateFormatter setDateFormat:@"yyyy/MM"];
  1150 + NSDate *detaildate_beginTime = [NSDate dateWithTimeIntervalSince1970:([payModel.beginTime doubleValue]/1000)];
  1151 + NSDate *detaildate_endTime = [NSDate dateWithTimeIntervalSince1970:([payModel.endTime doubleValue]/1000)];
  1152 + self.timeLabel.text = [NSString stringWithFormat:@"%@~%@",[dateFormatter stringFromDate:detaildate_beginTime],[dateFormatter stringFromDate:detaildate_endTime]];
  1153 + self.lineLabel.hidden = [payModel.payStatus isEqualToString:@"1"];
  1154 + self.priceLabel.hidden = [payModel.payStatus isEqualToString:@"1"];
  1155 + self.priceLabel.text = [NSString stringWithFormat:@"待缴金额:¥%@",payModel.totalFee];
  1156 +}
  1157 +-(void)layoutSubviews
  1158 +{
  1159 + [super layoutSubviews];
  1160 + __weak typeof(self) weakSelf = self;
  1161 + [self.mainView mas_makeConstraints:^(MASConstraintMaker *make) {
  1162 + make.top.left.mas_equalTo(weakSelf.contentView).offset(10);
  1163 + make.bottom.right.mas_equalTo(weakSelf.contentView).offset(-10);
  1164 + }];
  1165 + [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  1166 + make.top.mas_equalTo(weakSelf.mainView.mas_top).offset(10);
  1167 + make.left.mas_equalTo(weakSelf.mainView.mas_left).offset(10);
  1168 + make.right.mas_equalTo(weakSelf.mainView.mas_right).offset(-30);
  1169 + }];
  1170 + [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  1171 + make.top.mas_equalTo(weakSelf.nameLabel.mas_bottom).offset(10);
  1172 + make.left.mas_equalTo(weakSelf.mainView.mas_left).offset(10);
  1173 + }];
  1174 + [self.moreButton mas_makeConstraints:^(MASConstraintMaker *make) {
  1175 + make.centerY.mas_equalTo(weakSelf.nameLabel);
  1176 + make.right.mas_equalTo(weakSelf.mainView.mas_right).offset(-5);
  1177 + make.width.mas_equalTo(20);
  1178 + make.height.mas_equalTo(30);
  1179 + }];
  1180 + [self.lineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  1181 + make.left.mas_equalTo(weakSelf.mainView.mas_left).offset(10);
  1182 + make.right.mas_equalTo(weakSelf.mainView.mas_right).offset(-10);
  1183 + make.top.mas_equalTo(weakSelf.timeLabel.mas_bottom).offset(10);
  1184 + make.height.mas_equalTo(0.5);
  1185 + }];
  1186 + [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  1187 + make.top.mas_equalTo(weakSelf.lineLabel.mas_bottom).offset(10);
  1188 + make.left.mas_equalTo(weakSelf.mainView.mas_left).offset(10);
  1189 + }];
  1190 +}
  1191 +
  1192 +-(UIView *)mainView
  1193 +{
  1194 + if (!_mainView) {
  1195 + _mainView = [[UIView alloc] init];
  1196 + _mainView.backgroundColor = [UIColor whiteColor];
  1197 + _mainView.layer.masksToBounds = YES;
  1198 + _mainView.layer.cornerRadius = 5;
  1199 + }
  1200 + return _mainView;
  1201 +}
  1202 +-(UILabel *)nameLabel
  1203 +{
  1204 + if (!_nameLabel) {
  1205 + _nameLabel = [[UILabel alloc] init];
  1206 + _nameLabel.textColor = UIColorHex(#333333);
  1207 + _nameLabel.numberOfLines = 1;
  1208 + _nameLabel.lineBreakMode = NSLineBreakByTruncatingTail;
  1209 + _nameLabel.backgroundColor = [UIColor whiteColor];
  1210 + _nameLabel.textAlignment = NSTextAlignmentLeft;
  1211 + _nameLabel.font = [UIFont systemFontOfSize:15];
  1212 + _nameLabel.font = [UIFont boldSystemFontOfSize:15];
  1213 +
  1214 + }
  1215 + return _nameLabel;
  1216 +}
  1217 +-(UILabel *)timeLabel
  1218 +{
  1219 + if (!_timeLabel) {
  1220 + _timeLabel = [[UILabel alloc] init];
  1221 + _timeLabel.textColor = UIColorHex(#999999);
  1222 + _timeLabel.numberOfLines = 1;
  1223 + _timeLabel.backgroundColor = [UIColor whiteColor];
  1224 + _timeLabel.textAlignment = NSTextAlignmentLeft;
  1225 + _timeLabel.font = [UIFont systemFontOfSize:12];
  1226 +
  1227 + }
  1228 + return _timeLabel;
  1229 +}
  1230 +-(QMUIButton *)moreButton
  1231 +{
  1232 + if (!_moreButton) {
  1233 + _moreButton = [[QMUIButton alloc] init];
  1234 + [_moreButton setTitleColor:UIColorHex(#C8C8C8) forState:UIControlStateNormal];
  1235 + [_moreButton setImage:[CNLiveCommuntTools cCommunt_setImageWithName:@"c_communt_list_more"] forState:UIControlStateNormal];
  1236 + _moreButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
  1237 + _moreButton.titleLabel.font = [UIFont systemFontOfSize:14.0f];
  1238 + _moreButton.imagePosition = QMUIButtonImagePositionRight;
  1239 + _moreButton.spacingBetweenImageAndTitle = 2.5;
  1240 + _moreButton.userInteractionEnabled = NO;
  1241 + }
  1242 + return _moreButton;
  1243 +}
  1244 +-(UILabel *)lineLabel
  1245 +{
  1246 + if (!_lineLabel) {
  1247 + _lineLabel = [[UILabel alloc] init];
  1248 + _lineLabel.backgroundColor = UIColorHex(#E6E6E6);
  1249 + _lineLabel.hidden = YES;
  1250 + }
  1251 + return _lineLabel;
  1252 +}
  1253 +-(UILabel *)priceLabel
  1254 +{
  1255 + if (!_priceLabel) {
  1256 + _priceLabel = [[UILabel alloc] init];
  1257 + _priceLabel.textColor = UIColorHex(#FD862E);
  1258 + _priceLabel.lineBreakMode = NSLineBreakByTruncatingTail;
  1259 + _priceLabel.numberOfLines = 1;
  1260 + _priceLabel.font = [UIFont systemFontOfSize:18];
  1261 + _priceLabel.font = [UIFont boldSystemFontOfSize:18];
  1262 + _priceLabel.hidden = YES;
  1263 + }
  1264 + return _priceLabel;
  1265 +}
  1266 +@end
  1267 +
  1268 +@implementation CNLiveCommuntPayCostDetailViewCell
  1269 +
  1270 ++(CNLiveCommuntPayCostDetailViewCell *)setTableView:(UITableView *)tableView ParamDict:(NSDictionary *)paramDict
  1271 +{
  1272 + CNLiveCommuntPayCostDetailViewCell * textCell = [tableView dequeueReusableCellWithIdentifier:@"CNLiveCommuntPayCostDetailViewCell"];
  1273 + if (!textCell) {
  1274 + textCell = [[CNLiveCommuntPayCostDetailViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CNLiveCommuntPayCostDetailViewCell"];
  1275 + }
  1276 + textCell.paramDict = paramDict;
  1277 + return textCell;
  1278 +}
  1279 +
  1280 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  1281 +{
  1282 + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  1283 + self.contentView.backgroundColor = [UIColor clearColor];
  1284 + self.selectionStyle = UITableViewCellSelectionStyleNone;
  1285 + self.backgroundColor = [UIColor clearColor];
  1286 + [self.contentView addSubview:self.nameLabel];
  1287 + [self.contentView addSubview:self.descLabel];
  1288 + }
  1289 + return self;
  1290 +}
  1291 +-(void)layoutSubviews
  1292 +{
  1293 + [super layoutSubviews];
  1294 + __weak typeof(self) weakSelf = self;
  1295 + [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  1296 + make.centerY.mas_equalTo(weakSelf.contentView);
  1297 + make.left.mas_equalTo(weakSelf.contentView.mas_left).offset(10);
  1298 + }];
  1299 + [self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  1300 + make.centerY.mas_equalTo(weakSelf.contentView);
  1301 + make.left.mas_equalTo(weakSelf.nameLabel.mas_right).offset(10);
  1302 + make.right.mas_equalTo(weakSelf.contentView.mas_right).offset(-10);
  1303 + }];
  1304 +}
  1305 +
  1306 +-(void)setParamDict:(NSDictionary *)paramDict
  1307 +{
  1308 + _paramDict = paramDict;
  1309 + _nameLabel.text = [paramDict stringValueForKey:@"key" default:@""];
  1310 + _descLabel.text = [paramDict stringValueForKey:@"value" default:@""];
  1311 +}
  1312 +
  1313 +-(UILabel *)nameLabel
  1314 +{
  1315 + if (!_nameLabel) {
  1316 + _nameLabel = [[UILabel alloc] init];
  1317 + _nameLabel.textColor = UIColorHex(#333333);
  1318 + _nameLabel.numberOfLines = 1;
  1319 + _nameLabel.lineBreakMode = NSLineBreakByTruncatingTail;
  1320 + _nameLabel.backgroundColor = [UIColor whiteColor];
  1321 + _nameLabel.textAlignment = NSTextAlignmentLeft;
  1322 + _nameLabel.font = [UIFont systemFontOfSize:15];
  1323 + _nameLabel.font = [UIFont boldSystemFontOfSize:15];
  1324 + }
  1325 + return _nameLabel;
  1326 +}
  1327 +
  1328 +-(UILabel *)descLabel
  1329 +{
  1330 + if (!_descLabel) {
  1331 + _descLabel = [[UILabel alloc] init];
  1332 + _descLabel.textColor = UIColorHex(#333333);
  1333 + _descLabel.numberOfLines = 1;
  1334 + _descLabel.lineBreakMode = NSLineBreakByTruncatingTail;
  1335 + _descLabel.backgroundColor = [UIColor whiteColor];
  1336 + _descLabel.textAlignment = NSTextAlignmentLeft;
  1337 + _descLabel.font = [UIFont systemFontOfSize:14];
  1338 + _descLabel.font = [UIFont boldSystemFontOfSize:14];
  1339 + }
  1340 + return _descLabel;
  1341 +}
  1342 +@end
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntListViewController.m
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 // 6 //
7 7
8 #import "CNLiveCommuntListViewController.h" 8 #import "CNLiveCommuntListViewController.h"
9 - 9 +#import "CNLiveCommuntPaycostViewController.h"
10 #import "CNLiveCommuntSignUpViewController.h" 10 #import "CNLiveCommuntSignUpViewController.h"
11 @interface CNLiveCommuntListViewController ()<DZNEmptyDataSetSource,DZNEmptyDataSetDelegate> 11 @interface CNLiveCommuntListViewController ()<DZNEmptyDataSetSource,DZNEmptyDataSetDelegate>
12 @property (nonatomic, assign) CNLiveCommuntListShowType showType; 12 @property (nonatomic, assign) CNLiveCommuntListShowType showType;
@@ -54,6 +54,7 @@ @@ -54,6 +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 +
57 } 58 }
58 59
59 -(void)addRefreshMainView 60 -(void)addRefreshMainView
@@ -106,6 +107,10 @@ @@ -106,6 +107,10 @@
106 make.left.right.bottom.mas_equalTo(weakSelf.view); 107 make.left.right.bottom.mas_equalTo(weakSelf.view);
107 }]; 108 }];
108 } 109 }
  110 +-(void)initSubviews
  111 +{
  112 + [super initSubviews];
  113 +}
109 -(void)layoutTableView 114 -(void)layoutTableView
110 { 115 {
111 [super layoutTableView]; 116 [super layoutTableView];
@@ -122,6 +127,7 @@ @@ -122,6 +127,7 @@
122 if (self.showType == CNLiveCommuntListShowTypeHome) string = @"暂无内容"; 127 if (self.showType == CNLiveCommuntListShowTypeHome) string = @"暂无内容";
123 if (self.showType == CNLiveCommuntListShowTypeRecord) string = @"亲,您还没有活动记录哦~"; 128 if (self.showType == CNLiveCommuntListShowTypeRecord) string = @"亲,您还没有活动记录哦~";
124 if (self.showType == CNLiveCommuntListShowTypeRepair) string = @"亲,您还没有报修记录哦~"; 129 if (self.showType == CNLiveCommuntListShowTypeRepair) string = @"亲,您还没有报修记录哦~";
  130 + if (self.showType == CNLiveCommuntListShowTypePayCost) string = @"亲,您还没有缴费记录哦~";
125 return [[NSAttributedString alloc] initWithString:string attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]}]; 131 return [[NSAttributedString alloc] initWithString:string attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]}];
126 } 132 }
127 -(UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView 133 -(UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
@@ -198,6 +204,10 @@ @@ -198,6 +204,10 @@
198 CNLiveCommuntyActivityRepairListModel * repairModel = self.dataArray[indexPath.row]; 204 CNLiveCommuntyActivityRepairListModel * repairModel = self.dataArray[indexPath.row];
199 return [CNLiveCommuntSubRepairTableView setTableView:tableView RepairModel:repairModel]; 205 return [CNLiveCommuntSubRepairTableView setTableView:tableView RepairModel:repairModel];
200 } 206 }
  207 + if (self.showType == CNLiveCommuntListShowTypePayCost) {
  208 + CNLiveCommuntyActivityPaycostListModel * paycostModel = self.dataArray[indexPath.row];
  209 + return [CNLiveCommuntPayCostListViewCell setTableView:tableView payCostModel:paycostModel];
  210 + }
201 return nil; 211 return nil;
202 } 212 }
203 213
@@ -214,6 +224,10 @@ @@ -214,6 +224,10 @@
214 CGFloat itemW = repairModel.imgs.count > 0 ? (kScreenWidth - 60)/3 + 20 : 0; 224 CGFloat itemW = repairModel.imgs.count > 0 ? (kScreenWidth - 60)/3 + 20 : 0;
215 return ([repairModel.status isEqualToString:@"3"] && [repairModel.totalFee integerValue] > 0?110.0:70.0) + itemW; 225 return ([repairModel.status isEqualToString:@"3"] && [repairModel.totalFee integerValue] > 0?110.0:70.0) + itemW;
216 } 226 }
  227 + if (self.showType == CNLiveCommuntListShowTypePayCost) {
  228 + CNLiveCommuntyActivityPaycostListModel * paycostModel = self.dataArray[indexPath.row];
  229 + return [paycostModel.payStatus isEqualToString:@"0"]?120.0:80.0;
  230 + }
217 return 0.001; 231 return 0.001;
218 } 232 }
219 233
@@ -243,6 +257,11 @@ @@ -243,6 +257,11 @@
243 CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row]; 257 CNLiveCommuntyActivityHomeListModel * listModel = self.dataArray[indexPath.row];
244 [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:listModel.idStr]; 258 [[CNLiveCommuntyModule shareInstance].protocol pushWebViewWithMainProjectWithActivityId:listModel.idStr];
245 } 259 }
  260 + if (self.showType == CNLiveCommuntListShowTypePayCost) {
  261 + CNLiveCommuntyActivityPaycostListModel * paycostModel = self.dataArray[indexPath.row];
  262 + CNLiveCommuntPaycostViewController * paycostView = [[CNLiveCommuntPaycostViewController alloc] initWithPayCostId:paycostModel.idStr];
  263 + [self.navigationController pushViewController:paycostView animated:YES];
  264 + }
246 } 265 }
247 266
248 - (UIView *)listView { 267 - (UIView *)listView {
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntPaycostViewController.h 0 → 100644
  1 +//
  2 +// CNLiveCommuntPaycostViewController.h
  3 +// CNLiveCommuntyModule
  4 +//
  5 +// Created by open on 2022/4/9.
  6 +//
  7 +
  8 +#import <CNLiveBusinessBaseModule/CNLiveBusinessBaseModule.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveCommuntPaycostViewController : CNCommonTableViewController
  13 +- (instancetype)initWithPayCostId:(NSString *)payCostId;
  14 +@end
  15 +
  16 +NS_ASSUME_NONNULL_END
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntPaycostViewController.m 0 → 100644
  1 +//
  2 +// CNLiveCommuntPaycostViewController.m
  3 +// CNLiveCommuntyModule
  4 +//
  5 +// Created by open on 2022/4/9.
  6 +//
  7 +
  8 +#import "CNLiveCommuntPaycostViewController.h"
  9 +#import "CNLiveCommuntSignUpView.h"
  10 +#import "CNLiveCommuntyResultViewController.h"
  11 +@interface CNLiveCommuntPaycostViewController ()
  12 +@property (nonatomic, strong) CNLiveCommuntyActivityPaycostListModel * detailModel;
  13 +@property (nonatomic, copy) NSString * payCostId;
  14 +@property (nonatomic, strong) NSMutableArray * dataArray;
  15 +@end
  16 +
  17 +@implementation CNLiveCommuntPaycostViewController
  18 +- (instancetype)initWithPayCostId:(NSString *)payCostId
  19 +{
  20 + self = [super init];
  21 + if (self) {
  22 + self.dataArray = [[NSMutableArray alloc] init];
  23 + _payCostId = payCostId;
  24 + }
  25 + return self;
  26 +}
  27 +- (void)viewDidLoad {
  28 + [super viewDidLoad];
  29 + // Do any additional setup after loading the view.
  30 + self.view.backgroundColor = UIColorHex(#F9F9F9);
  31 + self.title = @"物业费";
  32 +
  33 + __weak typeof(self) weakSelf = self;
  34 + [CNLiveCommuntViewModel requestWithCommuntyPayCostDetailMentPaycostId:self.payCostId CompleterBlock:^(CNLiveCommuntyActivityPaycostListModel * _Nonnull detailModel) {
  35 + weakSelf.detailModel = detailModel;
  36 + [weakSelf.view addSubview:[weakSelf setTableViewFooterView:[NSString stringWithFormat:@"(¥%@)",detailModel.totalFee] isStatus:[detailModel.payStatus isEqualToString:@"1"]]];
  37 + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  38 + [dateFormatter setDateFormat:@"yyyy/MM"];
  39 + NSDate *detaildate_beginTime = [NSDate dateWithTimeIntervalSince1970:([detailModel.beginTime doubleValue]/1000)];
  40 + NSDate *detaildate_endTime = [NSDate dateWithTimeIntervalSince1970:([detailModel.endTime doubleValue]/1000)];
  41 + NSDateFormatter *dateFormatter_pay = [[NSDateFormatter alloc] init];
  42 + [dateFormatter_pay setDateFormat:@"yyyy/MM/dd HH:mm:ss"];
  43 + NSDate *detaildate_payTime = [NSDate dateWithTimeIntervalSince1970:([detailModel.payTime doubleValue]/1000)];
  44 + NSString * time_string = [NSString stringWithFormat:@"%@~%@",[dateFormatter stringFromDate:detaildate_beginTime],[dateFormatter stringFromDate:detaildate_endTime]];
  45 + [weakSelf.dataArray addObject:@{@"key":@"收费单位",@"value":detailModel.propertyName}];
  46 + [weakSelf.dataArray addObject:@{@"key":[detailModel.payStatus isEqualToString:@"1"]?@"已缴费用":@"待缴费用",@"value":[NSString stringWithFormat:@"¥%@",detailModel.totalFee]}];
  47 + [weakSelf.dataArray addObject:@{@"key":@"缴费房屋",@"value":detailModel.locality}];
  48 + [weakSelf.dataArray addObject:@{@"key":@"账单周期",@"value":time_string}];
  49 + if ([detailModel.payStatus isEqualToString:@"1"]) {
  50 + [weakSelf.dataArray addObject:@{@"key":@"支付时间",@"value":[dateFormatter_pay stringFromDate:detaildate_payTime]}];
  51 + [weakSelf.dataArray addObject:@{@"key":@"缴费人",@"value":[detailModel.payerName isNotBlank]?detailModel.payerName:@""}];
  52 + }
  53 + [weakSelf.tableView reloadData];
  54 + }];
  55 +}
  56 +
  57 +- (void)initTableView
  58 +{
  59 + [super initTableView];
  60 + self.tableView.delegate = self;
  61 + self.tableView.dataSource = self;
  62 + self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
  63 + self.tableView.separatorInset = UIEdgeInsetsMake(0, 10, 0, 10);
  64 + self.tableView.tableFooterView = [[UIView alloc] init];
  65 +
  66 + self.tableView.frame = CGRectMake(0, kNavigationBarHeight, kScreenWidth, kScreenHeight - kNavigationBarHeight);
  67 + self.tableView.contentInset = UIEdgeInsetsMake(kNavigationBarHeight + 10, 0, 60 + kVerticalBottomSafeHeight, 0);
  68 +}
  69 +-(UIView *)setTableViewFooterView:(NSString *)priceString isStatus:(BOOL)isStatus
  70 +{
  71 + NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"%@%@",kCNLiveCommuntyNBhdInfoIdentifier,[CNUserInfoManager manager].userInfoModel.uid]];
  72 +
  73 + self.tableView.contentInset = UIEdgeInsetsMake(kNavigationBarHeight, 0, [nb_info isNotBlank]?(isStatus?30:90):0, 0);
  74 +
  75 + UIView * footerView = [[UIView alloc] initWithFrame:CGRectMake(0, kScreenHeight - ([nb_info isNotBlank]?(isStatus?30:90):0), kScreenWidth, [nb_info isNotBlank]?(isStatus?30:90):0)];
  76 + footerView.backgroundColor = [UIColor whiteColor];
  77 +
  78 + if ([nb_info isNotBlank]) {
  79 + CNLiveCommuntyHomeListModel * listModel = [CNLiveCommuntyHomeListModel mj_objectWithKeyValues:nb_info];
  80 + YYLabel * phoneLabel = [[YYLabel alloc] initWithFrame:CGRectMake(0, 5, kScreenWidth, 20)];
  81 + phoneLabel.textColor = UIColorHex(#B4B4B4);
  82 + phoneLabel.textAlignment = NSTextAlignmentCenter;
  83 + phoneLabel.textVerticalAlignment = YYTextVerticalAlignmentCenter;
  84 + phoneLabel.numberOfLines = 0;
  85 + phoneLabel.hidden = ![listModel.propertyPhone isNotBlank];
  86 + phoneLabel.backgroundColor = [UIColor whiteColor];
  87 +
  88 + NSString * string = [NSString stringWithFormat:@"物业电话 %@",listModel.propertyPhone];
  89 + NSMutableAttributedString *textAttributedString = [[NSMutableAttributedString alloc] initWithString:string];
  90 + textAttributedString.yy_font = [UIFont systemFontOfSize:10];
  91 + textAttributedString.yy_color = UIColorHex(#B4B4B4);
  92 + textAttributedString.yy_alignment = NSTextAlignmentCenter;
  93 + [textAttributedString yy_setTextHighlightRange:[string rangeOfString:listModel.propertyPhone]
  94 + color:[UIColor qmui_colorWithHexString:@"0091FF"]
  95 + backgroundColor:[UIColor qmui_colorWithHexString:@"0091FF"]
  96 + tapAction:^(UIView *containerView, NSAttributedString *text, NSRange range, CGRect rect){
  97 + UIAlertController * alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
  98 + [alert addAction:[UIAlertAction actionWithTitle:listModel.propertyPhone style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  99 + NSMutableString* str = [[NSMutableString alloc] initWithFormat:@"tel:%@",listModel.propertyPhone];
  100 + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str] options:@{} completionHandler:NULL];
  101 + }]];
  102 + [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:NULL]];
  103 + [[self displayViewController] presentViewController:alert animated:YES completion:nil];
  104 + }];
  105 + phoneLabel.attributedText = textAttributedString;
  106 + [footerView addSubview:phoneLabel];
  107 +
  108 + UILabel * lineLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 30, kScreenWidth - 20, 0.5)];
  109 + lineLabel.backgroundColor = UIColorHex(#E6E6E6);
  110 + lineLabel.hidden = isStatus;
  111 + [footerView addSubview:lineLabel];
  112 + }
  113 +
  114 + UIButton * submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  115 + submitBtn.backgroundColor = UIColorHex(#CD0302);
  116 + submitBtn.frame = CGRectMake(10, [nb_info isNotBlank]?40:20, kScreenWidth - 20, isStatus?0:40);
  117 + submitBtn.layer.cornerRadius = 20;
  118 + submitBtn.layer.masksToBounds = YES;
  119 + [submitBtn setTitle:[NSString stringWithFormat:@"立即缴费%@",priceString] forState:UIControlStateNormal];
  120 + submitBtn.titleLabel.font = [UIFont systemFontOfSize:16];
  121 + submitBtn.titleLabel.font = [UIFont boldSystemFontOfSize:16];
  122 + [submitBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  123 + [submitBtn addTarget:self action:@selector(submitRequestAction:) forControlEvents:UIControlEventTouchUpInside];
  124 + [footerView addSubview:submitBtn];
  125 + return footerView;
  126 +}
  127 +-(void)submitRequestAction:(UIButton *)button
  128 +{
  129 + __weak typeof(self) weakSelf = self;
  130 + [CNLiveCommuntViewModel requestWithCommuntyPayCostDetailMentHousePropertyFeeId:self.detailModel.idStr CompleterBlock:^(NSString * _Nonnull orderId) {
  131 + [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:orderId price:weakSelf.detailModel.totalFee body:[weakSelf.detailModel.propertyName isNotBlank]?weakSelf.detailModel.propertyName:@"物业缴费" NotifyUrl:cn_API_CommuntyApi(@"/housePropertyFeeApi/housePropertyFeeOrderNotify")];
  132 + }];
  133 +}
  134 +#pragma mark =
  135 +-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  136 +{
  137 + return 1;
  138 +}
  139 +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  140 +{
  141 + return self.dataArray.count;
  142 +}
  143 +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  144 +{
  145 + return [CNLiveCommuntPayCostDetailViewCell setTableView:tableView ParamDict:self.dataArray[indexPath.row]];
  146 +}
  147 +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  148 +{
  149 + return 60;
  150 +}
  151 +@end
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntSignUpViewController.m
@@ -198,7 +198,7 @@ @@ -198,7 +198,7 @@
198 CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel activityId:handworkId]; 198 CNLiveCommuntyResultViewController * resultVC = [[CNLiveCommuntyResultViewController alloc] initWithSignUpModel:signUpModel activityId:handworkId];
199 [weakSelf.navigationController pushViewController:resultVC animated:YES]; 199 [weakSelf.navigationController pushViewController:resultVC animated:YES];
200 }else{ 200 }else{
201 - [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:[signUpModel.order.idStr isNotBlank]?signUpModel.order.idStr:@"" price:[NSString stringWithFormat:@"%.2f",(weakSelf.userArray.count * [weakSelf.detailModel.unitPrice floatValue])] body:[weakSelf.detailModel.name isNotBlank]?weakSelf.detailModel.name:@"网家家社区活动"]; 201 + [[CNLiveCommuntyModule shareInstance].protocol pushMainProjectWithPayManagerWithOrderId:[signUpModel.order.idStr isNotBlank]?signUpModel.order.idStr:@"" price:[NSString stringWithFormat:@"%.2f",(weakSelf.userArray.count * [weakSelf.detailModel.unitPrice floatValue])] body:[weakSelf.detailModel.name isNotBlank]?weakSelf.detailModel.name:@"网家家社区活动" NotifyUrl:cn_API_CommuntyApi(@"/signupApi/signupOrderNotify")];
202 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(payResultSuccessNNotification:) name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil]; 202 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(payResultSuccessNNotification:) name:@"kIMAMSG_CommunityPaySuccessNotification" object:nil];
203 } 203 }
204 }]; 204 }];
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyOrderViewController.m
@@ -382,7 +382,7 @@ @@ -382,7 +382,7 @@
382 CGFloat height = [[subDict stringValueForKey:@"value" default:@""] calculateSizeWithUIWidth:kScreenWidth - 125 font:[UIFont systemFontOfSize:15.0]].height; 382 CGFloat height = [[subDict stringValueForKey:@"value" default:@""] calculateSizeWithUIWidth:kScreenWidth - 125 font:[UIFont systemFontOfSize:15.0]].height;
383 return height > 30 ? height : 30; 383 return height > 30 ? height : 30;
384 } 384 }
385 - if (indexPath.section == 2) return 70; 385 + if (indexPath.section == 1) return 70;
386 } 386 }
387 if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) { 387 if (self.showType == CNLiveCommuntyOrderShowTypeChatReadyOrder) {
388 if (indexPath.section == 0) { 388 if (indexPath.section == 0) {
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyResultViewController.h
@@ -19,6 +19,10 @@ NS_ASSUME_NONNULL_BEGIN @@ -19,6 +19,10 @@ NS_ASSUME_NONNULL_BEGIN
19 /// @param activityId 活动id 19 /// @param activityId 活动id
20 /// @param orderId 活动id 20 /// @param orderId 活动id
21 - (instancetype)initWithActivityId:(NSString *)activityId OrderId:(NSString *)orderId Msg:(NSString *)msg; 21 - (instancetype)initWithActivityId:(NSString *)activityId OrderId:(NSString *)orderId Msg:(NSString *)msg;
  22 +
  23 +/// 初始化物业缴费结果界面
  24 +/// @param isStatus 支付状态
  25 +- (instancetype)initWithStatus:(BOOL)isStatus;
22 @end 26 @end
23 27
24 NS_ASSUME_NONNULL_END 28 NS_ASSUME_NONNULL_END
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntyResultViewController.m
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 #import "CNLiveCommuntyResultViewController.h" 8 #import "CNLiveCommuntyResultViewController.h"
9 9
10 10
  11 +
11 @interface CNLiveCommuntyResultViewController () 12 @interface CNLiveCommuntyResultViewController ()
12 @property (nonatomic, strong) QMUIButton * statusButton; 13 @property (nonatomic, strong) QMUIButton * statusButton;
13 @property (nonatomic, strong) QMUIFillButton * descButton; 14 @property (nonatomic, strong) QMUIFillButton * descButton;
@@ -19,6 +20,8 @@ @@ -19,6 +20,8 @@
19 @property (nonatomic, copy) NSString *orderId; 20 @property (nonatomic, copy) NSString *orderId;
20 @property (nonatomic, copy) NSString *msg; 21 @property (nonatomic, copy) NSString *msg;
21 @property (nonatomic, assign) BOOL isSuccess; 22 @property (nonatomic, assign) BOOL isSuccess;
  23 +
  24 +@property (nonatomic, assign) NSInteger status;//0报名结果界面 1物业缴费界面
22 @end 25 @end
23 26
24 @implementation CNLiveCommuntyResultViewController 27 @implementation CNLiveCommuntyResultViewController
@@ -29,6 +32,7 @@ @@ -29,6 +32,7 @@
29 { 32 {
30 self = [super init]; 33 self = [super init];
31 if (self) { 34 if (self) {
  35 + _status = 0;
32 _activityId = activityId; 36 _activityId = activityId;
33 _isSuccess = signUpModel != nil; 37 _isSuccess = signUpModel != nil;
34 _signUpModel = signUpModel; 38 _signUpModel = signUpModel;
@@ -44,6 +48,7 @@ @@ -44,6 +48,7 @@
44 { 48 {
45 self = [super init]; 49 self = [super init];
46 if (self) { 50 if (self) {
  51 + _status = 0;
47 _activityId = activityId; 52 _activityId = activityId;
48 _orderId = orderId; 53 _orderId = orderId;
49 _msg = msg; 54 _msg = msg;
@@ -52,6 +57,18 @@ @@ -52,6 +57,18 @@
52 return self; 57 return self;
53 } 58 }
54 59
  60 +/// 初始化物业缴费结果界面
  61 +/// @param isStatus 支付状态
  62 +- (instancetype)initWithStatus:(BOOL)isStatus
  63 +{
  64 + self = [super init];
  65 + if (self) {
  66 + _status = 1;
  67 + _isSuccess = isStatus;
  68 + }
  69 + return self;
  70 +}
  71 +
55 - (void)viewDidLoad { 72 - (void)viewDidLoad {
56 [super viewDidLoad]; 73 [super viewDidLoad];
57 // Do any additional setup after loading the view. 74 // Do any additional setup after loading the view.
@@ -76,9 +93,29 @@ @@ -76,9 +93,29 @@
76 make.width.mas_equalTo(200); 93 make.width.mas_equalTo(200);
77 make.height.mas_equalTo(40); 94 make.height.mas_equalTo(40);
78 }]; 95 }];
  96 +
  97 + if (self.status == 1) {
  98 + self.title = self.isSuccess?@"缴费成功":@"缴费失败";
  99 + [self.statusButton setTitle:self.isSuccess?@"缴费成功":@"缴费失败" forState:UIControlStateNormal];
  100 + [self.descButton setTitle:@"返回" forState:UIControlStateNormal];
  101 + [self.descButton setTitle:@"返回" forState:UIControlStateHighlighted];
  102 + [self.descButton setTitle:@"返回" forState:UIControlStateSelected];
  103 + self.descButton.layer.cornerRadius = 20;
  104 + self.descButton.layer.masksToBounds = YES;
  105 + self.descButton.layer.borderColor = self.isSuccess?UIColorHex(#65C468).CGColor:UIColorHex(#FF8585).CGColor;
  106 + self.descButton.layer.borderWidth = 1;
  107 + self.descButton.fillColor = [UIColor whiteColor];
  108 + [self.descButton setTitleColor:self.isSuccess?UIColorHex(#65C468):UIColorHex(#FF8585) forState:UIControlStateNormal];
  109 + [self.descButton setTitleColor:self.isSuccess?UIColorHex(#65C468):UIColorHex(#FF8585) forState:UIControlStateHighlighted];
  110 + [self.descButton setTitleColor:self.isSuccess?UIColorHex(#65C468):UIColorHex(#FF8585) forState:UIControlStateSelected];
  111 + }
79 } 112 }
80 -(void)descAction:(UIButton *)button 113 -(void)descAction:(UIButton *)button
81 { 114 {
  115 + if ([button.titleLabel.text isEqualToString:@"返回"]) {
  116 + [self.navigationController popViewControllerAnimated:YES];
  117 + return;
  118 + }
82 if (self.isSuccess) { 119 if (self.isSuccess) {
83 CNLiveCommuntyResultListViewController * resultVC = [[CNLiveCommuntyResultListViewController alloc] initWithStyle:UITableViewStyleGrouped SignId:self.signUpModel.signsString OrderId:[self.signUpModel.orderId isNotBlank]?self.signUpModel.orderId:self.orderId handworkId:self.activityId]; 120 CNLiveCommuntyResultListViewController * resultVC = [[CNLiveCommuntyResultListViewController alloc] initWithStyle:UITableViewStyleGrouped SignId:self.signUpModel.signsString OrderId:[self.signUpModel.orderId isNotBlank]?self.signUpModel.orderId:self.orderId handworkId:self.activityId];
84 [self.navigationController pushViewController:resultVC animated:YES]; 121 [self.navigationController pushViewController:resultVC animated:YES];
CNLiveCommuntyModule/Classes/ViewModel/CNLiveCommuntViewModel.h
@@ -13,6 +13,7 @@ typedef enum : NSUInteger { @@ -13,6 +13,7 @@ typedef enum : NSUInteger {
13 CNLiveCommuntListShowTypeHome,//公益活动显示类型 13 CNLiveCommuntListShowTypeHome,//公益活动显示类型
14 CNLiveCommuntListShowTypeRecord,//活动记录 14 CNLiveCommuntListShowTypeRecord,//活动记录
15 CNLiveCommuntListShowTypeRepair,//报修记录 15 CNLiveCommuntListShowTypeRepair,//报修记录
  16 + CNLiveCommuntListShowTypePayCost,//缴费记录
16 } CNLiveCommuntListShowType; 17 } CNLiveCommuntListShowType;
17 18
18 19
@@ -107,6 +108,16 @@ typedef enum : NSUInteger { @@ -107,6 +108,16 @@ typedef enum : NSUInteger {
107 /// @param completerBlock 返回结果 108 /// @param completerBlock 返回结果
108 +(void)requestWithCommuntyActivityDetailMentActivityId:(NSString *)activityId CompleterBlock:(void(^)(CNLiveCommuntyActivityDetailModel * detailModel))completerBlock; 109 +(void)requestWithCommuntyActivityDetailMentActivityId:(NSString *)activityId CompleterBlock:(void(^)(CNLiveCommuntyActivityDetailModel * detailModel))completerBlock;
109 110
  111 +/// 获取缴费详情界面接口
  112 +/// @param paycostId 活动id
  113 +/// @param completerBlock 返回结果
  114 ++(void)requestWithCommuntyPayCostDetailMentPaycostId:(NSString *)paycostId CompleterBlock:(void(^)(CNLiveCommuntyActivityPaycostListModel * detailModel))completerBlock;
  115 +
  116 +/// 获取缴费支付的orderId
  117 +/// @param housePropertyFeeId 物业费id
  118 +/// @param completerBlock 返回结果
  119 ++(void)requestWithCommuntyPayCostDetailMentHousePropertyFeeId:(NSString *)housePropertyFeeId CompleterBlock:(void(^)(NSString * orderId))completerBlock;
  120 +
110 /// 获取成功界面查看详情界面 121 /// 获取成功界面查看详情界面
111 /// @param orderId 订单id 122 /// @param orderId 订单id
112 /// @param signId 报名id 123 /// @param signId 报名id
CNLiveCommuntyModule/Classes/ViewModel/CNLiveCommuntViewModel.m
@@ -25,6 +25,12 @@ @@ -25,6 +25,12 @@
25 #define CNCCommuntListOrderContentURL cn_API_CommuntyApi(@"/signupApi/userOrders") 25 #define CNCCommuntListOrderContentURL cn_API_CommuntyApi(@"/signupApi/userOrders")
26 //获取保修记录列表数据 26 //获取保修记录列表数据
27 #define CNCCommuntListRepairContentURL cn_API_CommuntyApi(@"/repairApi/getUserOrders") 27 #define CNCCommuntListRepairContentURL cn_API_CommuntyApi(@"/repairApi/getUserOrders")
  28 +//获取缴费记录列表数据
  29 +#define CNCCommuntListPayCostContentURL cn_API_CommuntyApi(@"/housePropertyFeeApi/listHousePropertyFee4Api")
  30 +//获取缴费记录详情数据
  31 +#define CNCCommuntListPayCostContentDetailURL cn_API_CommuntyApi(@"/housePropertyFeeApi/housePropertyFeeById")
  32 +//获取缴费数据
  33 +#define CNCCommuntListPayCostPropertyDetailURL cn_API_CommuntyApi(@"/housePropertyFeeApi/payHousePropertyFee")
28 //获取获取维修项目数据 34 //获取获取维修项目数据
29 #define CNCCommuntListMaintainContentURL cn_API_CommuntyApi(@"/repairApi/getMaintains") 35 #define CNCCommuntListMaintainContentURL cn_API_CommuntyApi(@"/repairApi/getMaintains")
30 //获取报修详情 36 //获取报修详情
@@ -190,6 +196,28 @@ @@ -190,6 +196,28 @@
190 }]; 196 }];
191 }]; 197 }];
192 } 198 }
  199 + if (showType == CNLiveCommuntListShowTypePayCost) {
  200 + NSDictionary * paramDict = @{
  201 + @"sid":[CNUserInfoManager manager].userInfoModel.uid,
  202 + @"neighborhoodId":nbhdId,
  203 + @"page":[NSString stringWithFormat:@"%ld",page],
  204 + @"pageSize":@"10"
  205 + };
  206 + [CNLiveNetworking setAllowRequestDefaultArgument:YES];
  207 + [CNLiveNetworking setupShowDataResult:NO];
  208 + [CNLiveNetworking setupShowResult:YES];
  209 + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNCCommuntListPayCostContentURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  210 + [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
  211 + [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) {
  212 + if (responseObject && [[responseObject allKeys] containsObject:@"list"]) {
  213 + NSMutableArray * tempArray = [CNLiveCommuntyActivityPaycostListModel mj_objectArrayWithKeyValuesArray:[responseObject arrayForKey:@"list"]];
  214 + if (completerBlock) completerBlock(tempArray,[responseObject boolValueForKey:@"isLastPage" default:YES]);
  215 + }else{
  216 +// if (completerBlock) completerBlock(@[],YES);
  217 + }
  218 + }];
  219 + }];
  220 + }
193 } 221 }
194 /// 获取维修项目 222 /// 获取维修项目
195 /// @param nbhdId 小区id 223 /// @param nbhdId 小区id
@@ -615,6 +643,57 @@ @@ -615,6 +643,57 @@
615 }]; 643 }];
616 }]; 644 }];
617 } 645 }
  646 +
  647 +/// 获取缴费详情界面接口
  648 +/// @param paycostId 活动id
  649 +/// @param completerBlock 返回结果
  650 ++(void)requestWithCommuntyPayCostDetailMentPaycostId:(NSString *)paycostId CompleterBlock:(void(^)(CNLiveCommuntyActivityPaycostListModel * detailModel))completerBlock
  651 +{
  652 + NSDictionary * paramDict = @{
  653 + @"housePropertyFeeId":[paycostId isNotBlank]?paycostId:@""
  654 + };
  655 + [QMUITips showLoadingInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
  656 + [CNLiveNetworking setAllowRequestDefaultArgument:YES];
  657 + [CNLiveNetworking setupShowDataResult:NO];
  658 + [CNLiveNetworking setupShowResult:YES];
  659 + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNCCommuntListPayCostContentDetailURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  660 + [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
  661 + [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) {
  662 + if (responseObject) {
  663 + CNLiveCommuntyActivityPaycostListModel * detailModel = [CNLiveCommuntyActivityPaycostListModel mj_objectWithKeyValues:responseObject];
  664 + if (completerBlock) completerBlock(detailModel);
  665 + }else{
  666 + if (completerBlock) completerBlock(nil);
  667 + }
  668 + }];
  669 + }];
  670 +}
  671 +/// 获取缴费支付的orderId
  672 +/// @param housePropertyFeeId 物业费id
  673 +/// @param completerBlock 返回结果
  674 ++(void)requestWithCommuntyPayCostDetailMentHousePropertyFeeId:(NSString *)housePropertyFeeId CompleterBlock:(void(^)(NSString * orderId))completerBlock
  675 +{
  676 + NSDictionary * paramDict = @{
  677 + @"housePropertyFeeId":[housePropertyFeeId isNotBlank]?housePropertyFeeId:@"",
  678 + @"payUserid":[CNUserInfoManager manager].userInfoModel.uid,
  679 + @"type":@"1",
  680 + };
  681 + [QMUITips showLoadingInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
  682 + [CNLiveNetworking setAllowRequestDefaultArgument:YES];
  683 + [CNLiveNetworking setupShowDataResult:NO];
  684 + [CNLiveNetworking setupShowResult:YES];
  685 + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNCCommuntListPayCostPropertyDetailURL Param:paramDict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  686 + [QMUITips hideAllTipsInView:[CNLiveCommuntTools cCommunt_currentViewController].view];
  687 + [CNLiveCommuntViewModel communty_chooseRequestWithResponseObject:responseObject Error:error isData:YES CompleterBlock:^(id responseObject) {
  688 + if (responseObject) {
  689 + NSDictionary * order = [responseObject dictionaryForKey:@"order"];
  690 + if (completerBlock) completerBlock([order stringValueForKey:@"id" default:@""]);
  691 + }else{
  692 + if (completerBlock) completerBlock(nil);
  693 + }
  694 + }];
  695 + }];
  696 +}
618 #pragma mark =========== 对放回的结果进行提醒判断 =========== 697 #pragma mark =========== 对放回的结果进行提醒判断 ===========
619 698
620 /// 获取时间戳 699 /// 获取时间戳
Example/CNLiveCommuntyModule/CNLIVEAppDelegate.m
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 [IQKeyboardManager sharedManager].enable = YES; 24 [IQKeyboardManager sharedManager].enable = YES;
25 [IQKeyboardManager sharedManager].enableAutoToolbar = YES; 25 [IQKeyboardManager sharedManager].enableAutoToolbar = YES;
26 26
27 - [CNUserInfoManager manager].userInfoModel.uid = @"10458139";//@"145680";//@"11174272";//@"145680";//@"395098";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10537318";//@"10499533";//@"11973842";//@"1342671" 27 + [CNUserInfoManager manager].userInfoModel.uid = @"10504761";//@"10458139";//@"145680";//@"11174272";//@"145680";//@"395098";//@"10545988";//@"353001";//@"353417";//@"10511059";//@"10537318";//@"10499533";//@"11973842";//@"1342671"
28 28
29 // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"]; 29 // [[NSUserDefaults standardUserDefaults] setObject:@"38" forKey:@"kCNLiveCommuntyNBhdIdIdentifier"];
30 // [[NSUserDefaults standardUserDefaults] synchronize]; 30 // [[NSUserDefaults standardUserDefaults] synchronize];
Example/CNLiveCommuntyModule/CNLIVEViewController.m
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
27 #import "BHRouter.h" 27 #import "BHRouter.h"
28 #import "CNLiveCommuntViewModel.h" 28 #import "CNLiveCommuntViewModel.h"
29 #import "CNLiveCommuntSignUpView.h" 29 #import "CNLiveCommuntSignUpView.h"
  30 +#import "CNLiveCommuntListViewController.h"
30 #import "CNLiveCommuntyResultListViewController.h" 31 #import "CNLiveCommuntyResultListViewController.h"
31 #import <CNLiveEnvironment/CNLiveEnvironment.h> 32 #import <CNLiveEnvironment/CNLiveEnvironment.h>
32 #import <CNLiveUserManagement/CNUserInfoManager.h> 33 #import <CNLiveUserManagement/CNUserInfoManager.h>
@@ -114,6 +115,7 @@ @@ -114,6 +115,7 @@
114 { 115 {
115 if (indexPath.row == 0) { 116 if (indexPath.row == 0) {
116 [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod]; 117 [[CNLiveCommuntyModule shareInstance] pushCommuntyHomeViewMethod];
  118 +
117 } 119 }
118 if (indexPath.row == 1) { 120 if (indexPath.row == 1) {
119 NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"kCNLiveCommuntyNBhdInfoIdentifier%@",[CNUserInfoManager manager].userInfoModel.uid]]; 121 NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"kCNLiveCommuntyNBhdInfoIdentifier%@",[CNUserInfoManager manager].userInfoModel.uid]];
@@ -126,8 +128,10 @@ @@ -126,8 +128,10 @@
126 if (indexPath.row == 2) { 128 if (indexPath.row == 2) {
127 // CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init]; 129 // CNLiveCommuntActiviRepairViewController * repairView = [[CNLiveCommuntActiviRepairViewController alloc] init];
128 // [self.navigationController pushViewController:repairView animated:YES]; 130 // [self.navigationController pushViewController:repairView animated:YES];
129 - [BHRouter openURL:[NSURL URLWithString:@"com.cnlive.CNLiveNetAdd://jump.vc.beehive/CNLiveCommuntActiviRepairViewController.push"]]; 131 +// [BHRouter openURL:[NSURL URLWithString:@"com.cnlive.CNLiveNetAdd://jump.vc.beehive/CNLiveCommuntActiviRepairViewController.push"]];
130 132
  133 + CNLiveCommuntListViewController * listView = [[CNLiveCommuntListViewController alloc] initWithShowType:CNLiveCommuntListShowTypePayCost NBhdId:@"72"];//@"53"];
  134 + [self.navigationController pushViewController:listView animated:YES];
131 } 135 }
132 if (indexPath.row == 3) { 136 if (indexPath.row == 3) {
133 NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"kCNLiveCommuntyNBhdInfoIdentifier%@",[CNUserInfoManager manager].userInfoModel.uid]]; 137 NSString * nb_info = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"kCNLiveCommuntyNBhdInfoIdentifier%@",[CNUserInfoManager manager].userInfoModel.uid]];
Example/CNLiveCommuntyModule/CNLiveCommunitModuleImpl.m
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 /// @param orderId 订单id 23 /// @param orderId 订单id
24 /// @param price 价格 24 /// @param price 价格
25 /// @param body 支付名 25 /// @param body 支付名
26 --(void)pushMainProjectWithPayManagerWithOrderId:(NSString *)orderId price:(NSString *)price body:(NSString *)body 26 +-(void)pushMainProjectWithPayManagerWithOrderId:(NSString *)orderId price:(NSString *)price body:(NSString *)body NotifyUrl:(NSString *)notifyUrl
27 { 27 {
28 NSLog(@"调用支付相关参数 orderId=>%@ price=>%@ body=>%@",orderId,price,body); 28 NSLog(@"调用支付相关参数 orderId=>%@ price=>%@ body=>%@",orderId,price,body);
29 } 29 }
Example/CNLiveCommuntyModule/main.m
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 int main(int argc, char * argv[]) 12 int main(int argc, char * argv[])
13 { 13 {
14 @autoreleasepool { 14 @autoreleasepool {
15 - [CNLiveEnvironmentManager setAppType:CNLiveAppTypeUser environmentType:CNLiveProductionAppStore];//CNLiveProductionAppStore//CNLiveDebugAppStore]; 15 + [CNLiveEnvironmentManager setAppType:CNLiveAppTypeUser environmentType:CNLiveDebugAppStore];//CNLiveProductionAppStore//CNLiveDebugAppStore];
16 return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class])); 16 return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class]));
17 } 17 }
18 } 18 }