LogAllViewController.m 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. //
  2. // LogAllViewController.m
  3. // IBOSSmini
  4. //
  5. // Created by guan hong hou on 2017/5/5.
  6. // Copyright © 2017年 elongtian. All rights reserved.
  7. //
  8. #import "LogAllViewController.h"
  9. @interface LogAllViewController ()
  10. @end
  11. @implementation LogAllViewController
  12. @synthesize dataList;
  13. @synthesize vCustomTableView;
  14. NSInteger pageNum=1;
  15. BOOL reload;
  16. #pragma mark - 公共函数
  17. /**
  18. viewDidLoad函数
  19. */
  20. - (void)viewDidLoad {
  21. [super viewDidLoad];
  22. dataList=[[NSMutableArray alloc]init];
  23. _logModel=[[LogModel alloc]init];
  24. self.view.backgroundColor=[UIColor whiteColor];
  25. UIImageView *separatorsView=[[UIImageView alloc]init];
  26. separatorsView.frame=CGRectMake(0, 0, Screen_Width,10);
  27. separatorsView.backgroundColor=LineBackgroundColor;
  28. [self.view addSubview:separatorsView];
  29. vCustomTableView = [[RefreshTableView alloc] initWithFrame:CGRectMake(0,CGRectGetMaxY(separatorsView.frame), self.view.frame.size.width,self.view.frame.size.height-10)];
  30. vCustomTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
  31. vCustomTableView.backgroundColor = [UIColor whiteColor];
  32. vCustomTableView.separatorStyle=UITableViewCellSeparatorStyleNone;
  33. vCustomTableView.delegate = self;
  34. [self.view addSubview:vCustomTableView];
  35. pageNum=1;
  36. UITapGestureRecognizer* singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)];
  37. [self.view addGestureRecognizer:singleTap];
  38. singleTap.delegate = self;
  39. singleTap.cancelsTouchesInView = NO;
  40. }
  41. /**
  42. 安全区视图发生变化
  43. */
  44. -(void)viewSafeAreaInsetsDidChange{
  45. self.view.backgroundColor = [UIColor whiteColor];
  46. vCustomTableView.frame = CGRectMake(0,10,SCREENWIDTH, self.view.superview.frame.size.height-10);
  47. //将当前view的高度设置到屏幕底部
  48. self.view.frame = CGRectMake(0,0,SCREENWIDTH, self.view.superview.frame.size.height + [Util obtainHomeAreaHeight]);
  49. [super viewSafeAreaInsetsDidChange];
  50. }
  51. #pragma mark - 委托回调函数
  52. /**
  53. 支持手势函数
  54. */
  55. - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
  56. {
  57. return YES;
  58. }
  59. /**
  60. 手势点击函数
  61. */
  62. -(void)handleSingleTap:(UITapGestureRecognizer *)sender
  63. {
  64. CGPoint point = [sender locationInView:self.view];
  65. CGFloat y= point.y;
  66. if(_commentView !=nil){
  67. if(y<_commentView.frame.origin.y){
  68. [_commentView removeFromSuperview];
  69. [_commentView finishSendMessage];
  70. }
  71. }
  72. }
  73. /**
  74. 数据加载完成回调函数
  75. */
  76. - (void)onLoadFinish:(ASIDownManager *)sender {
  77. NSDictionary *dic = [sender.mWebStr JSONValue];
  78. [self stopLoading];
  79. NSInteger iNewCount = 0;
  80. if (dic && [dic isKindOfClass:[NSDictionary class]]) {
  81. int iStatus = [[dic objectForKey:@"Status"] intValue];
  82. NSString *message=[dic objectForKey:@"Message"];
  83. if (iStatus == 0) {
  84. NSArray *approvArr=[dic objectForKey:@"Result"];
  85. if(approvArr!=nil&&approvArr.count>0)
  86. {
  87. iNewCount=[approvArr count];
  88. vCustomTableView.mbMoreHidden = (iNewCount == 0);
  89. [dataList addObjectsFromArray:approvArr];
  90. if(dataList.count>0){
  91. [_logModel ParseWorkFlowArr:dataList];
  92. }
  93. [vCustomTableView reloadData];
  94. }
  95. else{
  96. vCustomTableView.mbMoreHidden=1;
  97. vCustomTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  98. if(dataList.count==0){
  99. UIView *noDataView=[[UIView alloc]init];
  100. noDataView.frame=vCustomTableView.bounds;
  101. UIImageView *nodataImgView=[[UIImageView alloc] initWithFrame:CGRectMake(noDataView.frame.size.width/2-16,noDataView.frame.size.height/2-16,32,32)];
  102. [nodataImgView setImage:[UIImage imageNamed:@"icon_no_data"]];
  103. [noDataView addSubview:nodataImgView];
  104. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(noDataView.frame.size.width/2-16-12,CGRectGetMaxY(nodataImgView.frame)+3,70, 25)];
  105. label.font=[UIFont systemFontOfSize:NoDataFontOfSize];
  106. label.text = @"无数据";
  107. label.numberOfLines = 2;
  108. label.textColor = [UIColor lightGrayColor];
  109. [noDataView addSubview:label];
  110. vCustomTableView.mTableView.backgroundView =noDataView;
  111. }
  112. [vCustomTableView reloadData];
  113. }
  114. [vCustomTableView FinishLoading];
  115. }
  116. else if(iStatus==ActionResultStatusAuthError
  117. ||iStatus==ActionResultStatusNoLogin
  118. ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
  119. [self showReLoginDialog:message];
  120. return;
  121. }
  122. else{
  123. [self showAlertViewText:message];
  124. [vCustomTableView reloadData];
  125. return;
  126. }
  127. }
  128. }
  129. /**
  130. 数据加载失败回调函数
  131. */
  132. - (void)onLoadFail:(ASIDownManager *)sender {
  133. [self stopLoading];
  134. [self.vCustomTableView reloadData];
  135. [self showAlertViewText:@"加载失败"];
  136. }
  137. /**
  138. 下拉刷新回调函数
  139. */
  140. - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
  141. if (scrollView.isDragging) {//显示下拉更新
  142. if(_commentView !=nil){
  143. [_commentView removeFromSuperview];
  144. [_commentView finishSendMessage];
  145. }
  146. if (vCustomTableView.mRefreshHeader.state == PullRefreshPulling && scrollView.contentOffset.y > -65.0f && scrollView.contentOffset.y < 0.0f && [vCustomTableView CanRefresh]) {
  147. [vCustomTableView.mRefreshHeader setState:PullRefreshNormal];
  148. }
  149. else if (vCustomTableView.mRefreshHeader.state == PullRefreshNormal && scrollView.contentOffset.y < -65.0f && [vCustomTableView CanRefresh]) {//显示松开更新
  150. [vCustomTableView.mRefreshHeader setState:PullRefreshPulling];
  151. }
  152. }
  153. }
  154. /**
  155. tableview的分区数
  156. */
  157. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  158. {
  159. return 1;
  160. }
  161. /**
  162. tableview的列表项
  163. */
  164. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  165. return [dataList count];
  166. }
  167. /**
  168. tableview的cell
  169. */
  170. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  171. static NSString *CustomCellIdentifier = @"CellId";
  172. LogCell *cell1 = [tableView dequeueReusableCellWithIdentifier:CustomCellIdentifier];
  173. cell1=[[LogCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CustomCellIdentifier];
  174. cell1.selectionStyle=UITableViewCellSelectionStyleNone;
  175. cell1.delegate=self;
  176. cell1.indexPath=indexPath;
  177. NSUInteger row = [indexPath row];
  178. LogFrame *logFrame= [_logModel.logArr objectAtIndex:row];
  179. cell1.currentLog=logFrame;
  180. return cell1;
  181. }
  182. //tableviewcell的高度
  183. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  184. LogFrame *logFrame= [_logModel.logArr objectAtIndex:indexPath.row];
  185. return [logFrame cellHeight];
  186. }
  187. /**
  188. 加载更多回调函数
  189. */
  190. - (void)LoadMoreList:(RefreshTableView *)sender {
  191. pageNum++;
  192. [self reloadData];
  193. }
  194. /**
  195. 下拉刷新回调函数
  196. */
  197. - (void)ReloadList:(RefreshTableView *)sender{
  198. pageNum = 1;
  199. [dataList removeAllObjects];
  200. vCustomTableView.mbMoreHidden=YES;
  201. [vCustomTableView reloadData];
  202. [self reloadData];
  203. }
  204. /**
  205. 支持下拉刷新回调函数
  206. */
  207. - (BOOL)CanRefreshTableView:(RefreshTableView *)sender {
  208. return YES;
  209. }
  210. /**
  211. 回复信息窗口弹出回调函数
  212. */
  213. - (void)didShowOperationView:(UIButton *)sender indexPath:(NSIndexPath *)indexPath logFrame:(LogFrame *)logFrame tag:(NSInteger)tag replyInfo:(ReplyInfo *)replyInfo {
  214. _replyInfo=replyInfo;
  215. _logFrame=logFrame;
  216. _tag=tag;
  217. if(_commentView!=nil){
  218. [_commentView removeFromSuperview];
  219. }
  220. //高度设置成150是为了遮挡语音输入时的空白
  221. _commentView=[[SendMessageView alloc] initWithFrame:CGRectMake(0,Screen_Height, Screen_Width,150)];
  222. if(tag==1||tag==2){
  223. [_commentView setHintMessage:@"说点什么吧..." view:self.view];
  224. }
  225. else if(tag==3){
  226. NSString *AtInfo=[NSString stringWithFormat:@"@%@",[replyInfo userName]];
  227. [_commentView setHintMessage:AtInfo view:self.view];
  228. }
  229. _commentView.backgroundColor = [UIColor colorWithWhite:0.910 alpha:1.000];
  230. [self.view addSubview:_commentView];
  231. self.selectedIndexPath=indexPath;
  232. _commentView.sendMessageDelegate = self;
  233. }
  234. /**
  235. 发送消息接口回调
  236. */
  237. - (void)didSendMessage:(NSString *)message albumInputView:(SendMessageView *)sendMessageView {
  238. if(_tag==1){
  239. if (self.selectedIndexPath && self.selectedIndexPath.row < self.dataList.count) {
  240. if(message==nil||message.length==0){
  241. [self showAlertViewText:@"评论信息不能为空"];
  242. return;
  243. }
  244. if(message.length>255){
  245. [self showAlertViewText:@"评论信息不能超过 255个字符"];
  246. return;
  247. }
  248. NSString *urlStr = ServerURL;
  249. NSMutableDictionary *dict = [NSMutableDictionary dictionary];
  250. [dict setObject:@"UpdateDailyRecordCheckManager" forKey:@"Action"];
  251. [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
  252. [dict setObject:kkUserCode forKey:@"UserCode"];
  253. [dict setObject:kkUserPwd forKey:@"UserPassword"];
  254. [dict setObject:kkSessionKey forKey:@"SessionKey"];
  255. NSString * recordid = [NSString stringWithFormat:@"%ld",(long)_logFrame.log.recordId];
  256. [dict setObject:recordid forKey:@"RecordID"];
  257. [dict setObject:message forKey:@"Remarks"];
  258. NSString * commentUserId = [NSString stringWithFormat:@"%ld",(long)_logFrame.log.commentUserId];
  259. [dict setObject:commentUserId forKey:@"CommentUserID"];
  260. _mDownManager = [[ASIDownManager alloc] init];
  261. NSString* json= [_mDownManager syncPostHttpRequestUrl:urlStr dic:dict path:nil filename:nil fileType:nil];
  262. if(json!=nil&&json.length>0){
  263. NSDictionary *dic = [json JSONValue];
  264. if (dic && [dic isKindOfClass:[NSDictionary class]]) {
  265. int iStatus = [[dic objectForKey:@"Status"] intValue];
  266. NSString *message1=[dic objectForKey:@"Message"];
  267. if(iStatus==0){
  268. NSString *commentTime=[dic objectForKey:@"Result"];
  269. for(int i=0;i<_logModel.logArr.count;i++){
  270. if(i==self.selectedIndexPath.row){
  271. LogFrame *logFrame=[_logModel.logArr objectAtIndex:self.selectedIndexPath.row];
  272. Log *log= logFrame.log;
  273. [log setRecordStatus:@"(已点评)"];
  274. [log setRemarks:message];
  275. [log setChecker:kkUserName];
  276. [log setCommentUpdateTime:commentTime];
  277. [logFrame setLogModel:log];
  278. break;
  279. }
  280. }
  281. [vCustomTableView.mTableView reloadRowsAtIndexPaths:@[self.selectedIndexPath] withRowAnimation:UITableViewRowAnimationNone];
  282. [sendMessageView finishSendMessage];
  283. if(_commentView!=nil){
  284. [_commentView removeFromSuperview];
  285. }
  286. }
  287. else if(iStatus==ActionResultStatusAuthError
  288. ||iStatus==ActionResultStatusNoLogin
  289. ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
  290. [self showReLoginDialog:message1];
  291. }
  292. else{
  293. [self showAlertViewText:message1];
  294. return;
  295. }
  296. }
  297. }
  298. }
  299. }
  300. else if(_tag==2){
  301. if (self.selectedIndexPath && self.selectedIndexPath.row < self.dataList.count) {
  302. if(message==nil||message.length==0){
  303. [self showAlertViewText:@"回复信息不能为空"];
  304. return;
  305. }
  306. if(message.length>255){
  307. [self showAlertViewText:@"回复信息不能超过 255个字符"];
  308. return;
  309. }
  310. NSString *urlStr = ServerURL;
  311. NSMutableDictionary *dict = [NSMutableDictionary dictionary];
  312. [dict setObject:@"SaveDailyRecordReplyManager" forKey:@"Action"];
  313. [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
  314. [dict setObject:kkUserCode forKey:@"UserCode"];
  315. [dict setObject:kkUserPwd forKey:@"UserPassword"];
  316. [dict setObject:kkSessionKey forKey:@"SessionKey"];
  317. NSString * recordid = [NSString stringWithFormat:@"%ld",(long)_logFrame.log.recordId];
  318. [dict setObject:recordid forKey:@"RecordID"];
  319. [dict setObject:@"" forKey:@"RepliedUserID"];
  320. [dict setObject:message forKey:@"ReplyContent"];
  321. self.mDownManager = [[ASIDownManager alloc] init];
  322. NSString* json = [_mDownManager syncPostHttpRequestUrl:urlStr dic:dict path:nil filename:nil fileType:nil]; if(json!=nil&&json.length>0){
  323. NSDictionary *dic = [json JSONValue];
  324. if (dic && [dic isKindOfClass:[NSDictionary class]]) {
  325. int iStatus = [[dic objectForKey:@"Status"] intValue];
  326. NSString *message1=[dic objectForKey:@"Message"];
  327. if(iStatus==0){
  328. ReplyInfo *info=[ReplyInfo new];
  329. [info setRecordId:[recordid intValue]];
  330. [info setRepliedUserName:@""];
  331. [info setReplyId:@""];
  332. [info setUserName:kkUserName];
  333. [info setCreateUserId:[kkUserID intValue]];
  334. [info setReplyContent:message];
  335. ReplyFrame *replyFrame=[[ReplyFrame alloc]init];
  336. [replyFrame setReplyInfoFrame:info];
  337. LogFrame *logFrame=[_logModel.logArr objectAtIndex:self.selectedIndexPath.row];
  338. Log *log= logFrame.log;
  339. NSMutableArray *replyInfoArray=[log replyArray];
  340. NSMutableArray *replyTempArray = [[NSMutableArray alloc] initWithArray:replyInfoArray];
  341. [replyTempArray addObject:replyFrame];
  342. log.replyArray=replyTempArray;
  343. [logFrame setLogModel:log];
  344. [vCustomTableView.mTableView reloadRowsAtIndexPaths:@[self.selectedIndexPath] withRowAnimation:UITableViewRowAnimationNone];
  345. [sendMessageView finishSendMessage];
  346. if(_commentView!=nil){
  347. [_commentView removeFromSuperview];
  348. }
  349. }
  350. else if(iStatus==ActionResultStatusAuthError
  351. ||iStatus==ActionResultStatusNoLogin
  352. ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
  353. [self showReLoginDialog:message1];
  354. return;
  355. }
  356. else{
  357. [self showAlertViewText:message1];
  358. return;
  359. }
  360. }
  361. }
  362. }
  363. }
  364. else if(_tag==3){
  365. if (self.selectedIndexPath && self.selectedIndexPath.row < self.dataList.count) {
  366. if(message==nil||message.length==0){
  367. [self showAlertViewText:@"回复信息不能为空"];
  368. return;
  369. }
  370. if(message.length>255){
  371. [self showAlertViewText:@"回复信息不能超过 255个字符"];
  372. return;
  373. }
  374. NSInteger recordId = 0;
  375. NSInteger replierId=0;
  376. NSString *userName=nil;
  377. ReplyInfo *info=nil;
  378. ReplyFrame *replyFrame;
  379. if(_replyInfo!=nil){
  380. recordId=[_replyInfo recordId];
  381. replierId=[_replyInfo createUserId];
  382. userName=[_replyInfo userName];
  383. info =[ReplyInfo new];
  384. [info setRecordId:recordId];
  385. [info setRepliedUserName:userName];
  386. [info setReplyUserId:replierId];
  387. [info setUserName:kkUserName];
  388. [info setReplyContent:message];
  389. replyFrame=[[ReplyFrame alloc]init];
  390. [replyFrame setReplyInfoFrame:info];
  391. }
  392. NSString *urlStr = ServerURL;
  393. NSMutableDictionary *dict = [NSMutableDictionary dictionary];
  394. [dict setObject:@"SaveDailyRecordReplyManager" forKey:@"Action"];
  395. [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
  396. [dict setObject:kkUserCode forKey:@"UserCode"];
  397. [dict setObject:kkUserPwd forKey:@"UserPassword"];
  398. [dict setObject:kkSessionKey forKey:@"SessionKey"];
  399. NSString * replierUserId;
  400. if(replierId==0){
  401. replierUserId= nil;
  402. }
  403. else{
  404. replierUserId = [NSString stringWithFormat:@"%ld",(long)replierId];
  405. }
  406. NSString *recordid = [NSString stringWithFormat:@"%ld",(long)recordId];
  407. [dict setObject:recordid forKey:@"RecordID"];
  408. [dict setObject:replierUserId forKeyedSubscript:@"RepliedUserID"];
  409. [dict setObject:message forKey:@"ReplyContent"];
  410. self.mDownManager = [[ASIDownManager alloc] init];
  411. NSString* json= [self.mDownManager syncPostHttpRequestUrl:urlStr dic:dict path:nil filename:nil fileType:nil];
  412. if(json!=nil&&json.length>0){
  413. NSDictionary *dic = [json JSONValue];
  414. if (dic && [dic isKindOfClass:[NSDictionary class]]) {
  415. int iStatus = [[dic objectForKey:@"Status"] intValue];
  416. NSString *message1=[dic objectForKey:@"Message"];
  417. if(iStatus==0){
  418. LogFrame *logFrame=[_logModel.logArr objectAtIndex:self.selectedIndexPath.row];
  419. Log *log= logFrame.log;
  420. NSMutableArray *replyInfoArray=[log replyArray];
  421. NSMutableArray *replyTempArray = [[NSMutableArray alloc] initWithArray:replyInfoArray];
  422. [replyTempArray addObject:replyFrame];
  423. log.replyArray=replyTempArray;
  424. [logFrame setLogModel:log];
  425. [vCustomTableView.mTableView reloadRowsAtIndexPaths:@[self.selectedIndexPath] withRowAnimation:UITableViewRowAnimationNone];
  426. [sendMessageView finishSendMessage];
  427. if(_commentView!=nil){
  428. [_commentView removeFromSuperview];
  429. }
  430. }
  431. else if(iStatus==ActionResultStatusAuthError
  432. ||iStatus==ActionResultStatusNoLogin
  433. ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
  434. [self showReLoginDialog:message1];
  435. return;
  436. }
  437. else{
  438. [self showAlertViewText:message1];
  439. return;
  440. }
  441. }
  442. }
  443. }
  444. }
  445. }
  446. #pragma mark - 私有函数
  447. -(void)refresh{
  448. pageNum=1;
  449. [dataList removeAllObjects];
  450. vCustomTableView.mbMoreHidden=YES;
  451. [vCustomTableView reloadData];
  452. [self reloadData];
  453. }
  454. /**
  455. 加载数据
  456. */
  457. -(void)reloadData
  458. {
  459. [self startLoading];
  460. NSString *urlStr = ServerURL;
  461. NSMutableDictionary *dict = [NSMutableDictionary dictionary];
  462. [dict setObject:@"GetAllDailyRecordManager" forKey:@"Action"];
  463. [dict setObject:kkAccountCode forKey:@"AccountCode"];
  464. [dict setObject:kkUserCode forKey:@"UserCode"];
  465. [dict setObject:kkUserPwd forKey:@"UserPassword"];
  466. [dict setObject:kkSessionKey forKey:@"SessionKey"];
  467. if(_startDate==nil){
  468. [dict setObject:@"" forKey:@"CreateTimeFrom"];
  469. }
  470. else{
  471. [dict setObject:_startDate forKey:@"CreateTimeFrom"];
  472. }
  473. if(_endDate==nil){
  474. [dict setObject:@"" forKey:@"CreateTimeTo"];
  475. }
  476. else{
  477. [dict setObject:_endDate forKey:@"CreateTimeTo"];
  478. }
  479. if(_createUserIds==nil){
  480. [dict setObject:@"" forKey:@"CreateUserIDs"];
  481. }
  482. else{
  483. [dict setObject:_createUserIds forKey:@"CreateUserIDs"];
  484. }
  485. [dict setObject:_recordStatus forKey:@"RecordStatus"];
  486. [dict setObject:[NSString stringWithFormat:@"%d",(int)pageNum] forKey:@"PageNum"];
  487. [dict setObject:[NSString stringWithFormat:@"%d",logPageSize] forKey:@"PageSize"];
  488. self.mDownManager = [[ASIDownManager alloc] init];
  489. _mDownManager.delegate = self;
  490. _mDownManager.OnImageDown = @selector(onLoadFinish:);
  491. _mDownManager.OnImageFail = @selector(onLoadFail:);
  492. [_mDownManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
  493. }
  494. /**
  495. 关闭键盘
  496. */
  497. -(void) closeKeyboard{
  498. [_commentView finishSendMessage];
  499. if(_commentView!=nil){
  500. [_commentView removeFromSuperview];
  501. }
  502. }
  503. @end