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

我的评分 UI 及接口联调

parent 49a09c69
......@@ -51,21 +51,16 @@ class YHScoreDetailViewController: YHBaseViewController {
// MARK: - private methods
extension YHScoreDetailViewController {
private func initView()->Void {
gk_navigationBar.isHidden = false
gk_backStyle = .white
gk_navTitle = "我的评分"
gk_navBackgroundColor = UIColor(hex: 0x528bf1)
gk_navTitleColor = .white
gk_navBarAlpha = 1
view.addSubview(headBkgImagV)
headBkgImagV.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.left.right.equalToSuperview()
make.height.equalTo(326)
make.top.left.right.equalToSuperview()
make.height.equalTo(414)
}
......@@ -75,8 +70,8 @@ extension YHScoreDetailViewController {
homeTableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview()
make.left.equalTo(16)
make.right.equalTo(-16)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
}
}
......@@ -136,10 +131,12 @@ extension YHScoreDetailViewController : UITableViewDelegate,UITableViewDataSourc
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHScorePersonInfoCell.self)
cell.selectionStyle = .none
cell.dataModel = serviceCenterMainReqVM.myScoreResultData
return cell
}
let cell = tableView.dequeueReusableCell(withClass: YHScoreItemCell.self)
cell.selectionStyle = .none
cell.optionData = self.serviceCenterMainReqVM.localScoreData?[indexPath.row + 1]
return cell
}
......
......@@ -21,14 +21,16 @@ class YHScorePersonInfoCell: UITableViewCell {
//头像
private lazy var headImagV : UIImageView = {
let imageV = UIImageView(image: UIImage(named: "score_header_default"))
imageV.contentMode = .scaleAspectFit
imageV.contentMode = .scaleAspectFill
imageV.layer.cornerRadius = 20.5
imageV.clipsToBounds = true
return imageV
}()
//姓名
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "DavidHuang")
lable0.textColor = UIColor(hex: 0x222222)
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 16)
return lable0
}()
......@@ -36,7 +38,7 @@ class YHScorePersonInfoCell: UITableViewCell {
//电话号码
private lazy var phoneLable : UILabel = {
let lable0 = UILabel(text: "15818743775")
lable0.textColor = UIColor(hex: 0x888F98)
lable0.textColor = UIColor.labelTextColor2
lable0.font = UIFont.PFSC_R(ofSize: 12)
return lable0
}()
......@@ -46,7 +48,7 @@ class YHScorePersonInfoCell: UITableViewCell {
private lazy var scoreLable : UILabel = {
let lable0 = UILabel(text: "92 分")
lable0.textColor = UIColor(hex: 0x3C86F8)
lable0.font = UIFont.PFSC_B(ofSize: 43)
lable0.font = UIFont.PFSC_B(ofSize: 68)
lable0.textAlignment = .right
return lable0
}()
......@@ -82,59 +84,65 @@ extension YHScorePersonInfoCell {
let lable0 = UILabel(text: "香港优才评分报告")
lable0.textColor = .white
lable0.font = UIFont.PFSC_B(ofSize: 24)
lable0.font = UIFont.PFSC_B(ofSize: 26)
contentView.addSubview(lable0)
lable0.snp.makeConstraints { make in
make.top.equalTo(32)
make.left.equalTo(8)
make.right.equalTo(-8)
make.height.equalTo(34)
make.top.equalTo(26.5)
make.left.equalTo(7)
make.right.equalTo(7)
make.height.equalTo(36.5)
}
let lable1 = UILabel(text: "根据您填写的资料情况生成")
lable1.textColor = UIColor(hex: 0xffffff,alpha: 0.8)
lable1.font = UIFont.PFSC_R(ofSize: 12)
lable1.font = UIFont.PFSC_R(ofSize: 13)
contentView.addSubview(lable1)
lable1.snp.makeConstraints { make in
make.top.equalTo(lable0.snp.bottom).offset(6)
make.left.equalTo(lable0.snp.left)
make.left.equalTo(25)
make.right.equalTo(lable0.snp.right)
make.height.equalTo(17)
make.height.equalTo(18)
}
let iconImagV = UIImageView(image: UIImage(named: "score_icon_0"))
iconImagV.contentMode = .scaleAspectFill
contentView.addSubview(iconImagV)
iconImagV.snp.makeConstraints { make in
make.centerY.equalTo(lable1)
make.left.equalTo(lable0.snp.left)
make.width.equalTo(10)
make.height.equalTo(12)
}
let holdView = UIView()
holdView.backgroundColor = .white
holdView.layer.cornerRadius = 12
holdView.layer.cornerRadius = kCornerRadius6
holdView.clipsToBounds = true
contentView.addSubview(holdView)
holdView.snp.makeConstraints { make in
make.top.equalTo(lable1.snp.bottom).offset(30)
make.top.equalTo(lable1.snp.bottom).offset(28.5)
make.left.right.equalToSuperview()
make.height.equalTo(89)
make.height.equalTo(74)
make.bottom.equalToSuperview().offset(-14)
}
let holdViewBkgV = UIImageView(image: UIImage(named: "score_icon_bkg1"))
holdViewBkgV.contentMode = .scaleAspectFill
holdView.addSubview(holdViewBkgV)
holdViewBkgV.snp.makeConstraints { make in
make.edges.equalTo(0)
}
let bkgImageV = UIImageView(image: UIImage(named: "score_icon_bkg"))
bkgImageV.contentMode = .scaleAspectFill
holdView.addSubview(bkgImageV)
bkgImageV.snp.makeConstraints { make in
make.top.right.bottom.equalToSuperview()
make.width.equalTo(178)
}
let interHoldView = UIView()
interHoldView.layer.borderWidth = 1
interHoldView.layer.borderColor = UIColor(red: 0.235, green: 0.525, blue: 0.973, alpha: 0.2).cgColor
interHoldView.layer.cornerRadius = 10
interHoldView.clipsToBounds = true
holdView.addSubview(interHoldView)
interHoldView.snp.makeConstraints { make in
make.top.left.equalTo(4)
make.right.bottom.equalTo(-4)
make.top.equalTo(15)
make.right.equalTo(-31.5)
make.width.equalTo(68)
make.height.equalTo(74)
}
......@@ -142,17 +150,17 @@ extension YHScorePersonInfoCell {
holdView.addSubview(headImagV)
headImagV.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(21)
make.width.height.equalTo(42)
make.left.equalTo(18)
make.width.height.equalTo(41)
}
holdView.addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.top.equalTo(headImagV.snp.top)
make.left.equalTo(headImagV.snp.right).offset(12)
make.height.equalTo(24)
make.width.equalTo(200)
make.left.equalTo(headImagV.snp.right).offset(15)
make.height.equalTo(23)
make.right.equalToSuperview().offset(-kMargin)
}
......@@ -165,31 +173,17 @@ extension YHScorePersonInfoCell {
}
holdView.addSubview(scoreLable)
contentView.addSubview(scoreLable)
scoreLable.snp.makeConstraints { make in
make.top.equalTo(10)
make.right.equalToSuperview().offset(-21)
make.height.equalTo(50)
make.bottom.equalTo(holdView.snp.top).offset(-kMargin)
make.right.equalTo(holdView.snp.right).offset(-5)
make.height.equalTo(79)
}
let a: ASAttributedString = .init("95", .font(UIFont.PFSC_R(ofSize: 43)),.foreground(UIColor(hex:0x3C86F8)))
let a: ASAttributedString = .init("-", .font(UIFont.PFSC_R(ofSize: 43)),.foreground(UIColor(hex:0x3C86F8)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex:0x3C86F8)))
scoreLable.attributed.text = a + b
let lable3 = UILabel(text: "综合得分")
lable3.textColor = UIColor(hex: 0x888F98)
lable3.font = UIFont.PFSC_R(ofSize: 12)
lable3.textAlignment = .right
contentView.addSubview(lable3)
lable3.snp.makeConstraints { make in
make.top.equalTo(scoreLable.snp.bottom).offset(-4)
make.right.equalTo(scoreLable.snp.right)
make.height.equalTo(20)
}
}
......@@ -198,16 +192,13 @@ extension YHScorePersonInfoCell {
return
}
nameLable.text = model.user_info?.username ?? "-"
nameLable.text = "davidHuang for test"//model.user_info?.username ?? "-"
phoneLable.text = model.user_info?.mobile ?? "-"
var score : String = String(model.total_score?.sum_score ?? 0)
let a: ASAttributedString = .init(NSAttributedString(string: score), .font(UIFont.PFSC_R(ofSize: 43)),.foreground(UIColor(hex:0x3C86F8)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex:0x3C86F8)))
let score : String = String(model.total_score?.sum_score ?? 0)
let a: ASAttributedString = .init(NSAttributedString(string: score), .font(UIFont.PFSC_R(ofSize: 43)),.foreground(UIColor(hex:0xFFEEB0)))
let b: ASAttributedString = .init("分", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(.white))
scoreLable.attributed.text = a + b
}
}
{
"images" : [
{
"filename" : "Group 3460.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 3460@2x.png",
"filename" : "Group 3471@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 3460@3x.png",
"filename" : "Group 3471@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "Group 581.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 581@2x.png",
"filename" : "Group 582@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 581@3x.png",
"filename" : "Group 582@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "Group 33335867.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 33335867@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 33335867@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "我的评分-卡片背景图.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "我的评分-卡片背景图@2x.png",
"filename" : "Group 33333280@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "我的评分-卡片背景图@3x.png",
"filename" : "Group 33333280@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2418@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2418@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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