fix
无故事王国
2024-06-19 ee4954eb4dc84e0a6c0a784da717f9cc648b106b
DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenFight_lesson_3_VC.swift
@@ -20,6 +20,7 @@
                        let collection = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
                        collection.register(UINib(nibName: "ListenFight_lesson_3_CCell", bundle: nil), forCellWithReuseIdentifier: "_ListenFight_lesson_3_CCell")
                        collection.register(UICollectionReusableView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "header")
                        collection.isScrollEnabled = false
                        return collection
            }()
@@ -151,6 +152,8 @@
            @objc private func chooseAnswerAction(btn:UIButton){
                        guard viewModel.selectIndex != nil else {return}
                        if !islisten{
                                    alertError(msg: "请先听题");return
                        }
@@ -225,6 +228,7 @@
                                                }
                                                guard ansterIndePath != nil else {return}
                                                self.viewModel.selectIndex.accept(nil)
                                                if let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_ListenFight_lesson_3_CCell", for: ansterIndePath!) as? ListenFight_lesson_3_CCell{
                                                            var newFrame = cell.img_cover.convert(cell.img_cover.bounds, to: self.view)
@@ -235,10 +239,8 @@
                                                            } completion: { _ in
                                                                        self.answterCount += 1
                                                                        self.voicePlayer.playerAt(url: self.listenNewModel.subjectList[self.page][valueIndex].correct)
                                                                        DispatchQueue.main.asyncAfter(deadline: .now()+1.0) {
                                                                                    self.setAnswerStackView()
                                                                                    self.viewModel.selectIndex.accept(nil)
                                                                                    let v = self.rootViewModel.answerCount.value + 1
                                                                                    self.rootViewModel.answerCount.accept(v)
                                                                                    self.collectionView.reloadData()