Commit 0f5e2488 authored by pete谢兆麟's avatar pete谢兆麟

UI 走查修改

parent ba8ec8ae
...@@ -42,7 +42,7 @@ class YHLifeViewController: YHBaseViewController { ...@@ -42,7 +42,7 @@ class YHLifeViewController: YHBaseViewController {
}() }()
lazy var noDataView: YHEmptyDataView = { lazy var noDataView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无产品", kEmptyCommonBgName) let view = YHEmptyDataView.createView("暂无直播", kEmptyCommonBgName)
view.isHidden = true view.isHidden = true
return view return view
}() }()
......
...@@ -65,6 +65,11 @@ extension YHSelectViewController { ...@@ -65,6 +65,11 @@ extension YHSelectViewController {
self.viewModel.getLiveList {[weak self] success, error in self.viewModel.getLiveList {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.sectionView.items = self.viewModel.liveArr self.sectionView.items = self.viewModel.liveArr
if self.viewModel.liveArr.count == 0 {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 0)
} else {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92)
}
} }
} }
...@@ -84,13 +89,15 @@ extension YHSelectViewController { ...@@ -84,13 +89,15 @@ extension YHSelectViewController {
self.viewModel.getLiveList {[weak self] success, error in self.viewModel.getLiveList {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.sectionView.items = self.viewModel.liveArr self.sectionView.items = self.viewModel.liveArr
if self.viewModel.liveArr.count == 0 {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 0)
} else {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92)
}
} }
} }
func getDetailImages() {
}
func setupUI() { func setupUI() {
if hideFlag { if hideFlag {
gk_navigationBar.isHidden = true gk_navigationBar.isHidden = true
...@@ -100,10 +107,6 @@ extension YHSelectViewController { ...@@ -100,10 +107,6 @@ extension YHSelectViewController {
view.backgroundColor = .white view.backgroundColor = .white
sectionView = { sectionView = {
let view = YHSelectLookView() let view = YHSelectLookView()
view.block = {[weak self] itemIndex in
guard let self = self else { return }
self.getDetailImages()
}
return view return view
}() }()
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92) sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92)
...@@ -123,7 +126,7 @@ extension YHSelectViewController { ...@@ -123,7 +126,7 @@ extension YHSelectViewController {
if self.hideFlag { if self.hideFlag {
top = k_Height_safeAreaInsetsTop() + 6 + 36 + 46 + 46 top = k_Height_safeAreaInsetsTop() + 6 + 36 + 46 + 46
} }
self.selectMenuView.show(top: top, selectItem: 100, dataSource: dataSource) { item in self.selectMenuView.show(top: top, selectItem: self.selectItem, dataSource: dataSource) { item in
self.selectItem = item self.selectItem = item
self.updataData() self.updataData()
self.canShowMenu = true self.canShowMenu = true
...@@ -265,9 +268,9 @@ class YHSelectLookTableViewCell: UITableViewCell { ...@@ -265,9 +268,9 @@ class YHSelectLookTableViewCell: UITableViewCell {
if dataSource.catAttr == 2 { if dataSource.catAttr == 2 {
flagLabel.isHidden = false flagLabel.isHidden = false
} }
let a: ASAttributedString = .init("¥", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("¥", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("\(dataSource.linePrice) ", .font(UIFont.PFSC_R(ofSize: 20)),.foreground(UIColor.mainTextColor)) let b: ASAttributedString = .init("\(dataSource.linePrice) ", .font(UIFont.PFSC_B(ofSize: 20)),.foreground(UIColor.mainTextColor))
let c: ASAttributedString = .init(\(dataSource.price)", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(hex:0x8993a2)), .strikethrough(.single)) let c: ASAttributedString = .init(\(dataSource.price)", .font(UIFont.PFSC_M(ofSize: 14)),.foreground(UIColor(hex:0x8993a2)), .strikethrough(.single))
if dataSource.linePrice == dataSource.price { if dataSource.linePrice == dataSource.price {
self.subTitleLabel.attributed.text = a + b self.subTitleLabel.attributed.text = a + b
} else { } else {
...@@ -279,9 +282,9 @@ class YHSelectLookTableViewCell: UITableViewCell { ...@@ -279,9 +282,9 @@ class YHSelectLookTableViewCell: UITableViewCell {
let label = UILabel() let label = UILabel()
label.text = " " + item.description + " " label.text = " " + item.description + " "
label.textColor = UIColor(hexString: item.color) label.textColor = UIColor(hexString: item.color)
label.font = UIFont.PFSC_M(ofSize: 10) label.font = UIFont.PFSC_R(ofSize: 10)
label.tag = 100 + i label.tag = 100 + i
label.layer.borderWidth = 1 label.layer.borderWidth = 0.5
label.layer.borderColor = UIColor(hexString: item.color)?.withAlphaComponent(0.3).cgColor label.layer.borderColor = UIColor(hexString: item.color)?.withAlphaComponent(0.3).cgColor
itemView.addSubview(label) itemView.addSubview(label)
label.snp.makeConstraints { make in label.snp.makeConstraints { make in
...@@ -338,7 +341,7 @@ class YHSelectLookTableViewCell: UITableViewCell { ...@@ -338,7 +341,7 @@ class YHSelectLookTableViewCell: UITableViewCell {
titleLabel = { titleLabel = {
let view = UILabel() let view = UILabel()
view.text = "高才A香港企明星(7)" view.text = "高才A香港企明星(7)"
view.font = UIFont.PFSC_M(ofSize: 17) view.font = UIFont.PFSC_M(ofSize: 16)
view.textColor = UIColor.mainTextColor view.textColor = UIColor.mainTextColor
view.numberOfLines = 2 view.numberOfLines = 2
return view return view
...@@ -353,9 +356,9 @@ class YHSelectLookTableViewCell: UITableViewCell { ...@@ -353,9 +356,9 @@ class YHSelectLookTableViewCell: UITableViewCell {
subTitleLabel = { subTitleLabel = {
let view = UILabel() let view = UILabel()
let a: ASAttributedString = .init("¥", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("¥", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("61000", .font(UIFont.PFSC_R(ofSize: 20)),.foreground(UIColor.mainTextColor)) let b: ASAttributedString = .init("61000", .font(UIFont.PFSC_B(ofSize: 20)),.foreground(UIColor.mainTextColor))
let c: ASAttributedString = .init("¥61000", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(hex:0x8993a2)), .strikethrough(.single)) let c: ASAttributedString = .init("¥61000", .font(UIFont.PFSC_M(ofSize: 14)),.foreground(UIColor(hex:0x8993a2)), .strikethrough(.single))
view.attributed.text = a + b + c view.attributed.text = a + b + c
return view return view
}() }()
...@@ -373,7 +376,7 @@ class YHSelectLookTableViewCell: UITableViewCell { ...@@ -373,7 +376,7 @@ class YHSelectLookTableViewCell: UITableViewCell {
label.textAlignment = .center label.textAlignment = .center
label.textColor = .white label.textColor = .white
label.backgroundColor = .brandMainColor label.backgroundColor = .brandMainColor
label.font = UIFont.PFSC_M(ofSize: 10) label.font = UIFont.PFSC_R(ofSize: 10)
return label return label
}() }()
centerImageView.addSubview(flagLabel) centerImageView.addSubview(flagLabel)
...@@ -394,6 +397,18 @@ class YHSelectLookTableViewCell: UITableViewCell { ...@@ -394,6 +397,18 @@ class YHSelectLookTableViewCell: UITableViewCell {
make.top.equalTo(centerImageView.snp.top).offset(26) make.top.equalTo(centerImageView.snp.top).offset(26)
make.height.equalTo(18) make.height.equalTo(18)
} }
let line = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
contentView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalToSuperview()
make.height.equalTo(0.5)
}
} }
} }
...@@ -32,14 +32,15 @@ class YHSelectLookHeadView: UIView { ...@@ -32,14 +32,15 @@ class YHSelectLookHeadView: UIView {
backgroundColor = .white backgroundColor = .white
itemButton = { itemButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14) button.titleLabel?.font = UIFont.PFSC_M(ofSize: 12)
button.contentHorizontalAlignment = .center button.contentHorizontalAlignment = .center
button.setTitle("全部产品", for: .normal) button.setTitle("全部产品", for: .normal)
button.setImage(UIImage(named: "home_select_icon"), for: .normal) button.setImage(UIImage(named: "home_select_icon"), for: .normal)
button.setTitleColor(UIColor(hex: 0x6d788a), for: .normal) button.setTitleColor(UIColor(hex: 0x6d788a), for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .selected) button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setImage(UIImage(named: "home_select_icon_select"), for: .selected) button.setImage(UIImage(named: "home_select_icon_select"), for: .selected)
button.backgroundColor = UIColor.contentBkgColor button.setBackgroundColor(color: UIColor.contentBkgColor, forState: .normal)
button.setBackgroundColor(color: UIColor(hex: 0xebf0f9), forState: .selected)
button.addTarget(self, action: #selector(itemClick), for: .touchUpInside) button.addTarget(self, action: #selector(itemClick), for: .touchUpInside)
button.contentEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10) button.contentEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10)
return button return button
......
...@@ -11,9 +11,6 @@ import Lottie ...@@ -11,9 +11,6 @@ import Lottie
class YHSelectLookView: UIView { class YHSelectLookView: UIView {
static let viewH : CGFloat = 92.0 static let viewH : CGFloat = 92.0
typealias Block = (Int) -> ()
var block: Block?
var items: [YHLiveModel] = [] { var items: [YHLiveModel] = [] {
didSet { didSet {
...@@ -189,8 +186,8 @@ class YHSelectLookViewCell: UICollectionViewCell { ...@@ -189,8 +186,8 @@ class YHSelectLookViewCell: UICollectionViewCell {
}() }()
contentView.addSubview(liveAnimationView) contentView.addSubview(liveAnimationView)
liveAnimationView.snp.makeConstraints { make in liveAnimationView.snp.makeConstraints { make in
make.bottom.equalTo(animationView.snp.bottom) make.bottom.equalTo(animationView.snp.bottom).offset(-3)
make.right.equalTo(animationView.snp.right) make.right.equalTo(animationView.snp.right).offset(-3)
make.width.height.equalTo(14) make.width.height.equalTo(14)
} }
......
...@@ -42,7 +42,7 @@ class YHSelectMenuView: UIView { ...@@ -42,7 +42,7 @@ class YHSelectMenuView: UIView {
addSubview(centerView) addSubview(centerView)
centerView.snp.makeConstraints { make in centerView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview() make.left.right.top.equalToSuperview()
make.height.equalTo(484) make.height.equalTo(400)
} }
tableView = { tableView = {
...@@ -171,7 +171,7 @@ class YHSelectMenuCell: UITableViewCell { ...@@ -171,7 +171,7 @@ class YHSelectMenuCell: UITableViewCell {
nameLabel.textColor = UIColor.mainTextColor nameLabel.textColor = UIColor.mainTextColor
nameLabel.textAlignment = .left nameLabel.textAlignment = .left
nameLabel.numberOfLines = 0 nameLabel.numberOfLines = 0
nameLabel.font = UIFont.PFSC_M(ofSize:14) nameLabel.font = UIFont.PFSC_R(ofSize:14)
contentView.addSubview(nameLabel) contentView.addSubview(nameLabel)
nameLabel.snp.makeConstraints { make in nameLabel.snp.makeConstraints { make in
......
...@@ -147,7 +147,7 @@ class YHShareAlertView: UIView { ...@@ -147,7 +147,7 @@ class YHShareAlertView: UIView {
make.left.equalTo(16) make.left.equalTo(16)
make.top.equalTo(126) make.top.equalTo(126)
make.height.equalTo(44) make.height.equalTo(44)
make.right.equalTo(16) make.right.equalTo(-16)
} }
shareView = { shareView = {
...@@ -191,7 +191,7 @@ class YHShareAlertView: UIView { ...@@ -191,7 +191,7 @@ class YHShareAlertView: UIView {
messageLabel = { messageLabel = {
let label = UILabel() let label = UILabel()
label.textColor = UIColor(hex: 0x6d788a) label.textColor = UIColor(hex: 0x6d788a)
label.font = UIFont.PFSC_M(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.text = "香港入境计划申请到永居全流程服务)" label.text = "香港入境计划申请到永居全流程服务)"
label.numberOfLines = 2 label.numberOfLines = 2
return label return label
...@@ -200,7 +200,7 @@ class YHShareAlertView: UIView { ...@@ -200,7 +200,7 @@ class YHShareAlertView: UIView {
messageLabel.snp.makeConstraints { make in messageLabel.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(6) make.top.equalTo(titleLabel.snp.bottom).offset(6)
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(16) make.right.equalTo(-16)
} }
bottomView = { bottomView = {
...@@ -217,8 +217,8 @@ class YHShareAlertView: UIView { ...@@ -217,8 +217,8 @@ class YHShareAlertView: UIView {
bottomTitleLabel = { bottomTitleLabel = {
let label = UILabel() let label = UILabel()
label.numberOfLines = 0 label.numberOfLines = 0
let a: ASAttributedString = .init("银河", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("银河", .font(UIFont.PFSC_B(ofSize: 13)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("港生活\n", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.brandMainColor)) let b: ASAttributedString = .init("港生活\n", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init("美好新生活从这里开始", .font(UIFont.PFSC_R(ofSize: 10)),.foreground(UIColor(hex: 0x8993a2))) let c: ASAttributedString = .init("美好新生活从这里开始", .font(UIFont.PFSC_R(ofSize: 10)),.foreground(UIColor(hex: 0x8993a2)))
label.attributed.text = a + b + c label.attributed.text = a + b + c
return label return label
......
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