NewMessage.m 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. // NewMessage.m
  3. // LN_School
  4. //
  5. // Created by EchoShacolee on 2017/6/26.
  6. // Copyright © 2017年 Danson. All rights reserved.
  7. //
  8. #import "NewMessage.h"
  9. @interface NewMessage ()
  10. @end
  11. @implementation NewMessage
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. // [self getData];
  15. }
  16. #pragma mark 数据请求
  17. - (void)getData{
  18. //判断网络是否连接
  19. if (![NetManager connectedToNetWork]) {
  20. showMsgUnconnect();
  21. return;
  22. }
  23. NSMutableDictionary * mDic = [NSMutableDictionary new];
  24. [mDic setValue:defUser.userDict[@"dqbh"] forKey:@"dqbh"];
  25. [mDic setValue:defUser.userDict[@"qxbh"] forKey:@"qxbh"];
  26. [mDic setValue:@"" forKey:@"type"];
  27. [NetManager requestAnythingWithURL:@"getMsgs" dictionary:mDic dataArray:nil completion:^(NSDictionary *root) {
  28. //
  29. // if (!root) {
  30. // ShowMsg(@"数据请求失败,请重试");
  31. // return;
  32. // }
  33. // if ([root[@"code"] integerValue] == 1) {
  34. // ShowMsg(root[@"msg"]);
  35. // return;
  36. // }
  37. //
  38. // _dataSurce = root[@"body"];
  39. //
  40. // if (_dataSurce.count > 0) {
  41. // holderV.hidden = YES;
  42. // }
  43. //
  44. // [_tableView reloadData];
  45. }];
  46. }
  47. - (void)didReceiveMemoryWarning {
  48. [super didReceiveMemoryWarning];
  49. // Dispose of any resources that can be recreated.
  50. }
  51. /*
  52. #pragma mark - Navigation
  53. // In a storyboard-based application, you will often want to do a little preparation before navigation
  54. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  55. // Get the new view controller using [segue destinationViewController].
  56. // Pass the selected object to the new view controller.
  57. }
  58. */
  59. @end