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

处理 首页推送刷新的问题

parent 39fa65c2
...@@ -3744,7 +3744,7 @@ ...@@ -3744,7 +3744,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -3948,7 +3948,7 @@ ...@@ -3948,7 +3948,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -3994,7 +3994,7 @@ ...@@ -3994,7 +3994,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
......
...@@ -121,6 +121,9 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -121,6 +121,9 @@ extension AppDelegate: JPUSHRegisterDelegate {
// 转换到消息tab // 转换到消息tab
YHLoginManager.shared.needJumpToMsgTabFlag = true YHLoginManager.shared.needJumpToMsgTabFlag = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: { DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
NotificationCenter.default.post(name: YhConstant.YhNotification.didRevMsgNotifiction, object: nil)
goToMessagePage() goToMessagePage()
}) })
} }
......
...@@ -322,8 +322,14 @@ private extension YHHomePageViewController { ...@@ -322,8 +322,14 @@ private extension YHHomePageViewController {
view.backgroundColor = .white view.backgroundColor = .white
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(getTotalUnreadMsgCount), name: YhConstant.YhNotification.didRequestUnreadMsgTotalCountNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(revMsg), name: YhConstant.YhNotification.didRevMsgNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(clearUnreadBadge), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(clearUnreadBadge), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(clearUnreadBadge), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil)
view.addSubview(searchView) view.addSubview(searchView)
...@@ -379,6 +385,10 @@ private extension YHHomePageViewController { ...@@ -379,6 +385,10 @@ private extension YHHomePageViewController {
self.msgUnreadView.unreadCount = 0 self.msgUnreadView.unreadCount = 0
getData() getData()
} }
@objc func revMsg() {
requestOrder()
}
} }
extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDataSource { extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDataSource {
...@@ -511,7 +521,7 @@ extension YHHomePageViewController { ...@@ -511,7 +521,7 @@ extension YHHomePageViewController {
} }
// self.needReloadDataFlag = true // self.needReloadDataFlag = true
requestOrder() // requestOrder()
self.msgViewModel.requestTotalUnreadMsgCount { self.msgViewModel.requestTotalUnreadMsgCount {
[weak self] success, error in [weak self] success, error in
......
...@@ -254,9 +254,11 @@ extension YhConstant { ...@@ -254,9 +254,11 @@ extension YhConstant {
// 跳转 社区的人脉页 // 跳转 社区的人脉页
public static let goConnectionVCNotifiction = Notification.Name(rawValue: "com.yinhe.goConnectionVCNotifiction") public static let goConnectionVCNotifiction = Notification.Name(rawValue: "com.yinhe.goConnectionVCNotifiction")
// 点击了 首页的消息 // 点击了 首页的消息
public static let clickHomeMsgNotifiction = Notification.Name(rawValue: "com.yinhe.clickHomeMsgNotifiction") public static let clickHomeMsgNotifiction = Notification.Name(rawValue: "com.yinhe.clickHomeMsgNotifiction")
//接收到消息推送
public static let didRevMsgNotifiction = Notification.Name(rawValue: "com.yinhe.didRevMsgNotifiction")
} }
} }
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