From eb0532b0ed613459085eb803605c2bb307db7e6d Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期一, 28 十月 2024 15:18:39 +0800 Subject: [PATCH] fix bug --- XQMuse/Root/Me/VC/StudyListVC.swift | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/XQMuse/Root/Me/VC/StudyListVC.swift b/XQMuse/Root/Me/VC/StudyListVC.swift index 464fb98..ab887b7 100644 --- a/XQMuse/Root/Me/VC/StudyListVC.swift +++ b/XQMuse/Root/Me/VC/StudyListVC.swift @@ -54,12 +54,15 @@ func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + var modelId:Int? if indexPath.section == 0{ + guard datas?.courseList.count != 0 else{return} modelId = datas?.courseList[indexPath.row].id } if indexPath.section == 0{ + guard datas?.freeCourseList.count != 0 else{return} modelId = datas?.freeCourseList[indexPath.row].id } -- Gitblit v1.7.1