| | |
| | | private var listenNewModel:ListenNewModel! |
| | | private var page:Int! |
| | | var rootViewModel:HomeListenFightViewModel! |
| | | var teamScheduleModel:TeamScheduleModel? |
| | | |
| | | private var answerIndex:IndexPath? //答案的Index |
| | | private var answerIndexs = Set<IndexPath>() //回答过的Index集合 |
| | |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | | |
| | | //回传记录,始终保持答题进度 |
| | | if let team = teamScheduleModel{ |
| | | for teamId in team.teamIds{ |
| | | for v in listenNewModel.subjectList[page]{ |
| | | if team.topicIds.contains(v.id){ |
| | | rootViewModel.insertCorrectAnswer(teamId: "\(teamId)", answerId: v.id) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | override func viewDidAppear(_ animated: Bool) { |
| | |
| | | copyView.frame = CGRect(origin: newRect.origin, size: CGSize(width: 159, height: 52)) |
| | | copyView.view_state.isHidden = true |
| | | copyView.isCopy = true |
| | | copyView.isPlaying() |
| | | copyView.btn_isAnswer.setImage(self.viewModel.selectIndex.value?.row == 1 ? UIImage(named: "icon_question"):UIImage(named: "icon_answer"), for: .normal) |
| | | copyView.img_play.alpha = 1 |
| | | copyView.voiceUrl = tempSubV!.voiceUrl |
| | |
| | | func playComplete() { |
| | | self.view.isUserInteractionEnabled = true |
| | | |
| | | |
| | | for subV in view.subviews { |
| | | if let s = subV as? Lesson_4_AnswerView{ |
| | | s.playEnd() |
| | | s.img_play.isHidden = false |
| | | s.img_play.alpha = 1 |
| | | } |
| | | } |
| | | |
| | | |
| | | for subV in stackView.arrangedSubviews{ |
| | | if let s = subV as? Lesson_4_AnswerView{ |
| | | s.playEnd() |