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

人脉页提交

parent c0755736
......@@ -47,10 +47,11 @@ platform :ios do
webFix = "develop_bugfix_web"
kjzf = "kjzf"
develop_fix_adopter = "develop_fix_adopter"
community_dev = "community_dev"
#打包正使用的分支
myPack_branch = develop_fix_adopter
myPack_branch = community_dev
# 打adhoc包 执行命令 fastlane galaxyTest
......
......@@ -8628,7 +8628,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8658,7 +8658,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8688,7 +8688,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8718,7 +8718,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8823,7 +8823,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8972,7 +8972,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9183,7 +9183,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9234,7 +9234,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.2;
MARKETING_VERSION = 2.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......
......@@ -12,8 +12,8 @@ import JXSegmentedView
class YHCommunityViewController: YHBaseViewController {
var defaltIndex: Int = 0
let friendViewModel = YHMatchUserViewModel()
// let arrItemTitles = ["会话", "人脉","活动"]
let arrItemTitles = ["会话", "活动"]
let arrItemTitles = ["会话", "人脉", "活动"]
// let arrItemTitles = ["会话", "活动"]
var arrItemVCs: [YHBaseViewController] = []
......@@ -65,18 +65,18 @@ class YHCommunityViewController: YHBaseViewController {
return cleanBtn
}()
// lazy var friendsBtn:UIButton = {
// let btn = UIButton()
// btn.setImage(UIImage(named: "people_friends_btn"), for: .normal)
// btn.setTitle("好友", for: .normal)
// btn.setTitleColor(UIColor.white, for: .normal)
// btn.iconInLeft(spacing: 4.0)
// btn.titleLabel?.font = UIFont.PFSC_R(ofSize:15)
// btn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
// btn.addTarget(self, action: #selector(didFriendsBtnClicked), for: .touchUpInside)
// return btn
// }()
//
lazy var friendsBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "people_friends_btn"), for: .normal)
btn.setTitle("好友", for: .normal)
btn.setTitleColor(UIColor.white, for: .normal)
btn.iconInLeft(spacing: 4.0)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 15)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
btn.addTarget(self, action: #selector(didFriendsBtnClicked), for: .touchUpInside)
return btn
}()
let unreadHeight = 16.0
lazy var unreadLabel: UILabel = {
let label = UILabel()
......@@ -92,30 +92,30 @@ class YHCommunityViewController: YHBaseViewController {
var unreadCount: Int = 0 {
didSet {
// self.updateUnreadCount(self.unreadCount)
self.updateUnreadCount(self.unreadCount)
}
}
// func updateUnreadCount(_ count : Int) {
// self.unreadLabel.isHidden = (count <= 0)
// if 0 < count && count < 100 {
// self.unreadLabel.text = "\(count)"
// } else if count >= 100 {
// self.unreadLabel.text = "99+"
// }
// var width = unreadHeight
// var leftMargin = -8
// if 10 <= count && count < 100 {
// width = 22.0
// } else if count >= 100 {
// width = 30.0
// leftMargin = -14
// }
// self.unreadLabel.snp.updateConstraints { make in
// make.width.equalTo(width)
// make.left.equalTo(self.friendsBtn.snp.right).offset(leftMargin)
// }
// }
func updateUnreadCount(_ count: Int) {
self.unreadLabel.isHidden = (count <= 0)
if 0 < count && count < 100 {
self.unreadLabel.text = "\(count)"
} else if count >= 100 {
self.unreadLabel.text = "99+"
}
var width = unreadHeight
var leftMargin = -8
if 10 <= count && count < 100 {
width = 22.0
} else if count >= 100 {
width = 30.0
leftMargin = -14
}
self.unreadLabel.snp.updateConstraints { make in
make.width.equalTo(width)
make.left.equalTo(self.friendsBtn.snp.right).offset(leftMargin)
}
}
@objc func didBackBtnClicked() {
self.navigationController?.popViewController(animated: true)
......@@ -156,13 +156,11 @@ class YHCommunityViewController: YHBaseViewController {
if i == 0 { // 消息
let vc = YHMessageListVC()
arrItemVCs.append(vc)
}
// } else if i == 1 { // 人脉
// let vc = YHMatchUserViewController()
// arrItemVCs.append(vc)
//
// }
else if i == 1 { // 活动
} else if i == 1 { // 人脉
let vc = YHMatchUserViewController()
arrItemVCs.append(vc)
} else if i == 2 { // 活动
let vc = YHActivityListViewController()
arrItemVCs.append(vc)
}
......@@ -196,20 +194,20 @@ class YHCommunityViewController: YHBaseViewController {
make.right.equalToSuperview().offset(-20)
}
// self.view.addSubview(friendsBtn)
// friendsBtn.snp.makeConstraints { make in
// make.width.equalTo(54.0)
// make.height.equalTo(21)
// make.right.equalTo(-20)
// make.top.equalTo(12+k_Height_safeAreaInsetsTop())
// }
//
// self.friendsBtn.addSubview(self.unreadLabel)
// self.unreadLabel.snp.makeConstraints { make in
// make.width.height.equalTo(unreadHeight)
// make.left.equalTo(self.friendsBtn.snp.right).offset(-8)
// make.top.equalTo(self.friendsBtn.snp.top).offset(-8)
// }
self.view.addSubview(friendsBtn)
friendsBtn.snp.makeConstraints { make in
make.width.equalTo(54.0)
make.height.equalTo(21)
make.right.equalTo(-20)
make.top.equalTo(12+k_Height_safeAreaInsetsTop())
}
self.friendsBtn.addSubview(self.unreadLabel)
self.unreadLabel.snp.makeConstraints { make in
make.width.height.equalTo(unreadHeight)
make.left.equalTo(self.friendsBtn.snp.right).offset(-8)
make.top.equalTo(self.friendsBtn.snp.top).offset(-8)
}
segmentedView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
......@@ -264,7 +262,7 @@ class YHCommunityViewController: YHBaseViewController {
self.friendViewModel.getMyFriendList { _, _ in
let unreadCount = self.friendViewModel.friendListModel.applyFriends.count
self.unreadCount = unreadCount
// self.friendsBtn.isHidden = self.segmentedView.selectedIndex != 1
self.friendsBtn.isHidden = self.segmentedView.selectedIndex != 1
}
} else {
self.unreadCount = 0
......@@ -296,22 +294,22 @@ class YHCommunityViewController: YHBaseViewController {
extension YHCommunityViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0)
// if segmentedView.selectedIndex == 1 { // 人脉
// bgImgV.isHidden = false
// friendsBtn.isHidden = false
// cleanAllMsgBtn.isHidden = true
// segmentedDataSource.titleNormalColor = UIColor(hex: 0xFFFFFF, alpha: 0.6)
// segmentedDataSource.titleSelectedColor = .white
// let indicator = JXSegmentedIndicatorLineView()
// indicator.indicatorWidth = 16
// indicator.indicatorHeight = 2
// indicator.indicatorCornerRadius = 0.0
// indicator.indicatorColor = UIColor.white
// segmentedView.indicators = [indicator]
//
// } else { // 非人脉tab
if segmentedView.selectedIndex == 1 { // 人脉
bgImgV.isHidden = false
friendsBtn.isHidden = false
cleanAllMsgBtn.isHidden = true
segmentedDataSource.titleNormalColor = UIColor(hex: 0xFFFFFF, alpha: 0.6)
segmentedDataSource.titleSelectedColor = .white
let indicator = JXSegmentedIndicatorLineView()
indicator.indicatorWidth = 16
indicator.indicatorHeight = 2
indicator.indicatorCornerRadius = 0.0
indicator.indicatorColor = UIColor.white
segmentedView.indicators = [indicator]
} else { // 非人脉tab
bgImgV.isHidden = true
// friendsBtn.isHidden = true
friendsBtn.isHidden = true
cleanAllMsgBtn.isHidden = segmentedView.selectedIndex != 0
segmentedDataSource.titleNormalColor = UIColor.yhGreyColor
segmentedDataSource.titleSelectedColor = UIColor.mainTextColor
......@@ -321,7 +319,7 @@ extension YHCommunityViewController: JXSegmentedViewDelegate {
indicator.indicatorCornerRadius = 0.0
indicator.indicatorColor = UIColor.brandMainColor
segmentedView.indicators = [indicator]
// }
}
segmentedView.dataSource = segmentedDataSource
self.segmentedView.reloadDataWithoutListContainer()
}
......
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