Commit 8598c3ab78878e12ef423a6249331ed26c63f359
1 parent
10b0adc1
刷新我的资料
Showing
1 changed file
with
14 additions
and
21 deletions
LiveVideoCloud/Classes/Sections/Mine/Controllers/MinePersonalDataController.m
| ... | ... | @@ -28,45 +28,38 @@ |
| 28 | 28 | [super viewDidLoad]; |
| 29 | 29 | |
| 30 | 30 | self.title = @"个人资料"; |
| 31 | - // self.view.backgroundColor = CommonBgColor; | |
| 32 | 31 | } |
| 33 | 32 | |
| 34 | 33 | |
| 35 | 34 | - (void)viewWillAppear:(BOOL)animated |
| 36 | 35 | { |
| 37 | 36 | [super viewWillAppear:animated]; |
| 38 | - [_tbv reloadData]; | |
| 37 | + [self updateUserData]; | |
| 39 | 38 | } |
| 40 | 39 | |
| 40 | +- (void)updateUserData | |
| 41 | +{ | |
| 42 | + [CNLiveUserSystemCenter queryUserInfoWithUid:[UserInformationModel manager].uid srcUid:[UserInformationModel manager].uid success:^(id result) { | |
| 43 | + NSLog(@"query result = %@",result); | |
| 44 | + [UserTools clearLocalUserInfo]; | |
| 45 | + [UserTools saveUserinfoDic:result[@"data"]]; | |
| 46 | + [_tbv reloadData]; | |
| 47 | + | |
| 48 | + } failure:^(NSDictionary *errorDic) { | |
| 49 | + NSLog(@"query errorDic = %@",errorDic); | |
| 50 | + }]; | |
| 51 | +} | |
| 41 | 52 | |
| 42 | 53 | - (void)bindView |
| 43 | 54 | { |
| 44 | 55 | self.tbv.frame = CGRectMake(0, 0, SCREEN_W, SCREEN_H -64 ); |
| 45 | 56 | [self.view addSubview:self.tbv]; |
| 46 | 57 | } |
| 47 | --(void)bindModel | |
| 58 | +- (void)bindModel | |
| 48 | 59 | { |
| 49 | 60 | [self.dataarray removeAllObjects]; |
| 50 | - // isLogin = NO; | |
| 51 | - // | |
| 52 | - // if ([UserTools isLogin]) | |
| 53 | - // { | |
| 54 | - // isLogin = YES; | |
| 55 | - // }else | |
| 56 | - // { | |
| 57 | - // isLogin = NO; | |
| 58 | - // } | |
| 59 | 61 | } |
| 60 | 62 | |
| 61 | -//- (UIButton *)quitBtn | |
| 62 | -//{ | |
| 63 | -// if (!_quitBtn) { | |
| 64 | -// _quitBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 65 | -// [_quitBtn setImage:[UIImage imageNamed:@" edit"] forState:UIControlStateNormal]; | |
| 66 | -// [_quitBtn addTarget:self action:@selector(quitBtnClick) forControlEvents:UIControlEventTouchUpInside]; | |
| 67 | -// } | |
| 68 | -// return _quitBtn; | |
| 69 | -//} | |
| 70 | 63 | - (NSMutableArray *)dataarray |
| 71 | 64 | { |
| 72 | 65 | if (!_dataarray) { | ... | ... |