| | |
| | | |
| | | [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. |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | -(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"] |
| | |
| | | { |
| | | //[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]; |
| | | } |