Commit b0d389d9 authored by pete谢兆麟's avatar pete谢兆麟

UI修改

parent a37a5a29
......@@ -20,6 +20,8 @@ let kEmptyOrderBgName = "no_data_bg_order"
let kNotNetWorkBgName = "no_network_bg"
// 人脉无好友空视图
let kNoFriendsBgName = "people_no_friend_bg"
// 方案空
let kNoPlanBgName = "no_data_bg_plan"
class YHEmptyDataView: UIView {
......
......@@ -285,9 +285,9 @@ class YHSelectLookTableViewCell: UITableViewCell {
if dataSource.catAttr == 2 {
flagLabel.isHidden = false
}
let a: ASAttributedString = .init("¥", .font(UIFont(name: "DINAlternate-Bold", size: 14) ?? UIFont()), .foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("\(dataSource.linePrice) ", .font(UIFont(name: "DINAlternate-Bold", size: 20) ?? UIFont()), .foreground(UIColor.mainTextColor))
let c: ASAttributedString = .init(\(dataSource.price)", .font(UIFont(name: "DINAlternate-Bold", size: 14) ?? UIFont()), .foreground(UIColor(hex: 0x8993a2)), .strikethrough(.single))
let a: ASAttributedString = .init("¥", .font(UIFont(name: "D-DIN-PRO-Bold", size: 14) ?? UIFont()), .foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("\(dataSource.linePrice) ", .font(UIFont(name: "D-DIN-PRO-Bold", size: 20) ?? UIFont()), .foreground(UIColor.mainTextColor))
let c: ASAttributedString = .init(\(dataSource.price)", .font(UIFont(name: "D-DIN-PRO-Bold", size: 14) ?? UIFont()), .foreground(UIColor(hex: 0x8993a2)), .strikethrough(.single))
if dataSource.linePrice == dataSource.price {
self.subTitleLabel.attributed.text = a + b
} else {
......
......@@ -210,7 +210,7 @@ extension YHMakePlanViewController: UITableViewDelegate, UITableViewDataSource {
count = viewModel.makePlanModel.invest.count
}
if count == 0 {
return 68
return 168 + 32
}
return CGFloat(36 + 16 + 118 * count)
}
......
......@@ -40,7 +40,7 @@ class YHMakePlanCardView: UIView {
private lazy var companyImageView: UIImageView = {
let view = UIImageView()
view.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.96, alpha: 1.0)
view.image = UIImage(named: "global_default_image")
return view
}()
......
......@@ -14,6 +14,25 @@ class YHMakePlanCell: UITableViewCell {
var titleLabel: UILabel!
var mainItemView: UIView!
var country: String = ""
lazy var noDataView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("您已满足续签至永居服务~", kNoPlanBgName)
view.frame = CGRect(x: 0, y: 36, width: KScreenWidth - 32, height: 116)
view.backgroundColor = .clear
view.isHidden = true
view.emptyBgImgV.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(0)
make.width.height.equalTo(96)
make.centerX.equalTo(view)
}
view.tipsLabel.snp.remakeConstraints { make in
make.top.equalTo(view.emptyBgImgV.snp.bottom)
make.height.equalTo(20)
make.centerX.equalTo(view)
}
return view
}()
var dataSource: [YHMakePlanMainModel]? {
didSet {
updateAllViews()
......@@ -49,6 +68,8 @@ class YHMakePlanCell: UITableViewCell {
make.bottom.equalTo(-7)
}
centerView.addSubview(noDataView)
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 15)
......@@ -78,6 +99,13 @@ class YHMakePlanCell: UITableViewCell {
func updateAllViews() {
mainItemView.removeSubviews()
if dataSource?.count == 0 {
noDataView.isHidden = false
mainItemView.isHidden = true
} else {
noDataView.isHidden = true
mainItemView.isHidden = false
}
var y = 0
for i in 0 ..< (dataSource?.count ?? 0) {
if i != 0 || i != (dataSource?.count ?? 0) - 1 {
......
......@@ -20,6 +20,7 @@ class YHMakePlanSelectAlertView: UIView {
var cardView: YHMakePlanCardView!
var lineView: UIView!
var selectIndex: Int = 0
var selectProductId: Int = 0
var dataSource: YHMakePlanMainModel? {
didSet {
updata()
......@@ -201,6 +202,7 @@ class YHMakePlanSelectAlertView: UIView {
}
if data.sub_product.count > 0 {
cardView.configureSub(with: data.sub_product[selectIndex])
selectProductId = data.sub_product[selectIndex].product_id
}
tableView.reloadData()
}
......@@ -215,6 +217,11 @@ class YHMakePlanSelectAlertView: UIView {
@objc func orderButtonClick() {
if let block = block {
// 规避用户未选点击确定
if selectProductId == dataSource?.sub_product[selectIndex].product_id {
dismiss()
return
}
block(dataSource?.sub_product[selectIndex].product_id ?? 0)
}
dismiss()
......@@ -298,8 +305,7 @@ class YHMakePlanCardCell: UITableViewCell {
private let bgImageView: UIImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "")
imageView.backgroundColor = .red
imageView.image = UIImage(named: "global_default_image")
return imageView
}()
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "no_data_bg_plan@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "no_data_bg_plan@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "plan_head_bg@2x.png",
"filename" : "头部背景@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "plan_head_bg@3x.png",
"filename" : "头部背景@3x.png",
"idiom" : "universal",
"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