Commit 003180f4 authored by Alex朱枝文's avatar Alex朱枝文

在港记录代码优化

parent e2499cc7
......@@ -145,6 +145,8 @@ extension YHHKRecordsContentVC {
}
guard sections.count > 0 else {
noDataView.isHidden = false
datas = sections
tableView.reloadData()
return
}
datas = sections
......
......@@ -220,7 +220,7 @@ extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectio
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if collectionData.count > indexPath.item, let cell = collectionView.cellForItem(at: indexPath) as? YHHKRecordsPersonnelSelectCell {
if collectionData.count > indexPath.item {
let data = collectionData[indexPath.item]
data.isSelected = true
selectItemAction?(data)
......@@ -228,7 +228,7 @@ extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectio
}
func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {
if collectionData.count > indexPath.item, let cell = collectionView.cellForItem(at: indexPath) as? YHHKRecordsPersonnelSelectCell {
if collectionData.count > indexPath.item {
let data = collectionData[indexPath.item]
data.isSelected = false
deselectItemAction?(data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment