Commit f12b0ca3 authored by Alex朱枝文's avatar Alex朱枝文

银河管家跳转更改

parent 911c1992
......@@ -85,31 +85,21 @@ class YHHomePageViewController: YHBaseViewController {
lazy var homeHeaderView: YHHomeHeadView = {
let view = YHHomeHeadView()
view.orderTipsViewClickEvent = {
goTabBarBy(tabType: .service)
}
view.galaxyManagerItemClickEvent = { [weak self] in
view.orderTipsViewClickEvent = { [weak self] in
guard let self = self else {
return
}
if self.isGoYHManagerFlag {
if YHButlerServiceManager.shared.isUatAllowed(), YHLoginManager.shared.isLogin() {
self.gotoMgrVC()
} else {
goTabBarBy(tabType: .community)
}
}
view.galaxyManagerItemClickEvent = { [weak self] in
guard let self = self else {
return
}
self.isGoYHManagerFlag = true
YHHUD.show(.progress(message: "加载中..."))
self.gotoYinHeManager(completion: { [weak self] success in
self?.isGoYHManagerFlag = false
guard let self = self else {
return
}
YHHUD.hide()
if success {
// 需要回到页面再刷新已读,因为不在当前页
self.needUpdateMgrItem = true
}
})
self.gotoMgrVC()
}
return view
}()
......@@ -117,6 +107,26 @@ class YHHomePageViewController: YHBaseViewController {
//MARK: - 私有方法
private extension YHHomePageViewController {
func gotoMgrVC() {
if self.isGoYHManagerFlag {
return
}
self.isGoYHManagerFlag = true
YHHUD.show(.progress(message: "加载中..."))
self.gotoYinHeManager(completion: { [weak self] success in
self?.isGoYHManagerFlag = false
guard let self = self else {
return
}
YHHUD.hide()
if success {
// 需要回到页面再刷新已读,因为不在当前页
self.needUpdateMgrItem = true
}
})
}
func updateMgrItem() {
// 页面已经加载了
guard isViewLoaded, homeHeaderView.superview != nil else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment