Commit cdb17ebe authored by Steven杜宇's avatar Steven杜宇

// 朋友社区架构改版

parent 7aa6f1fe
...@@ -211,7 +211,7 @@ extension AppDelegate { ...@@ -211,7 +211,7 @@ extension AppDelegate {
v1.tabBarItem = ESTabBarItem.init(YHServiceLottieAnimateContentView(),title: "服务", image: UIImage(named: "service"), selectedImage: UIImage(named: "service_1")) v1.tabBarItem = ESTabBarItem.init(YHServiceLottieAnimateContentView(),title: "服务", image: UIImage(named: "service"), selectedImage: UIImage(named: "service_1"))
v2.tabBarItem = ESTabBarItem.init(YHCommunityLottieAnimateContentView(),title: "社区", image: UIImage(named: "msg"), selectedImage: UIImage(named: "msg_1")) v2.tabBarItem = ESTabBarItem.init(YHCommunityLottieAnimateContentView(),title: "朋友", image: UIImage(named: "msg"), selectedImage: UIImage(named: "msg_1"))
v3.tabBarItem = ESTabBarItem.init(YHMyLottieAnimateContentView(),title: "我的", image: UIImage(named: "me"), selectedImage: UIImage(named: "me_1")) v3.tabBarItem = ESTabBarItem.init(YHMyLottieAnimateContentView(),title: "我的", image: UIImage(named: "me"), selectedImage: UIImage(named: "me_1"))
......
...@@ -15,6 +15,8 @@ class YHTabBarViewController: ESTabBarController { ...@@ -15,6 +15,8 @@ class YHTabBarViewController: ESTabBarController {
return model return model
}() }()
let msgViewModel = YHMsgViewModel()
lazy var shareView: YHShareViewOnTablebarView = { lazy var shareView: YHShareViewOnTablebarView = {
let view = YHShareViewOnTablebarView() let view = YHShareViewOnTablebarView()
view.isHidden = true view.isHidden = true
...@@ -57,6 +59,8 @@ class YHTabBarViewController: ESTabBarController { ...@@ -57,6 +59,8 @@ class YHTabBarViewController: ESTabBarController {
} }
} }
} }
getTotalUnreadMsgCount()
} }
func addObservers() { func addObservers() {
...@@ -66,6 +70,46 @@ class YHTabBarViewController: ESTabBarController { ...@@ -66,6 +70,46 @@ class YHTabBarViewController: ESTabBarController {
NotificationCenter.default.addObserver(self, selector: #selector(changeShareViewStatus(_ :)), name: YhConstant.YhNotification.changeShareViewStatusOnTabBarNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(changeShareViewStatus(_ :)), name: YhConstant.YhNotification.changeShareViewStatusOnTabBarNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(getTotalUnreadMsgCount), name: YhConstant.YhNotification.didRequestUnreadMsgTotalCountNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(getTotalUnreadMsgCount), name: YhConstant.YhNotification.didQiYuUnReadMsgCountChangeNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(clearFriendTabBadge), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil)
}
@objc func getTotalUnreadMsgCount() {
if !YHLoginManager.shared.isLogin() {
return
}
self.msgViewModel.requestTotalUnreadMsgCount {
[weak self] success, error in
guard let self = self else { return }
DispatchQueue.main.async {
var unreadCount = self.msgViewModel.unreadTotalCount
if YHButlerServiceManager.shared.isUatAllowed() {
unreadCount = self.msgViewModel.unreadTotalCount + YHButlerServiceManager.shared.unreadCount
}
let isHaveUnreadMsg = unreadCount > 0
// 朋友tab小红点显示逻辑
self.showFriendTabRedBadge(isHaveUnreadMsg)
}
}
}
@objc func clearFriendTabBadge() {
showFriendTabRedBadge(false)
}
func showFriendTabRedBadge(_ isShow: Bool) {
if let vcs = self.viewControllers, vcs.count > 2 {
let friendVC = vcs[2]
if let tabBarItem = friendVC.tabBarItem as? ESTabBarItem {
// badgeValue 空字符串会显示小红点 nil则隐藏
tabBarItem.badgeValue = isShow ? "" : nil
}
}
} }
} }
...@@ -80,10 +124,12 @@ extension YHTabBarViewController { ...@@ -80,10 +124,12 @@ extension YHTabBarViewController {
@objc func loginSuccess() { @objc func loginSuccess() {
printLog("登录成功,进行相应的 UI刷新操作") printLog("登录成功,进行相应的 UI刷新操作")
getTotalUnreadMsgCount()
} }
@objc func logoutSuccess() { @objc func logoutSuccess() {
printLog("登出成功") printLog("登出成功")
clearFriendTabBadge()
} }
@objc func changeShareViewStatus(_ notification: Notification) { @objc func changeShareViewStatus(_ notification: Notification) {
......
...@@ -12,7 +12,7 @@ import JXSegmentedView ...@@ -12,7 +12,7 @@ import JXSegmentedView
class YHCommunityViewController: YHBaseViewController { class YHCommunityViewController: YHBaseViewController {
var defaltIndex: Int = 0 var defaltIndex: Int = 0
let friendViewModel = YHMatchUserViewModel() let friendViewModel = YHMatchUserViewModel()
let arrItemTitles = ["人脉","活动"] let arrItemTitles = ["会话", "人脉","活动"]
var arrItemVCs : [YHBaseViewController] = [] var arrItemVCs : [YHBaseViewController] = []
...@@ -51,6 +51,14 @@ class YHCommunityViewController: YHBaseViewController { ...@@ -51,6 +51,14 @@ class YHCommunityViewController: YHBaseViewController {
return view return view
}() }()
lazy var cleanAllMsgBtn: UIButton = {
let cleanBtn = UIButton()
cleanBtn.setImage(UIImage(named: "msg_clean"), for: .normal)
cleanBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
cleanBtn.addTarget(self, action: #selector(didCleanButtonClicked), for: .touchUpInside)
return cleanBtn
}()
lazy var friendsBtn:UIButton = { lazy var friendsBtn:UIButton = {
let btn = UIButton() let btn = UIButton()
btn.setImage(UIImage(named: "people_friends_btn"), for: .normal) btn.setImage(UIImage(named: "people_friends_btn"), for: .normal)
...@@ -107,6 +115,12 @@ class YHCommunityViewController: YHBaseViewController { ...@@ -107,6 +115,12 @@ class YHCommunityViewController: YHBaseViewController {
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
} }
@objc func didCleanButtonClicked() {
if arrItemVCs.count > 0, let msgVC = arrItemVCs[0] as? YHMessageListVC {
msgVC.didCleanButtonClicked()
}
}
@objc func didFriendsBtnClicked() { @objc func didFriendsBtnClicked() {
if !YHLoginManager.shared.isLogin() { if !YHLoginManager.shared.isLogin() {
YHOneKeyLoginManager.shared.oneKeyLogin() YHOneKeyLoginManager.shared.oneKeyLogin()
...@@ -125,20 +139,25 @@ class YHCommunityViewController: YHBaseViewController { ...@@ -125,20 +139,25 @@ class YHCommunityViewController: YHBaseViewController {
self.bgImgV.snp.makeConstraints { make in self.bgImgV.snp.makeConstraints { make in
make.edges.equalToSuperview() make.edges.equalToSuperview()
} }
NotificationCenter.default.addObserver(self, selector: #selector(goMessageListVC), name: YhConstant.YhNotification.goMessageVCNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(goActivityVC), name: YhConstant.YhNotification.goActivityVCNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(goActivityVC), name: YhConstant.YhNotification.goActivityVCNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(goConnectionVC), name: YhConstant.YhNotification.goConnectionVCNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(goConnectionVC), name: YhConstant.YhNotification.goConnectionVCNotifiction, object: nil)
for i in 0..<arrItemTitles.count { for i in 0..<arrItemTitles.count {
if i != 0 { if i == 0 { // 消息
let vc = YHActivityListViewController() let vc = YHMessageListVC()
arrItemVCs.append(vc) arrItemVCs.append(vc)
} else {
} else if i == 1 { // 人脉
let vc = YHMatchUserViewController() let vc = YHMatchUserViewController()
arrItemVCs.append(vc) arrItemVCs.append(vc)
} else if i == 2 { // 活动
let vc = YHActivityListViewController()
arrItemVCs.append(vc)
} }
} }
...@@ -162,7 +181,15 @@ class YHCommunityViewController: YHBaseViewController { ...@@ -162,7 +181,15 @@ class YHCommunityViewController: YHBaseViewController {
indicator.indicatorColor = UIColor.white indicator.indicatorColor = UIColor.white
segmentedView.indicators = [indicator] segmentedView.indicators = [indicator]
segmentedView.defaultSelectedIndex = defaltIndex segmentedView.defaultSelectedIndex = defaltIndex
segmentedView(segmentedView, didSelectedItemAt: defaltIndex)
self.view.addSubview(cleanAllMsgBtn)
cleanAllMsgBtn.snp.makeConstraints { make in
make.width.height.equalTo(21)
make.centerY.equalTo(segmentedView)
make.right.equalToSuperview().offset(-20)
}
self.view.addSubview(friendsBtn) self.view.addSubview(friendsBtn)
friendsBtn.snp.makeConstraints { make in friendsBtn.snp.makeConstraints { make in
make.width.equalTo(54.0) make.width.equalTo(54.0)
...@@ -205,30 +232,34 @@ class YHCommunityViewController: YHBaseViewController { ...@@ -205,30 +232,34 @@ class YHCommunityViewController: YHBaseViewController {
self.friendViewModel.getMyFriendList { success, error in self.friendViewModel.getMyFriendList { success, error in
let unreadCount = self.friendViewModel.friendListModel.applyFriends.count let unreadCount = self.friendViewModel.friendListModel.applyFriends.count
self.unreadCount = unreadCount self.unreadCount = unreadCount
self.friendsBtn.isHidden = self.segmentedView.selectedIndex != 0 self.friendsBtn.isHidden = self.segmentedView.selectedIndex != 1
} }
} else { } else {
self.unreadCount = 0 self.unreadCount = 0
} }
} }
@objc func goMessageListVC() {
segmentedView.selectItemAt(index: 0)
}
@objc func goActivityVC() { @objc func goActivityVC() {
segmentedView.selectItemAt(index: 1) segmentedView.selectItemAt(index: 2)
} }
@objc func goConnectionVC() { @objc func goConnectionVC() {
segmentedView.selectItemAt(index: 0) segmentedView.selectItemAt(index: 1)
} }
} }
extension YHCommunityViewController: JXSegmentedViewDelegate { extension YHCommunityViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) { func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0) navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0)
if segmentedView.selectedIndex == 0 { if segmentedView.selectedIndex == 1 { // 人脉
bgImgV.isHidden = false bgImgV.isHidden = false
friendsBtn.isHidden = false friendsBtn.isHidden = false
cleanAllMsgBtn.isHidden = true
segmentedDataSource.titleNormalColor = UIColor(hex: 0xFFFFFF, alpha: 0.6) segmentedDataSource.titleNormalColor = UIColor(hex: 0xFFFFFF, alpha: 0.6)
segmentedDataSource.titleSelectedColor = .white segmentedDataSource.titleSelectedColor = .white
let indicator = JXSegmentedIndicatorLineView() let indicator = JXSegmentedIndicatorLineView()
...@@ -237,9 +268,11 @@ extension YHCommunityViewController: JXSegmentedViewDelegate { ...@@ -237,9 +268,11 @@ extension YHCommunityViewController: JXSegmentedViewDelegate {
indicator.indicatorCornerRadius = 0.0 indicator.indicatorCornerRadius = 0.0
indicator.indicatorColor = UIColor.white indicator.indicatorColor = UIColor.white
segmentedView.indicators = [indicator] segmentedView.indicators = [indicator]
} else {
} else { // 非人脉tab
bgImgV.isHidden = true bgImgV.isHidden = true
friendsBtn.isHidden = true friendsBtn.isHidden = true
cleanAllMsgBtn.isHidden = segmentedView.selectedIndex != 0
segmentedDataSource.titleNormalColor = UIColor.yhGreyColor segmentedDataSource.titleNormalColor = UIColor.yhGreyColor
segmentedDataSource.titleSelectedColor = UIColor.mainTextColor segmentedDataSource.titleSelectedColor = UIColor.mainTextColor
let indicator = JXSegmentedIndicatorLineView() let indicator = JXSegmentedIndicatorLineView()
......
...@@ -324,7 +324,7 @@ extension YHMatchUserViewController { ...@@ -324,7 +324,7 @@ extension YHMatchUserViewController {
vc.delegate = self vc.delegate = self
vc.matchUsersArr = self.viewModel.matchUserArr vc.matchUsersArr = self.viewModel.matchUserArr
self.resetAnimation() self.resetAnimation()
if let curVc = UIViewController.current as? YHCommunityViewController,curVc.segmentedView.selectedIndex == 0 { if let curVc = UIViewController.current as? YHCommunityViewController,curVc.segmentedView.selectedIndex == 1 {
curVc.navigationController?.pushViewController(vc, completion: { curVc.navigationController?.pushViewController(vc, completion: {
}) })
} else { } else {
...@@ -339,7 +339,7 @@ extension YHMatchUserViewController { ...@@ -339,7 +339,7 @@ extension YHMatchUserViewController {
vc.delegate = self vc.delegate = self
vc.matchUsersArr = self.viewModel.matchUserArr vc.matchUsersArr = self.viewModel.matchUserArr
self.resetAnimation() self.resetAnimation()
if let curVc = UIViewController.current as? YHCommunityViewController,curVc.segmentedView.selectedIndex == 0 { if let curVc = UIViewController.current as? YHCommunityViewController,curVc.segmentedView.selectedIndex == 1 {
curVc.navigationController?.pushViewController(vc, completion: { curVc.navigationController?.pushViewController(vc, completion: {
}) })
} else { } else {
......
...@@ -347,17 +347,19 @@ extension YHHomeHoldViewPageViewController { ...@@ -347,17 +347,19 @@ extension YHHomeHoldViewPageViewController {
searchView.snp.makeConstraints { make in searchView.snp.makeConstraints { make in
make.top.equalTo(k_Height_safeAreaInsetsTop() + 6) make.top.equalTo(k_Height_safeAreaInsetsTop() + 6)
make.left.equalTo(20) make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(YHHomeSearchView.viewH) make.height.equalTo(YHHomeSearchView.viewH)
} }
view.addSubview(msgUnreadView) // 隐藏消息铃铛UI
msgUnreadView.snp.makeConstraints { make in // view.addSubview(msgUnreadView)
make.width.equalTo(YHMessageBellView.width) // msgUnreadView.snp.makeConstraints { make in
make.height.equalTo(YHMessageBellView.height) // make.width.equalTo(YHMessageBellView.width)
make.left.equalTo(searchView.snp.right) // make.height.equalTo(YHMessageBellView.height)
make.right.equalToSuperview() // make.left.equalTo(searchView.snp.right)
make.centerY.equalTo(searchView) // make.right.equalToSuperview()
} // make.centerY.equalTo(searchView)
// }
//segmentedViewDataSource一定要通过属性强持有!!!!!!!!! //segmentedViewDataSource一定要通过属性强持有!!!!!!!!!
segmentedView.dataSource = segmentedDataSource segmentedView.dataSource = segmentedDataSource
...@@ -418,7 +420,7 @@ extension YHHomeHoldViewPageViewController : UITabBarControllerDelegate { ...@@ -418,7 +420,7 @@ extension YHHomeHoldViewPageViewController : UITabBarControllerDelegate {
guard let index = tabBarController.viewControllers?.firstIndex(of: viewController) else { guard let index = tabBarController.viewControllers?.firstIndex(of: viewController) else {
return false return false
} }
if index == 1 { if index == 1 || index == 2 { // 点击服务tab或社区tab
if YHLoginManager.shared.isLogin() { if YHLoginManager.shared.isLogin() {
return true return true
} else { } else {
......
...@@ -191,7 +191,7 @@ private extension YHStartPageViewController { ...@@ -191,7 +191,7 @@ private extension YHStartPageViewController {
v1.tabBarItem = ESTabBarItem.init(YHServiceLottieAnimateContentView(),title: "服务", image: UIImage(named: "service"), selectedImage: UIImage(named: "service_1")) v1.tabBarItem = ESTabBarItem.init(YHServiceLottieAnimateContentView(),title: "服务", image: UIImage(named: "service"), selectedImage: UIImage(named: "service_1"))
v2.tabBarItem = ESTabBarItem.init(YHCommunityLottieAnimateContentView(),title: "社区", image: UIImage(named: "msg"), selectedImage: UIImage(named: "msg_1")) v2.tabBarItem = ESTabBarItem.init(YHCommunityLottieAnimateContentView(),title: "朋友", image: UIImage(named: "msg"), selectedImage: UIImage(named: "msg_1"))
v3.tabBarItem = ESTabBarItem.init(YHMyLottieAnimateContentView(),title: "我的", image: UIImage(named: "me"), selectedImage: UIImage(named: "me_1")) v3.tabBarItem = ESTabBarItem.init(YHMyLottieAnimateContentView(),title: "我的", image: UIImage(named: "me"), selectedImage: UIImage(named: "me_1"))
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
import UIKit import UIKit
import JXSegmentedView
class YHMessageListVC: YHBaseViewController { class YHMessageListVC: YHBaseViewController {
...@@ -99,7 +100,7 @@ class YHMessageListVC: YHBaseViewController { ...@@ -99,7 +100,7 @@ class YHMessageListVC: YHBaseViewController {
addObservers() addObservers()
gk_navigationBar.isHidden = true gk_navigationBar.isHidden = true
view.backgroundColor = .white view.backgroundColor = .white
view.addSubview(navBar) // view.addSubview(navBar)
view.addSubview(tableView) view.addSubview(tableView)
// 银河管家 始终放在第一位 // 银河管家 始终放在第一位
...@@ -116,14 +117,15 @@ class YHMessageListVC: YHBaseViewController { ...@@ -116,14 +117,15 @@ class YHMessageListVC: YHBaseViewController {
self.tableView.reloadData() self.tableView.reloadData()
navBar.snp.makeConstraints { make in // navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview() // make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar()) // make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar) // make.height.equalTo(k_Height_NavContentBar)
} // }
tableView.snp.makeConstraints { make in tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar) make.top.equalToSuperview().offset(4)
make.bottom.equalToSuperview().offset(-k_Height_TabBar) make.bottom.equalToSuperview().offset(-k_Height_TabBar)
} }
} }
...@@ -167,6 +169,10 @@ class YHMessageListVC: YHBaseViewController { ...@@ -167,6 +169,10 @@ class YHMessageListVC: YHBaseViewController {
@objc func getUnreadMsgList() { @objc func getUnreadMsgList() {
if !YHLoginManager.shared.isLogin() { if !YHLoginManager.shared.isLogin() {
// 保留第一个元素银河管家,删除其他元素
msgArr.removeAll()
self.tableView.reloadData()
emptyDataTipsView.isHidden = msgArr.count > 0
return return
} }
...@@ -480,7 +486,7 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -480,7 +486,7 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource {
let enableBtn = UIButton() let enableBtn = UIButton()
enableBtn.setTitle("开启".local, for: .normal) enableBtn.setTitle("开启".local, for: .normal)
enableBtn.setTitleColor(UIColor.brandMainColor, for: .normal) enableBtn.setTitleColor(UIColor.brandMainColor, for: .normal)
enableBtn.titleLabel?.font = .PFSC_R(ofSize: 13) enableBtn.titleLabel?.font = .PFSC_M(ofSize: 13)
enableBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 12, left: 20, bottom: 12, right: 20) enableBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 12, left: 20, bottom: 12, right: 20)
enableBtn.addTarget(self, action: #selector(didEnableNotifyBtnClicked), for: .touchUpInside) enableBtn.addTarget(self, action: #selector(didEnableNotifyBtnClicked), for: .touchUpInside)
contentview.addSubview(enableBtn) contentview.addSubview(enableBtn)
...@@ -499,3 +505,9 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -499,3 +505,9 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource {
return view return view
} }
} }
extension YHMessageListVC: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
...@@ -11,7 +11,7 @@ import UIKit ...@@ -11,7 +11,7 @@ import UIKit
class YHMessageSessionCell: UITableViewCell { class YHMessageSessionCell: UITableViewCell {
static let cellReuseIdentifier = "YHMessageSessionCell" static let cellReuseIdentifier = "YHMessageSessionCell"
let badgeHeight = 16.0 let badgeHeight = 18.0
var iconContentView: UIView! var iconContentView: UIView!
var iconImgView: UIImageView! var iconImgView: UIImageView!
...@@ -71,16 +71,16 @@ class YHMessageSessionCell: UITableViewCell { ...@@ -71,16 +71,16 @@ class YHMessageSessionCell: UITableViewCell {
width = badgeHeight width = badgeHeight
} else if unreadCountText.count == 2 { // 两位数 } else if unreadCountText.count == 2 { // 两位数
width = 22.0 width = 26.0
} else if unreadCountText.count >= 3 { // 三位数 } else if unreadCountText.count >= 3 { // 三位数
width = 30.0 width = 32.0
} }
make.width.equalTo(width) make.width.equalTo(width)
} }
self.iconImgView.snp.updateConstraints { make in self.iconImgView.snp.updateConstraints { make in
let width = model.type == YHMessageType.yinheManager.rawValue ? 32.0 : 21.0 let width = model.type == YHMessageType.yinheManager.rawValue ? 44.0 : 21.0
let height = model.type == YHMessageType.yinheManager.rawValue ? 12.0 : 21.0 let height = model.type == YHMessageType.yinheManager.rawValue ? 44.0 : 21.0
make.width.equalTo(width) make.width.equalTo(width)
make.height.equalTo(height) make.height.equalTo(height)
} }
...@@ -132,7 +132,7 @@ class YHMessageSessionCell: UITableViewCell { ...@@ -132,7 +132,7 @@ class YHMessageSessionCell: UITableViewCell {
badgeLabel.backgroundColor = UIColor.failColor badgeLabel.backgroundColor = UIColor.failColor
badgeLabel.textColor = .white badgeLabel.textColor = .white
badgeLabel.textAlignment = .center badgeLabel.textAlignment = .center
badgeLabel.font = UIFont.PFSC_M(ofSize:10) badgeLabel.font = UIFont.PFSC_M(ofSize:11)
badgeLabel.layer.cornerRadius = badgeHeight/2.0 badgeLabel.layer.cornerRadius = badgeHeight/2.0
badgeLabel.clipsToBounds = true badgeLabel.clipsToBounds = true
iconContentView.addSubview(badgeLabel) iconContentView.addSubview(badgeLabel)
......
...@@ -364,8 +364,8 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -364,8 +364,8 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
} }
case .myMessage://我的消息 case .myMessage://我的消息
printLog("我的消息") printLog("我的消息")
let vc = YHMessageListVC() goToMessagePage()
self.navigationController?.pushViewController(vc)
case .scoreCenter:////积分中心 case .scoreCenter:////积分中心
printLog("积分中心") printLog("积分中心")
if let param = YHLoginManager.shared.userModel?.token,param.count>5 { if let param = YHLoginManager.shared.userModel?.token,param.count>5 {
......
...@@ -156,10 +156,9 @@ func goTabBarBy(tabType : tabBarPageType) { ...@@ -156,10 +156,9 @@ func goTabBarBy(tabType : tabBarPageType) {
} }
func goToMessagePage() { func goToMessagePage() {
goTabBarBy(tabType: .home) goTabBarBy(tabType: .community)
UIViewController.current?.navigationController?.popToRootViewController(animated: false) UIViewController.current?.navigationController?.popToRootViewController(animated: true)
let vc = YHMessageListVC() NotificationCenter.default.post(name: YhConstant.YhNotification.goMessageVCNotifiction, object: nil)
UIViewController.current?.navigationController?.pushViewController(vc)
} }
...@@ -266,6 +265,8 @@ extension YhConstant { ...@@ -266,6 +265,8 @@ extension YhConstant {
// 点击文件清单空视图返回服务tab页 // 点击文件清单空视图返回服务tab页
public static let didClickFileListBackToServiceTabNotifiction = Notification.Name(rawValue: "com.yinhe.certificate.backToService") public static let didClickFileListBackToServiceTabNotifiction = Notification.Name(rawValue: "com.yinhe.certificate.backToService")
// 调招 社区的会话页
public static let goMessageVCNotifiction = Notification.Name(rawValue: "com.yinhe.goMessageVCNotifiction")
// 跳转 社区的活动页 // 跳转 社区的活动页
public static let goActivityVCNotifiction = Notification.Name(rawValue: "com.yinhe.goActivityVCNotifiction") public static let goActivityVCNotifiction = Notification.Name(rawValue: "com.yinhe.goActivityVCNotifiction")
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Group 2033194490@2x.png", "filename" : "消息@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Group 2033194490@3x.png", "filename" : "消息@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Group@2x.png", "filename" : "Mask group@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Group@3x.png", "filename" : "Mask group@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
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