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

工作经验 细节优化

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