From 7c7bb620c2670e316617273ffabe9f690f989ad0 Mon Sep 17 00:00:00 2001
From: 无故事王国 <841720330@qq.com>
Date: 星期四, 13 六月 2024 22:55:33 +0800
Subject: [PATCH] fix

---
 DolphinEnglishLearnStudent/Moudle/Home/VC/HomeStudyCompleteVC.swift |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/DolphinEnglishLearnStudent/Moudle/Home/VC/HomeStudyCompleteVC.swift b/DolphinEnglishLearnStudent/Moudle/Home/VC/HomeStudyCompleteVC.swift
index 279fd56..d28f2be 100644
--- a/DolphinEnglishLearnStudent/Moudle/Home/VC/HomeStudyCompleteVC.swift
+++ b/DolphinEnglishLearnStudent/Moudle/Home/VC/HomeStudyCompleteVC.swift
@@ -39,6 +39,10 @@
     override func viewDidLoad() {
         super.viewDidLoad()
 
+								yy_popBlock = {[weak self] () in
+												self?.backAction()
+								}
+
 								label_coin.text = "恭喜你,已完成全部答题!获得\(totalCoin)积分!"
 								label_correctNum.text = "\(correctNum)次"
 								label_errorNum.text = "\(errorNum)次"
@@ -56,15 +60,7 @@
 				}
 
 				@IBAction func backHomeAction(_ sender: UIButton) {
-								for vc in navigationController?.viewControllers ?? []{
-												if vc.isKind(of: HomeListenMenuVC.self){
-																navigationController?.popToViewController(vc, animated: true);break
-												}
-
-												if vc.isKind(of: HomeListenVC.self){
-																navigationController?.popToViewController(vc, animated: true);break
-												}
-								}
+								backAction()
 				}
 
 				@IBAction func nextAction(_ sender: UIButton) {
@@ -85,4 +81,16 @@
 												NotificationCenter.default.post(name: StudyCompleteNextLession_Noti, object: nextType)
 								}
 				}
+
+				private func backAction(){
+								for vc in navigationController?.viewControllers ?? []{
+												if vc.isKind(of: HomeListenMenuVC.self){
+																navigationController?.popToViewController(vc, animated: true);break
+												}
+
+												if vc.isKind(of: HomeListenVC.self){
+																navigationController?.popToViewController(vc, animated: true);break
+												}
+								}
+				}
 }

--
Gitblit v1.7.1