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

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

* '630-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  //  消息处理
  //  我的好友
  //  匹配动画
parents 3a377be9 8062b2c8
......@@ -33,8 +33,8 @@
043B0A352C1190C6008A9BBA /* YHSelectFileSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043B0A342C1190C6008A9BBA /* YHSelectFileSheetView.swift */; };
043BA8752C241B38006EF02D /* YHAddFriendCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043BA8742C241B38006EF02D /* YHAddFriendCardCell.swift */; };
043BA8892C244129006EF02D /* people_head.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA8882C244129006EF02D /* people_head.json */; };
043BA88B2C244146006EF02D /* people_launch.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA88A2C244146006EF02D /* people_launch.json */; };
043BA88D2C24416A006EF02D /* people_rotate.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA88C2C24416A006EF02D /* people_rotate.json */; };
043BA88F2C250E69006EF02D /* people_rotate.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA88E2C250E69006EF02D /* people_rotate.json */; };
043BA8912C250E94006EF02D /* people_launch.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA8902C250E94006EF02D /* people_launch.json */; };
043D2C8A2C0EEF3F00172438 /* YHOrderSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */; };
043D2C8C2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */; };
044378A42BFC848C001F95AE /* loginBkg.mov in Resources */ = {isa = PBXBuildFile; fileRef = 044378A32BFC848C001F95AE /* loginBkg.mov */; };
......@@ -580,8 +580,8 @@
043B0A342C1190C6008A9BBA /* YHSelectFileSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSelectFileSheetView.swift; sourceTree = "<group>"; };
043BA8742C241B38006EF02D /* YHAddFriendCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAddFriendCardCell.swift; sourceTree = "<group>"; };
043BA8882C244129006EF02D /* people_head.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_head.json; sourceTree = "<group>"; };
043BA88A2C244146006EF02D /* people_launch.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_launch.json; sourceTree = "<group>"; };
043BA88C2C24416A006EF02D /* people_rotate.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_rotate.json; sourceTree = "<group>"; };
043BA88E2C250E69006EF02D /* people_rotate.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_rotate.json; sourceTree = "<group>"; };
043BA8902C250E94006EF02D /* people_launch.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_launch.json; sourceTree = "<group>"; };
043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOrderSearchViewController.swift; sourceTree = "<group>"; };
043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceOrderSearchViewModel.swift; sourceTree = "<group>"; };
044378A32BFC848C001F95AE /* loginBkg.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = loginBkg.mov; sourceTree = "<group>"; };
......@@ -1205,7 +1205,7 @@
043BA87C2C2435D4006EF02D /* people_launch */ = {
isa = PBXGroup;
children = (
043BA88A2C244146006EF02D /* people_launch.json */,
043BA8902C250E94006EF02D /* people_launch.json */,
);
path = people_launch;
sourceTree = "<group>";
......@@ -1213,7 +1213,7 @@
043BA8822C24360C006EF02D /* people_rotate */ = {
isa = PBXGroup;
children = (
043BA88C2C24416A006EF02D /* people_rotate.json */,
043BA88E2C250E69006EF02D /* people_rotate.json */,
);
path = people_rotate;
sourceTree = "<group>";
......@@ -2992,8 +2992,8 @@
04EA2E702BF74FA200AE80B0 /* shipin.json in Resources */,
044378A42BFC848C001F95AE /* loginBkg.mov in Resources */,
043BA8892C244129006EF02D /* people_head.json in Resources */,
043BA88B2C244146006EF02D /* people_launch.json in Resources */,
043BA88D2C24416A006EF02D /* people_rotate.json in Resources */,
043BA8912C250E94006EF02D /* people_launch.json in Resources */,
043BA88F2C250E69006EF02D /* people_rotate.json in Resources */,
047619ED2BA9B9C900F45358 /* area.plist in Resources */,
A5EE42002C216C78005BBA5D /* img_1.png in Resources */,
048FA0342BFDDFF400AD3BA9 /* submit_page_scroll.gif in Resources */,
......
......@@ -182,9 +182,9 @@ extension AppDelegate {
window?.makeKeyAndVisible()
if YHLoginManager.shared.needJumpToMsgTabFlag {
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
// goTabBarBy(tabType: .message)//todo for test hjl
// })
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
goToMessagePage()
})
}
}
......
......@@ -78,9 +78,9 @@ extension AppDelegate: JPUSHRegisterDelegate {
// 转换到消息tab
YHLoginManager.shared.needJumpToMsgTabFlag = true
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
// goTabBarBy(tabType: .message) //todo for test hjl
// })
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
goToMessagePage()
})
}
......@@ -120,9 +120,9 @@ extension AppDelegate: JPUSHRegisterDelegate {
// 转换到消息tab
YHLoginManager.shared.needJumpToMsgTabFlag = true
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
// goTabBarBy(tabType: .message)//todo for test hjl
// })
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
goToMessagePage()
})
}
......
......@@ -83,6 +83,7 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHAddFriendCardCell.cellReuseIdentifier, for: indexPath) as! YHAddFriendCardCell
cell.cardCount = self.friendRequestArr.count
cell.acceptBlock = {
[weak self] accept in
guard let self = self else { return }
......@@ -132,6 +133,21 @@ extension YHMyGoodFriendsVC: UITableViewDelegate, UITableViewDataSource {
return 0.1
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
if section == 0 {
if friendRequestArr.count > 0 {
return 12
}
return 0.1
}
return 0.1
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
......
......@@ -8,11 +8,36 @@
import UIKit
class YHAddFriendCardCell: UITableViewCell {
static let cellReuseIdentifier = "YHAddFriendCardCell"
let secondCardColor = UIColor(hex: 0xF0F4FB)
let thirdCardColor = UIColor(hex: 0xBBBBBB, alpha: 0.1)
var acceptBlock:((Bool)->())?
var cardCount:Int = 1 {
didSet {
var firstCardBottomMargin = 0.0
var secondCardBottomMargin = 0.0
if self.cardCount <= 1 {
} else if self.cardCount == 2 {
firstCardBottomMargin = -6.0
} else {
firstCardBottomMargin = -6.0
secondCardBottomMargin = -6.0
}
self.cardView.snp.updateConstraints { make in
make.bottom.equalTo(self.secondCardView).offset(firstCardBottomMargin)
}
self.secondCardView.snp.updateConstraints { make in
make.bottom.equalTo(self.thirdCardView).offset(secondCardBottomMargin)
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
static let height = 218.0
......@@ -99,6 +124,20 @@ class YHAddFriendCardCell: UITableViewCell {
return btn
}()
lazy var secondCardView:UIView = {
let view = UIView()
view.backgroundColor = self.secondCardColor
view.layer.cornerRadius = 3.0
return view
}()
lazy var thirdCardView:UIView = {
let view = UIView()
view.backgroundColor = self.thirdCardColor
view.layer.cornerRadius = 3.0
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
createUI()
......@@ -118,6 +157,10 @@ class YHAddFriendCardCell: UITableViewCell {
func createUI() {
self.backgroundColor = .clear
self.contentView.backgroundColor = .clear
self.contentView.addSubview(thirdCardView)
self.contentView.addSubview(secondCardView)
self.contentView.addSubview(cardView)
cardView.addSubview(bgImageView)
......@@ -139,7 +182,8 @@ class YHAddFriendCardCell: UITableViewCell {
self.msgLabel.text = "资讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及讯科技及电讯资资讯科技及电讯资资讯科技及电讯资资讯科技及科技及电讯资资讯科技及讯科技及电讯资资讯科技及科技及电讯资资讯科技及讯科技及电讯资资讯科技及"
cardView.snp.makeConstraints { make in
make.edges.equalToSuperview()
make.left.right.top.equalToSuperview()
make.bottom.equalTo(self.secondCardView).offset(-6)
}
bgImageView.snp.makeConstraints { make in
......@@ -207,6 +251,20 @@ class YHAddFriendCardCell: UITableViewCell {
make.centerY.equalTo(self.ignoreBtn)
make.height.equalTo(40)
}
self.secondCardView.snp.makeConstraints { make in
make.left.equalTo(self.cardView).offset(5)
make.right.equalTo(self.cardView).offset(-5)
make.height.equalTo(50)
make.bottom.equalTo(self.thirdCardView).offset(-6)
}
self.thirdCardView.snp.makeConstraints { make in
make.left.equalTo(self.cardView).offset(10)
make.right.equalTo(self.cardView).offset(-10)
make.bottom.equalToSuperview()
make.height.equalTo(50)
}
}
func getHeight(text:String, font:UIFont, width:CGFloat)->CGFloat {
......
......@@ -196,9 +196,9 @@ private extension YHStartPageViewController {
window?.makeKeyAndVisible()
if YHLoginManager.shared.needJumpToMsgTabFlag {
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
// goTabBarBy(tabType: .message)//todo for test hjl
// })
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
goToMessagePage()
})
}
}
}
......@@ -154,6 +154,13 @@ func goTabBarBy(tabType : tabBarPageType) {
}
}
func goToMessagePage() {
goTabBarBy(tabType: .home)
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
let vc = YHMessageListVC()
UIViewController.current?.navigationController?.pushViewController(vc)
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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