Commit a40310fd authored by David黄金龙's avatar David黄金龙

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  删除无用通知
  // 我的页面
  逻辑添加
parents dd5432a0 1ca4aa0a
...@@ -123,10 +123,6 @@ extension YHServiceCenterMainViewController { ...@@ -123,10 +123,6 @@ extension YHServiceCenterMainViewController {
make.left.equalTo(20) make.left.equalTo(20)
make.height.equalTo(29) make.height.equalTo(29)
} }
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
} }
override func viewDidLayoutSubviews() { override func viewDidLayoutSubviews() {
...@@ -169,15 +165,6 @@ extension YHServiceCenterMainViewController: JXSegmentedListContainerViewDataSou ...@@ -169,15 +165,6 @@ extension YHServiceCenterMainViewController: JXSegmentedListContainerViewDataSou
extension YHServiceCenterMainViewController { extension YHServiceCenterMainViewController {
@objc func loginSuccess() {
printLog("登录成功,进行相应的 UI刷新操作")
loadData()
}
@objc func logoutSuccess() {
handleRightUI()
}
private func handleRightUI() { private func handleRightUI() {
if serviceCenterMainReqVM.arrContactList.isEmpty { if serviceCenterMainReqVM.arrContactList.isEmpty {
noDataView.isHidden = false noDataView.isHidden = false
......
...@@ -165,9 +165,14 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -165,9 +165,14 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(clearUnreadBadge), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil)
} }
deinit {
NotificationCenter.default.removeObserver(self)
}
func requestLikeCollectionCount() { func requestLikeCollectionCount() {
self.likeViewModel.getLikeCollectionRecentScanCountInfo { self.likeViewModel.getLikeCollectionRecentScanCountInfo {
[weak self] success, error in [weak self] success, error in
...@@ -193,9 +198,19 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -193,9 +198,19 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
self.tableView .reloadData() self.tableView .reloadData()
} }
} }
} }
}
@objc func clearUnreadBadge() {
DispatchQueue.main.async {
for item in self.items {
if item.type == .myMessage {
item.isShowRedPoint = false
break
}
}
self.tableView .reloadData()
}
} }
} }
......
...@@ -295,6 +295,7 @@ class YHNetRequest: NSObject { ...@@ -295,6 +295,7 @@ class YHNetRequest: NSObject {
NotificationCenter.default.post(name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil) NotificationCenter.default.post(name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil)
UIViewController.current?.navigationController?.popToRootViewController(animated: false) UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .home) goTabBarBy(tabType: .home)
YHHUD.hide()
} }
return return
} }
......
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