Commit da606275a2d80d323e59c4ee50d535fcc5989c2f
1 parent
d31ecda5
0.1.5
Showing
2 changed files
with
12 additions
and
41 deletions
CNLiveCommuntyModule.podspec
CNLiveCommuntyModule/Classes/ViewController/CNLiveCommuntInformViewController.m
| ... | ... | @@ -111,6 +111,15 @@ |
| 111 | 111 | @{@"name":@"问题描述",@"placeholder":@"您遇到什么问题,请留言",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@YES,@"isImage":@NO,@"isChick":@NO}, |
| 112 | 112 | @{@"name":@"",@"placeholder":@"",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@YES,@"isChick":@NO}, |
| 113 | 113 | ]]; |
| 114 | + NSArray * array = (NSArray *)[CNLiveRespCacheManager objectCacheWithFileName:[NSString stringWithFormat:@"CNLiveCommunityRepirContentKey_%@",[CNUserInfoManager manager].userInfoModel.uid]]; | |
| 115 | + if (array && array.count > 0) { | |
| 116 | + for (int i = 0; i < array.count; i++) { | |
| 117 | + NSString * content = array[i]; | |
| 118 | + NSMutableDictionary * tempDict = [[_dataSource objectAtIndex:i] mutableCopy]; | |
| 119 | + [tempDict setObject:content forKey:@"content"]; | |
| 120 | + [_dataSource replaceObjectAtIndex:i withObject:tempDict]; | |
| 121 | + } | |
| 122 | + } | |
| 114 | 123 | } |
| 115 | 124 | return _dataSource; |
| 116 | 125 | } |
| ... | ... | @@ -206,46 +215,6 @@ |
| 206 | 215 | [paramDict setObject:tempContent forKey:name]; |
| 207 | 216 | } |
| 208 | 217 | } |
| 209 | -// for (int i = 0; i < 6; i ++) { | |
| 210 | -// CNLiveCommuntSubInputTableView * userCell = [self.tableView dequeueReusableCellWithIdentifier:[NSString stringWithFormat:@"CNLiveCommuntSubInputTableView_%ld",(long)i]]; | |
| 211 | -// if (i == 0) { | |
| 212 | -// [paramDict addString:[userCell.contentField.text isNotBlank]?userCell.contentField.text:@"" forKey:@"userName"]; | |
| 213 | -// } | |
| 214 | -// if (i == 1) { | |
| 215 | -// [paramDict addString:[userCell.contentField.text isNotBlank]?userCell.contentField.text:@"" forKey:@"address"]; | |
| 216 | -// } | |
| 217 | -// if (i == 2) { | |
| 218 | -// NSString * phone = [userCell.contentField.text isNotBlank]?userCell.contentField.text:@""; | |
| 219 | -// if ([phone isNotBlank] && phone.length == 11) { | |
| 220 | -// [paramDict addString:phone forKey:@"phone"]; | |
| 221 | -// }else{ | |
| 222 | -// [QMUITips showWithText:phone.length == 0 ? @"联系电话不能为空" : @"联系电话填写错误"]; | |
| 223 | -// return; | |
| 224 | -// } | |
| 225 | -// } | |
| 226 | -// if (i == 3) { | |
| 227 | -// [paramDict addString:[self.project isNotBlank]?self.project:@"" forKey:@"repairProject"]; | |
| 228 | -// } | |
| 229 | -// if (i == 4) { | |
| 230 | -// NSString * timeString = [self.timeString isNotBlank]?self.timeString:@""; | |
| 231 | -// NSString * dayString = [timeString componentsSeparatedByString:@" "].firstObject; | |
| 232 | -// NSString * startString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].firstObject; | |
| 233 | -// NSString * endString = [[timeString componentsSeparatedByString:@" "].lastObject componentsSeparatedByString:@"~"].lastObject; | |
| 234 | -// if ([startString isNotBlank] && [endString isNotBlank]) { | |
| 235 | -// NSString * temp_start_time = [NSString stringWithFormat:@"%@ %@:00",dayString,startString]; | |
| 236 | -// NSString * temp_end_time = [NSString stringWithFormat:@"%@ %@:00",dayString,endString]; | |
| 237 | -// [paramDict addString:[temp_start_time isNotBlank]?temp_start_time:@"" forKey:@"beginTime"]; | |
| 238 | -// [paramDict addString:[temp_end_time isNotBlank]?temp_end_time:@"" forKey:@"endTime"]; | |
| 239 | -// }else{ | |
| 240 | -// [paramDict addString:@"" forKey:@"beginTime"]; | |
| 241 | -// [paramDict addString:@"" forKey:@"endTime"]; | |
| 242 | -// } | |
| 243 | -// } | |
| 244 | -// if (i == 5) { | |
| 245 | -// [paramDict addString:[userCell.descTextView.text isNotBlank]?userCell.descTextView.text:@"" forKey:@"remark"]; | |
| 246 | -// } | |
| 247 | -// | |
| 248 | -// } | |
| 249 | 218 | if ([[paramDict allValues] containsObject:@""]) { |
| 250 | 219 | NSInteger index = [[paramDict allValues] indexOfObject:@""]; |
| 251 | 220 | NSString * key = [[paramDict allKeys] objectAtIndex:index]; |
| ... | ... | @@ -259,6 +228,8 @@ |
| 259 | 228 | return; |
| 260 | 229 | } |
| 261 | 230 | } |
| 231 | + NSArray * array = @[[paramDict stringValueForKey:@"userName" default:@""],[paramDict stringValueForKey:@"address" default:@""],[paramDict stringValueForKey:@"phone" default:@""]]; | |
| 232 | + [CNLiveRespCacheManager cachePathWithObject:array FileName:[NSString stringWithFormat:@"CNLiveCommunityRepirContentKey_%@",[CNUserInfoManager manager].userInfoModel.uid]]; | |
| 262 | 233 | __weak typeof(self) weakSelf = self; |
| 263 | 234 | if (self.imageArray.count == 0) { |
| 264 | 235 | [paramDict addString:@"" forKey:@"img"]; | ... | ... |