|  | @@ -25,8 +25,7 @@
 | 
	
		
			
				|  |  |  #import "ModifyPhoneCheckController.h"
 | 
	
		
			
				|  |  |  #import "UserAuthViewController.h"
 | 
	
		
			
				|  |  |  #import "ModifyNameViewController.h"
 | 
	
		
			
				|  |  | -#import "MyCreateGroupBottomView.h"
 | 
	
		
			
				|  |  | -#import "MineFansGroupCell.h"
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  @interface MyStyleViewController ()<UITableViewDelegate,UITableViewDataSource,WMPlayerDelegate,RSKImageCropViewControllerDelegate,RSKImageCropViewControllerDataSource>
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |      WMPlayer *_wmPlayer;
 | 
	
	
		
			
				|  | @@ -63,7 +62,6 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @property (nonatomic, strong) MyStyleEditHeadView *infoHeadView;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -@property (nonatomic, strong) MyCreateGroupHeadView *groupHeadView;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @end
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -75,7 +73,6 @@
 | 
	
		
			
				|  |  |      self.ks_prefersNavigationBarHidden = YES;
 | 
	
		
			
				|  |  |      [self configUI];
 | 
	
		
			
				|  |  |      [self requestMyStyle];
 | 
	
		
			
				|  |  | -    [self requestTeacherGroup];
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (void)viewWillAppear:(BOOL)animated {
 | 
	
	
		
			
				|  | @@ -139,25 +136,7 @@
 | 
	
		
			
				|  |  |      }];
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -- (void)requestTeacherGroup {
 | 
	
		
			
				|  |  | -    [KSNetworkingManager queryTeacherGroupRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
 | 
	
		
			
				|  |  | -        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
 | 
	
		
			
				|  |  | -            NSArray *sourceArray = [dic arrayValueForKey:@"data"];
 | 
	
		
			
				|  |  | -            NSMutableArray *groupArray = [NSMutableArray array];
 | 
	
		
			
				|  |  | -            for (NSDictionary *parm in sourceArray) {
 | 
	
		
			
				|  |  | -                MinePageGroupModel *model = [[MinePageGroupModel alloc] initWithDictionary:parm];
 | 
	
		
			
				|  |  | -                [groupArray addObject:model];
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            self.fansGroupArray = [NSMutableArray arrayWithArray:groupArray];
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        else {
 | 
	
		
			
				|  |  | -            [self MBPShow:MESSAGEKEY];
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        [self.tableView reloadData];
 | 
	
		
			
				|  |  | -    } faliure:^(NSError * _Nonnull error) {
 | 
	
		
			
				|  |  | -        
 | 
	
		
			
				|  |  | -    }];
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (void)configWithSubjectMessage:(NSString *)subjectId subjectName:(NSString *)subjectName {
 | 
	
		
			
				|  |  |      if (![NSString isEmptyString:subjectId] && ![NSString isEmptyString:subjectName]) {
 | 
	
	
		
			
				|  | @@ -240,90 +219,61 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  #pragma mark ---- table data source
 | 
	
		
			
				|  |  |  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
 | 
	
		
			
				|  |  | -    return 2;
 | 
	
		
			
				|  |  | +    return 1;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
 | 
	
		
			
				|  |  | -    if (section == 1) {
 | 
	
		
			
				|  |  | -        return self.fansGroupArray.count;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      return 3;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
 | 
	
		
			
				|  |  | -    if (section == 0) {
 | 
	
		
			
				|  |  | -        return [MyStyleEditHeadView getViewHeight];
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    else {
 | 
	
		
			
				|  |  | -        return [MyCreateGroupHeadView getViewHeight];
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    return [MyStyleEditHeadView getViewHeight];
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
 | 
	
		
			
				|  |  | -    if (section == 0) {
 | 
	
		
			
				|  |  | -        return CGFLOAT_MIN;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    else {
 | 
	
		
			
				|  |  | -        return [MyCreateGroupBottomView getViewHeight];
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    return CGFLOAT_MIN;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
 | 
	
		
			
				|  |  | -    if (section == 0) {
 | 
	
		
			
				|  |  | -        return self.infoHeadView;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    return self.groupHeadView;
 | 
	
		
			
				|  |  | +    return self.infoHeadView;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
 | 
	
		
			
				|  |  | -    if (section == 0) {
 | 
	
		
			
				|  |  | -        return [UIView new];
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    return [MyCreateGroupBottomView shareInstance];
 | 
	
		
			
				|  |  | +   return [UIView new];
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
 | 
	
		
			
				|  |  | -    if (indexPath.section == 0) {
 | 
	
		
			
				|  |  | -        if (indexPath.row == 0) {
 | 
	
		
			
				|  |  | -            MyStyleInstrumentCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyStyleInstrumentCell"];
 | 
	
		
			
				|  |  | -            MJWeakSelf;
 | 
	
		
			
				|  |  | -            [cell configWithSource:self.instrumentArray callback:^(STYLE_INSTRUMENT type, NSMutableArray * _Nullable sourceArray) {
 | 
	
		
			
				|  |  | -                if (type == STYLE_INSTRUMENT_CHOOSE) {
 | 
	
		
			
				|  |  | -                    [weakSelf chooseInstrumentWithArray:sourceArray];
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                else { // 刷新
 | 
	
		
			
				|  |  | -                    [weakSelf refreshInstrumentPart:sourceArray];
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }];
 | 
	
		
			
				|  |  | -            return cell;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        else if (indexPath.row == 1) {
 | 
	
		
			
				|  |  | -            MyStyleIntroduceCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyStyleIntroduceCell"];
 | 
	
		
			
				|  |  | -            MJWeakSelf;
 | 
	
		
			
				|  |  | -            [cell configWithIntroduceMessage:self.content modifyCallback:^(NSString * _Nullable content) {
 | 
	
		
			
				|  |  | -                weakSelf.content = content;
 | 
	
		
			
				|  |  | -            }];
 | 
	
		
			
				|  |  | -            return cell;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        else {
 | 
	
		
			
				|  |  | -            MyStyleVideoCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyStyleVideoCell"];
 | 
	
		
			
				|  |  | -            [cell configWithSource:self.videoArray];
 | 
	
		
			
				|  |  | -            MJWeakSelf;
 | 
	
		
			
				|  |  | -            [cell opreationCallback:^(STYLEVIDEO type, UIView * _Nullable containerView) {
 | 
	
		
			
				|  |  | -                [weakSelf opreationVideoCell:type container:containerView];
 | 
	
		
			
				|  |  | -            }];
 | 
	
		
			
				|  |  | -            return cell;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +    if (indexPath.row == 0) {
 | 
	
		
			
				|  |  | +        MyStyleInstrumentCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyStyleInstrumentCell"];
 | 
	
		
			
				|  |  | +        MJWeakSelf;
 | 
	
		
			
				|  |  | +        [cell configWithSource:self.instrumentArray callback:^(STYLE_INSTRUMENT type, NSMutableArray * _Nullable sourceArray) {
 | 
	
		
			
				|  |  | +            if (type == STYLE_INSTRUMENT_CHOOSE) {
 | 
	
		
			
				|  |  | +                [weakSelf chooseInstrumentWithArray:sourceArray];
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            else { // 刷新
 | 
	
		
			
				|  |  | +                [weakSelf refreshInstrumentPart:sourceArray];
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }];
 | 
	
		
			
				|  |  | +        return cell;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    else if (indexPath.row == 1) {
 | 
	
		
			
				|  |  | +        MyStyleIntroduceCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyStyleIntroduceCell"];
 | 
	
		
			
				|  |  | +        MJWeakSelf;
 | 
	
		
			
				|  |  | +        [cell configWithIntroduceMessage:self.content modifyCallback:^(NSString * _Nullable content) {
 | 
	
		
			
				|  |  | +            weakSelf.content = content;
 | 
	
		
			
				|  |  | +        }];
 | 
	
		
			
				|  |  | +        return cell;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      else {
 | 
	
		
			
				|  |  | -        MinePageGroupModel *model = self.fansGroupArray[indexPath.row];
 | 
	
		
			
				|  |  | -        MineFansGroupCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MineFansGroupCell"];
 | 
	
		
			
				|  |  | -        
 | 
	
		
			
				|  |  | -        [cell configWithSource:model chatAction:^(NSString *groupName, NSString *groupId) {
 | 
	
		
			
				|  |  | +        MyStyleVideoCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyStyleVideoCell"];
 | 
	
		
			
				|  |  | +        [cell configWithSource:self.videoArray];
 | 
	
		
			
				|  |  | +        MJWeakSelf;
 | 
	
		
			
				|  |  | +        [cell opreationCallback:^(STYLEVIDEO type, UIView * _Nullable containerView) {
 | 
	
		
			
				|  |  | +            [weakSelf opreationVideoCell:type container:containerView];
 | 
	
		
			
				|  |  |          }];
 | 
	
		
			
				|  |  |          return cell;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  - (void)opreationVideoCell:(STYLEVIDEO)type container:(UIView *)container {
 | 
	
	
		
			
				|  | @@ -776,25 +726,6 @@
 | 
	
		
			
				|  |  |      [[RCIM sharedRCIM] clearGroupUserInfoCache];
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -- (MyCreateGroupHeadView *)groupHeadView {
 | 
	
		
			
				|  |  | -    if (!_groupHeadView) {
 | 
	
		
			
				|  |  | -        _groupHeadView = [MyCreateGroupHeadView shareInstance];
 | 
	
		
			
				|  |  | -        MJWeakSelf;
 | 
	
		
			
				|  |  | -        [_groupHeadView createGroupCallback:^{
 | 
	
		
			
				|  |  | -            [weakSelf createGroupAction];
 | 
	
		
			
				|  |  | -        }];
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    return _groupHeadView;
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -- (void)createGroupAction {
 | 
	
		
			
				|  |  | -    CreateFansGroupViewController *ctrl = [[CreateFansGroupViewController alloc] init];
 | 
	
		
			
				|  |  | -    MJWeakSelf;
 | 
	
		
			
				|  |  | -    [ctrl successCallback:^{
 | 
	
		
			
				|  |  | -        [weakSelf requestTeacherGroup];
 | 
	
		
			
				|  |  | -    }];
 | 
	
		
			
				|  |  | -    [self.navigationController pushViewController:ctrl animated:YES];
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  #pragma mark --- RSKImageCropViewControllerDelegate
 | 
	
		
			
				|  |  |  
 |