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

在港记录代码优化

parent e2499cc7
...@@ -145,6 +145,8 @@ extension YHHKRecordsContentVC { ...@@ -145,6 +145,8 @@ extension YHHKRecordsContentVC {
} }
guard sections.count > 0 else { guard sections.count > 0 else {
noDataView.isHidden = false noDataView.isHidden = false
datas = sections
tableView.reloadData()
return return
} }
datas = sections datas = sections
......
...@@ -220,7 +220,7 @@ extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectio ...@@ -220,7 +220,7 @@ extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectio
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { 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] let data = collectionData[indexPath.item]
data.isSelected = true data.isSelected = true
selectItemAction?(data) selectItemAction?(data)
...@@ -228,7 +228,7 @@ extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectio ...@@ -228,7 +228,7 @@ extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectio
} }
func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) { 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] let data = collectionData[indexPath.item]
data.isSelected = false data.isSelected = false
deselectItemAction?(data) 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