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

UI 走查修改

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