Skip to content

Commit 129dee6

Browse files
committed
公开项目的成员,对外不可见 - 改了先
1 parent f49b35f commit 129dee6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Coding_iOS/Controllers/NProjectViewController/NProjectViewController.m

+7-4
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
149149
if (section == 0 || section == 2) {
150150
row = 2;
151151
}else if (section == 1){
152-
row = _myProject.is_public.boolValue? 4: 6;
152+
row = _myProject.is_public.boolValue? _myProject.current_user_role_id.integerValue <= 70? 3: 4: 6;
153153
}
154154
return row;
155155
}
@@ -233,10 +233,13 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
233233
if (indexPath.section == 0) {
234234
cellHeight = indexPath.row == 0? [ProjectInfoCell cellHeight]: [ProjectDescriptionCell cellHeightWithObj:_myProject];
235235
}else if (indexPath.section == 1){
236-
NSInteger codeNum = _myProject.is_public.boolValue? 2: 4;
237-
cellHeight = (indexPath.row == codeNum && !_myProject.is_public.boolValue && _myProject.current_user_role_id.integerValue <= 75)? 0: [NProjectItemCell cellHeight];
236+
if (!_myProject.is_public.boolValue && _myProject.current_user_role_id.integerValue <= 75 && indexPath.row == 4) {//私有项目的受限成员,不能查看代码
237+
cellHeight = 0;
238+
}else{
239+
cellHeight = [NProjectItemCell cellHeight];
240+
}
238241
}else{
239-
cellHeight = (!_myProject.is_public.boolValue && _myProject.current_user_role_id.integerValue <= 75)? 0: [NProjectItemCell cellHeight];
242+
cellHeight = (!_myProject.is_public.boolValue && _myProject.current_user_role_id.integerValue <= 75)? 0: [NProjectItemCell cellHeight];//私有项目的受限成员,不能查看代码
240243
}
241244
return cellHeight;
242245
}

0 commit comments

Comments
 (0)