Commit da606275a2d80d323e59c4ee50d535fcc5989c2f
1 parent
d31ecda5
0.1.5
Showing
2 changed files
with
12 additions
and
41 deletions
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.1.4' | 11 | + s.version = '0.1.5' |
| 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/ViewController/CNLiveCommuntInformViewController.m
| @@ -111,6 +111,15 @@ | @@ -111,6 +111,15 @@ | ||
| 111 | @{@"name":@"问题描述",@"placeholder":@"您遇到什么问题,请留言",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@YES,@"isImage":@NO,@"isChick":@NO}, | 111 | @{@"name":@"问题描述",@"placeholder":@"您遇到什么问题,请留言",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@YES,@"isImage":@NO,@"isChick":@NO}, |
| 112 | @{@"name":@"",@"placeholder":@"",@"isClick":@NO,@"isTextField":@NO,@"isTextView":@NO,@"isImage":@YES,@"isChick":@NO}, | 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 | return _dataSource; | 124 | return _dataSource; |
| 116 | } | 125 | } |
| @@ -206,46 +215,6 @@ | @@ -206,46 +215,6 @@ | ||
| 206 | [paramDict setObject:tempContent forKey:name]; | 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 | if ([[paramDict allValues] containsObject:@""]) { | 218 | if ([[paramDict allValues] containsObject:@""]) { |
| 250 | NSInteger index = [[paramDict allValues] indexOfObject:@""]; | 219 | NSInteger index = [[paramDict allValues] indexOfObject:@""]; |
| 251 | NSString * key = [[paramDict allKeys] objectAtIndex:index]; | 220 | NSString * key = [[paramDict allKeys] objectAtIndex:index]; |
| @@ -259,6 +228,8 @@ | @@ -259,6 +228,8 @@ | ||
| 259 | return; | 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 | __weak typeof(self) weakSelf = self; | 233 | __weak typeof(self) weakSelf = self; |
| 263 | if (self.imageArray.count == 0) { | 234 | if (self.imageArray.count == 0) { |
| 264 | [paramDict addString:@"" forKey:@"img"]; | 235 | [paramDict addString:@"" forKey:@"img"]; |