fix
无故事王国
2024-06-18 c1862d736587c9a5c10a368dabaeb72be2df4bcb
DolphinEnglishLearnStudent/Moudle/Home/Listen/VC/HomeListenFightVC.swift
@@ -164,21 +164,6 @@
                        setPages()
                        pageVC.reloadData()
//                        if viewModel.listenType.value == .game1 || viewModel.listenType.value == .game2{
//                                    btn_forward.isHidden = true
//                                    label_pageNum.isHidden = true
//
//                                    if viewModel.listenType.value == .game1{
//                                                showGameLevel()
//                                    }
//                        }else if viewModel.listenType.value == .story1 || viewModel.listenType.value == .story2{
//                                    let count = (data as! Listen1Model).storyList.count
//                                    viewModel.maxPage.accept(count)
//                                    label_pageNum.text = "已完成:\(viewModel.currentPage.value + 1)/\(viewModel.maxPage.value)"
//                        }else{
//                                    pageVC.reloadData()
//                        }
                        timer = Timer(fire: .distantPast, interval: 1.0, repeats: true, block: {[weak self] _ in
                                    self?.viewModel.times += 1
                        })
@@ -290,27 +275,6 @@
                                                            weakSelf.btn_exit.setTitle("完成", for: .normal)
                                                }
                                    }
                                    //以下无效代码
//
//
//                                    //完成
//                                    if nextPage >= weakSelf.viewModel.maxPage.value{
//                                                switch weakSelf.viewModel.listenType.value {
//                                                            case .game1,.game2:
//                                                                        if let dict = noti.object as? Dictionary<String,Any>{
//                                                                                    weakSelf.gamesComplete(gameId: dict["gameId"] as! Int,integral: dict["gameIntegral"] as! Int)
//                                                                        }
//                                                            case .lesson1,.lesson2,.lesson3,.lesson4,.lesson5:
//                                                                        weakSelf.studyComplete()
//                                                            case .story1,.story2:
//                                                                        if let dict = noti.object as? Dictionary<String,Any>{
//                                                                                    weakSelf.storyComplete(storyId: dict["storyId"] as! Int, integral: dict["storyIntegral"] as! Int)
//                                                                        }
//                                                }
//                                                return
//                                    }
                                    weakSelf.listenFightLine = .next
                                    weakSelf.pageVC.scroll(toPage: nextPage, animation: true)
@@ -476,7 +440,7 @@
            @objc func beforeAction(){
                        listenFightLine = .before
                        let beforePage = max(0, viewModel.currentPage.value - 1)
                        var beforePage = max(0, viewModel.currentPage.value - 1)
                        pageVC.scroll(toPage: beforePage, animation: true)
                        viewModel.currentPage.accept(beforePage)