单军华
2018-04-18 de88ae127e305e0b153c327b073645f9353cace5
pregnancy_guard/BaseProject/Controller/Mine/HistoryRecordPage.m
@@ -183,11 +183,7 @@
    
    [self GetUserDataList];
    
    NoticeModel * model = [[NoticeModel alloc] init];
    self.adNoticeView = [[AdNoticeView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) dataModel:model];
    //self.adNoticeView.delegate = self;
    [self.view addSubview:self.adNoticeView];
    [self GetNoticeInfo];
    // Do any additional setup after loading the view.
}
@@ -221,6 +217,52 @@
    }
}
-(void)GetNoticeInfo
{
    //[UserDefault stringForKey:@"user_id"]
    NSString *path = [[NSString alloc] initWithFormat:GET_NOTICE];
    NSMutableDictionary * params = [[NSMutableDictionary alloc] init];
    MPWeakSelf(self);
    [NetworkSingleton networkingGetMethod:params urlName:path success:^(id responseBody)
     {
         MPStrongSelf(self);
         BaseResModel * resModel = [Global toBaseModel:responseBody];
         if(resModel.code == 0)
         {
             //[UserDefault setObject:self.is_open_upload forKey:@"is_open_upload"];
             [UserDefault synchronize];
             NoticeModel * model = [NoticeModel mj_objectWithKeyValues:resModel.content];
             if (self.adNoticeView == nil)
             {
                 self.adNoticeView = [[AdNoticeView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) dataModel:model];
                 //self.adNoticeView.delegate = self;
                 [self.view addSubview:self.adNoticeView];
             }
            else
            {
               [self.adNoticeView setUIView:model];
            }
         }
         else
         {
             //[Global alertMessageEx:resModel.desc title:@"提示信息" okTtitle:nil cancelTitle:@"OK" delegate:self];
         }
     }
                                  failure:^(NSString *error)
     {
         [Global alertMessageEx:error title:@"获取失败" okTtitle:nil cancelTitle:@"OK" delegate:self];
     }];
}
-(void)GetUserDataList
{
    //[UserDefault stringForKey:@"user_id"]
@@ -241,7 +283,7 @@
         {
             //[UserDefault setObject:self.is_open_upload forKey:@"is_open_upload"];
             [UserDefault synchronize];
             //[self.tableView reloadData];
             [Global alertMessageEx:resModel.desc title:@"提示信息" okTtitle:nil cancelTitle:@"OK" delegate:self];
         }