ode">
}
|
55
|
56
|
|
|
|
|
@@ -57,6 +58,16 @@ extension MineCoordinator: MineViewControllerDelegate {
|
|
57
|
58
|
}
|
|
58
|
59
|
}
|
|
59
|
60
|
|
|
|
61
|
+extension MineCoordinator: MineGroupViewModelDelegate {
|
|
|
62
|
+ func didSelect(_ item: GroupItem) {
|
|
|
63
|
+ let vc = makeGroupViewController(item: item)
|
|
|
64
|
+ let coordinator = GroupCoordinator(navigationController: navigationController)
|
|
|
65
|
+ childCoordinator["group"] = coordinator
|
|
|
66
|
+
|
|
|
67
|
+ navigationController.pushViewController(vc)
|
|
|
68
|
+ }
|
|
|
69
|
+}
|
|
|
70
|
+
|
|
60
|
71
|
fileprivate extension MineCoordinator {
|
|
61
|
72
|
func makeLoginViewController() -> LoginViewController {
|
|
62
|
73
|
let vc = UIStoryboard.main.instantiateController(LoginViewController.self)
|
|
|
|
@@ -86,6 +97,13 @@ fileprivate extension MineCoordinator {
|
|
86
|
97
|
let vc = UIStoryboard.mine.instantiateController(MineAboutViewController.self)
|
|
87
|
98
|
return vc
|
|
88
|
99
|
}
|
|
|
100
|
+
|
|
|
101
|
+ func makeGroupViewController(item: GroupItem) -> GroupViewController {
|
|
|
102
|
+ let vc = GroupViewController.instantiate()
|
|
|
103
|
+ vc.viewModel = GroupViewModel(groupItem: item)
|
|
|
104
|
+ vc.groupItem = item
|
|
|
105
|
+ return vc
|
|
|
106
|
+ }
|
|
89
|
107
|
}
|
|
90
|
108
|
|
|
91
|
109
|
extension UIStoryboard {
|
|
|
|
@@ -32,7 +32,7 @@ final class MineFeedbackViewController: UIViewController {
|
|
32
|
32
|
@IBAction func sendFeedBack() {
|
|
33
|
33
|
feedbackAPI.submit(text: textView.text).subscribe(onCompleted: {[weak self] in
|
|
34
|
34
|
guard let `self` = self else { return }
|
|
35
|
|
- self.popController()
|
|
|
35
|
+ self.navigationController?.popViewController(animated: true)
|
|
36
|
36
|
Toast.show(message: "感谢您的建议")
|
|
37
|
37
|
}) { (error) in
|
|
38
|
38
|
|
|
|
|
@@ -65,7 +65,7 @@ final class DetailPageController: UIViewController {
|
|
65
|
65
|
//// last.mainViewModel.models.value = datas
|
|
66
|
66
|
// }
|
|
67
|
67
|
//
|
|
68
|
|
-// if let last = navigationController?.viewControllers[(navigationController?.viewControllers.count)! - 1] as? GroupPageController {
|
|
|
68
|
+// if let last = navigationController?.viewControllers[(navigationController?.viewControllers.count)! - 1] as? GroupViewController {
|
|
69
|
69
|
//// last.MineGroupViewModel.models.value = datas
|
|
70
|
70
|
// }
|
|
71
|
71
|
// }
|
|
|
|
@@ -287,7 +287,7 @@ extension DetailPageController: CellDelegate {
|
|
287
|
287
|
}
|
|
288
|
288
|
|
|
289
|
289
|
func pushNext() {
|
|
290
|
|
- let ctl = UIStoryboard.main.instantiateController(GroupPageController.self)
|
|
|
290
|
+ let ctl = UIStoryboard.main.instantiateController(GroupViewController.self)
|
|
291
|
291
|
|
|
292
|
292
|
// ctl.groupModel = GroupModel(map: Map(mappingType: .fromJSON, JSON: datas[currentPhotoIndex].toJSON()))
|
|
293
|
293
|
show(ctl, sender: nil)
|