This commit is contained in:
zjx 2025-06-17 09:01:49 +08:00
parent 4f402efabf
commit d6e314a97f

View File

@ -262,6 +262,20 @@ extension SPEpisodeView: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard indexPath.row != currentIndex else { return }
var lastIndex = indexPath.row - 1
var lastIsLock = false
if lastIndex > 0 && lastIndex < self.dataArr.count {
let lastModel = self.dataArr[lastIndex]
lastIsLock = lastModel.is_lock ?? false
}
if lastIsLock {
SPToast.show(text: "movia_jump_unlock_error".localized)
return
}
self.didSelectedIndex?(indexPath.row)
self.dismiss(animated: true) {