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

工作经验 细节优化

parent d31a9131
......@@ -35,7 +35,7 @@ class YHFormItemDegreeInfoCell: UITableViewCell {
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
if isNeed {
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
}
titleLabel.attributedText = questionAttrStr
......@@ -163,7 +163,7 @@ class HKDegreeInfoItemView: UIView {
.foregroundColor: UIColor.mainTextColor]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
titleLabel.attributedText = questionAttrStr
} else {
......
......@@ -49,7 +49,7 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
if isMust {
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
}
titleLabel.attributedText = questionAttrStr
......
......@@ -44,7 +44,7 @@ class YHFormItemEnterDetailCell: UITableViewCell {
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
if isMust {
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
}
titleLabel.attributedText = questionAttrStr
} else {
......
......@@ -38,7 +38,7 @@ class YHFormItemExpireDateCell: UITableViewCell {
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
if isMust {
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
}
titleLabel.attributedText = questionAttrStr
} else {
......
......@@ -35,7 +35,7 @@ class YHFormItemInputTextCell: UITableViewCell {
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
if isMust {
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
}
titleLabel.attributedText = questionAttrStr
} else {
......
......@@ -35,7 +35,7 @@ class YHFormItemQuestionsCell: UITableViewCell {
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
if isMust {
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
}
titleLabel.attributedText = questionAttrStr
......
......@@ -34,7 +34,7 @@ class YHFormItemSelectSheetCell: UITableViewCell {
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
if isMust {
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
}
titleLabel.attributedText = questionAttrStr
} else {
......
......@@ -142,7 +142,7 @@ class YHItemView: UIView {
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
titleLabel.attributedText = questionAttrStr
} else {
let str = dataSource.title ?? ""
......
......@@ -156,6 +156,8 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa
vc.orderID = self.orderId
self.navigationController?.pushViewController(vc, animated: true)
}
cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear
return cell
}
......
......@@ -36,9 +36,9 @@ class YHWorkExperienceViewController: YHBaseViewController {
}
viewModel.requestWorkDetail(workExperienceID ?? "") {[weak self] success, error in
guard let self = self else { return }
self.stepView.currentIndex = self.viewModel.mainModel.step ?? 0
self.stepView.currentIndex = self.viewModel.mainModel.step
self.updateDataSource()
self.viewModel.requestWorkInfoProject("\(self.viewModel.mainModel.id ?? 0)") {[weak self] success, error in
self.viewModel.requestWorkInfoProject("\(self.viewModel.mainModel.id )") {[weak self] success, error in
guard let self = self else { return }
self.introductionDataSource = success
self.updateDataSource()
......@@ -111,7 +111,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
bottom.saveBlock = { [weak self] in
guard let self = self else { return }
self.viewModel.saveWorkDetail(0, orderID: self.orderID, callBackBlock: {[weak self] flag, model in
guard let self = self else { return }
guard self != nil else { return }
})
}
return bottom
......
......@@ -85,6 +85,7 @@ class YHWorkExperienceItemView: UIView {
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.layer.cornerRadius = 16
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.layer.borderWidth = 1
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.isSelected = true
......@@ -105,6 +106,7 @@ class YHWorkExperienceItemView: UIView {
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.layer.cornerRadius = 16
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.addTarget(self, action: #selector(leftClick), for: .touchUpInside)
return button
}()
......@@ -128,7 +130,7 @@ class YHWorkExperienceItemView: UIView {
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
titleLabel.attributedText = questionAttrStr
} else {
let str = dataSource.title ?? ""
......@@ -237,6 +239,9 @@ class YHWorkExperienceItemView: UIView {
leftButton.layer.borderWidth = 0
dataSource?.message = "0"
dataSource?.value = ["0"]
rightButton.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
leftButton.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
if let block = block {
block(dataSource ?? YHWorkExperienceModel())
}
......@@ -252,6 +257,9 @@ class YHWorkExperienceItemView: UIView {
rightButton.layer.borderWidth = 0
dataSource?.message = "1"
dataSource?.value = ["1"]
leftButton.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
rightButton.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
if let block = block {
block(dataSource ?? YHWorkExperienceModel())
}
......
......@@ -51,7 +51,7 @@ class YHWorkExperienceListTableViewCell: UITableViewCell {
}
func setupUI() {
backgroundColor = UIColor(hex: 0xe9e9e9)
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
......
......@@ -41,7 +41,7 @@ class YHWorkExperienceTableViewCell: UITableViewCell {
}
func setupUI() {
backgroundColor = UIColor(hex: 0xe9e9e9)
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
......
......@@ -50,6 +50,7 @@ class YHWorkExperienceTextItemView: UIView {
textField.backgroundColor = UIColor.contentBkgColor
textField.layer.cornerRadius = 4
textField.delegate = self
textField.font = UIFont.PFSC_R(ofSize: 14)
return textField
}()
addSubview(messageTextField)
......@@ -62,7 +63,7 @@ class YHWorkExperienceTextItemView: UIView {
promptsLabel = {
let textField = UILabel()
textField.font = UIFont.PFSC_R(ofSize: 14)
textField.textColor = UIColor(hex: 0xc0c0c0)
textField.textColor = UIColor.labelTextColor
return textField
}()
addSubview(promptsLabel)
......@@ -95,7 +96,7 @@ class YHWorkExperienceTextItemView: UIView {
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
titleLabel.attributedText = questionAttrStr
} else {
let str = dataSource.title ?? ""
......
......@@ -45,7 +45,7 @@ class YHWorkFileSyncTableViewCell: UITableViewCell {
}
func setupUI() {
backgroundColor = UIColor(hex: 0xe9e9e9)
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
......@@ -69,7 +69,7 @@ class YHWorkFileSyncTableViewCell: UITableViewCell {
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
return label
}()
......
......@@ -51,7 +51,7 @@ class YHWorkHighlightsTableViewCell: UITableViewCell {
}
func setupUI() {
backgroundColor = UIColor(hex: 0xe9e9e9)
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
......@@ -72,7 +72,7 @@ class YHWorkHighlightsTableViewCell: UITableViewCell {
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
return label
}()
......
......@@ -50,7 +50,7 @@ class YHWorkIntroductionTableViewCell: UITableViewCell {
}
func setupUI() {
backgroundColor = UIColor(hex: 0xe9e9e9)
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
......
......@@ -49,7 +49,7 @@ class YHWorkMessageSelectTableViewCell: UITableViewCell {
}
func setupUI() {
backgroundColor = UIColor(hex: 0xe9e9e9)
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
......@@ -101,7 +101,7 @@ class YHWorkMessageSelectTableViewCell: UITableViewCell {
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
return label
}()
......
......@@ -47,7 +47,7 @@ class YHWorkResponsibilitiesTableViewCell: UITableViewCell {
}
func setupUI() {
backgroundColor = UIColor(hex: 0xe9e9e9)
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
......@@ -68,7 +68,7 @@ class YHWorkResponsibilitiesTableViewCell: UITableViewCell {
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
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