| | |
| | | viewModel.selectIndex.accept(IndexPath(row: 0, section: 0)) |
| | | collectionView.delegate = self |
| | | collectionView.dataSource = self |
| | | collectionView.isScrollEnabled = false |
| | | collectionView.showsVerticalScrollIndicator = false |
| | | collectionView.backgroundColor = .clear |
| | | collectionView.jq_addShadows(shadowColor: UIColor.black.withAlphaComponent(0.1), corner: 8, radius: 10, offset: CGSize(width: 0, height: 2), opacity: 1) |
| | |
| | | handleView.tag = 20 + index |
| | | handleView.chooseClouse {[weak self] btn in |
| | | guard let weakSelf = self else { return } |
| | | if weakSelf.isPlayedSet.count != 3{ |
| | | handleView.btn_choose.isSelected = false |
| | | alertError(msg: "请听完");return |
| | | } |
| | | |
| | | var lessionType:Fight_lessonType = .none |
| | | if weakSelf.listen1Model.storyList[weakSelf.page].correct == handleView.vioceSoundUrl{ |
| | |
| | | |
| | | extension HomeListenStory_1_VC:VoicePlayerDelegate{ |
| | | func playComplete() { |
| | | |
| | | view.isUserInteractionEnabled = true |
| | | if viewModel.answerType.value == .success{ |
| | | DispatchQueue.main.asyncAfter(delay: 3.0) { |
| | | var dict = Dictionary<String,Any>() |
| | | dict["storyIntegral"] = self.listen1Model.data?.lookIntegral ?? 0 |
| | | dict["storyIntegral"] = self.listen1Model.data?.integral ?? 0 |
| | | dict["storyId"] = self.listen1Model.data?.id ?? 0 |
| | | NotificationCenter.default.post(name: NextLession_Noti, object: dict) |
| | | } |
| | |
| | | } |
| | | |
| | | func playing() { |
| | | |
| | | view.isUserInteractionEnabled = false |
| | | } |
| | | } |