Commit d72f95e1 authored by Steven杜宇's avatar Steven杜宇

// UI走查

parent 5b976b1f
...@@ -320,7 +320,10 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource { ...@@ -320,7 +320,10 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
cell.isShowDeleteBtn = (isDegreeEditMode == .canCancel) cell.isShowDeleteBtn = (isDegreeEditMode == .canCancel)
cell.setTips(tips, isShow:(isNeedShowError && eduInfo.vacantNum > 0)) cell.setTips(tips, isShow:(isNeedShowError && eduInfo.vacantNum > 0))
cell.deleteBlock = { cell.deleteBlock = {
var title = "确定要删除该学历吗?" var title = "确定删除该学历吗?"
if let collegeName = eduInfo.college, !collegeName.isEmpty {
title = "确定删除学历\(collegeName)吗"
}
YHTwoOptionAlertView.showAlertView(message:title) { YHTwoOptionAlertView.showAlertView(message:title) {
[weak self] sure in [weak self] sure in
guard let self = self else { return } guard let self = self else { return }
...@@ -345,7 +348,10 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource { ...@@ -345,7 +348,10 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
} }
cell.isShowDeleteBtn = (isDegreeEditMode == .canCancel) cell.isShowDeleteBtn = (isDegreeEditMode == .canCancel)
cell.deleteBlock = { cell.deleteBlock = {
var title = "确定要删除该学历吗?" var title = "确定删除该学历吗?"
if let collegeName = eduInfo.college, !collegeName.isEmpty {
title = "确定删除学历\(collegeName)吗"
}
YHTwoOptionAlertView.showAlertView(message:title) { YHTwoOptionAlertView.showAlertView(message:title) {
[weak self] sure in [weak self] sure in
guard let self = self else { return } guard let self = self else { return }
...@@ -379,7 +385,11 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource { ...@@ -379,7 +385,11 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
cell.isShowDeleteBtn = (isQualificationEditMode == .canCancel) cell.isShowDeleteBtn = (isQualificationEditMode == .canCancel)
cell.deleteBlock = { cell.deleteBlock = {
var title = "确定要删除该证书吗?" var title = "确定要删除该证书吗?"
YHTwoOptionAlertView.showAlertView(message:title) { if let qualification = quaInfo.qualification, !qualification.isEmpty {
title = "确定删除证书\(qualification)吗"
}
YHTwoOptionAlertView.showAlertView(message:title) {
[weak self] sure in [weak self] sure in
guard let self = self else { return } guard let self = self else { return }
if !sure { return } if !sure { return }
...@@ -512,6 +522,7 @@ extension YHEducationInfoListVC { ...@@ -512,6 +522,7 @@ extension YHEducationInfoListVC {
[weak self] success, error in [weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if success { if success {
YHHUD.flash(message: "删除成功")
requestEducationInfo() requestEducationInfo()
} else { } else {
var errorMsg = "删除失败" var errorMsg = "删除失败"
...@@ -530,6 +541,7 @@ extension YHEducationInfoListVC { ...@@ -530,6 +541,7 @@ extension YHEducationInfoListVC {
[weak self] success, error in [weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if success { if success {
YHHUD.flash(message: "删除成功")
requestEducationInfo() requestEducationInfo()
} else { } else {
var errorMsg = "删除失败" var errorMsg = "删除失败"
......
...@@ -25,6 +25,7 @@ class YHEducationInfoCell: UITableViewCell { ...@@ -25,6 +25,7 @@ class YHEducationInfoCell: UITableViewCell {
let label = UILabel() let label = UILabel()
label.textColor = .mainTextColor label.textColor = .mainTextColor
label.textAlignment = .left label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSC_B(ofSize: 14) label.font = UIFont.PFSC_B(ofSize: 14)
return label return label
}() }()
...@@ -112,19 +113,21 @@ class YHEducationInfoCell: UITableViewCell { ...@@ -112,19 +113,21 @@ class YHEducationInfoCell: UITableViewCell {
} }
timeLabel.snp.makeConstraints { make in timeLabel.snp.makeConstraints { make in
make.width.equalTo(108)
make.height.equalTo(20)
make.right.equalTo(arrowImgView.snp.left) make.right.equalTo(arrowImgView.snp.left)
make.centerY.equalTo(titleLabel) make.top.equalTo(titleLabel)
} }
deleteButton.snp.makeConstraints { make in deleteButton.snp.makeConstraints { make in
make.size.equalTo(CGSizeMake(64, 40)) make.size.equalTo(CGSizeMake(64, 40))
make.centerY.equalTo(titleLabel) make.centerY.equalTo(timeLabel)
make.right.equalToSuperview() make.right.equalToSuperview()
} }
arrowImgView.snp.makeConstraints { make in arrowImgView.snp.makeConstraints { make in
make.width.height.equalTo(20.0) make.width.height.equalTo(20.0)
make.centerY.equalTo(titleLabel) make.centerY.equalTo(timeLabel)
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
} }
......
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