Commit 2bc11a97 authored by Steven杜宇's avatar Steven杜宇

// 首页消息展示

parent 1b620b52
......@@ -49,6 +49,8 @@ class YHHomePageViewController: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(clickMsgitem), name: YhConstant.YhNotification.clickHomeMsgNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didRefreshMessageCount), name: YhConstant.YhNotification.didRequestUnreadMsgTotalCountNotification, object: nil)
//1、加载默认数据
homeHeaderView.homeBannerView.dataArr = getCacheDataForBanner()
getCacheDataForHomeNewsData()
......@@ -57,6 +59,10 @@ class YHHomePageViewController: YHBaseViewController {
getData()
}
@objc func didRefreshMessageCount() {
getTotalUnreadMsgCount()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
requestAppNewVersion()
......@@ -321,9 +327,6 @@ private extension YHHomePageViewController {
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)
view.addSubview(searchView)
......
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