Commit 587ac748 authored by pete谢兆麟's avatar pete谢兆麟

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

parents 92dabbb5 f710de92
......@@ -198,7 +198,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
let cellType = getCellType(detailItem)
if cellType == .inputText {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as! YHFormItemInputTextCell
cell.isShowBottomLine = (indexPath.row != arr.count-1)
var isValueValid = false
if let value = detailItem.value, !value.isEmpty {
isValueValid = true
......@@ -237,7 +236,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
} else if cellType == .selectSheet {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as! YHFormItemSelectSheetCell
cell.isShowBottomLine = (indexPath.row != arr.count-1)
cell.isShowTipsButton = (detailItem.type == .degreeType)
cell.tipsBtnClickBlock = nil
if detailItem.type == .degreeType {
......@@ -274,13 +272,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
return 52.0
}
return UITableView.automaticDimension
}
......
......@@ -307,7 +307,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
if eduInfo.vacantNum > 0 { // 有未填项
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell
cell.isShowBottomLine = (indexPath.row != eduList.count)
if let college = eduInfo.college, !college.isEmpty {
cell.title = eduInfo.college
} else {
......@@ -360,7 +359,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
// 第一行是标题
let quaInfo:YHQualificationInfo = quaList[indexPath.row-1]
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell
cell.isShowBottomLine = (indexPath.row != quaList.count)
cell.title = "证书标题"
if let qualification = quaInfo.qualification, !qualification.isEmpty {
cell.title = qualification
......@@ -401,13 +399,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormAddItem { // 新增子女兄妹
return 70.0
}
return UITableView.automaticDimension
}
......@@ -485,7 +476,7 @@ extension YHEducationInfoListVC {
// 请求家庭成员信息
func requestEducationInfo() {
self.educationRequest.requestEducationInfo(params: ["order_id": self.orderId]) {
self.educationRequest.requestEducationInfoList(params: ["order_id": self.orderId]) {
[weak self] success, error in
guard let self = self else { return }
if success {
......@@ -522,10 +513,11 @@ extension YHEducationInfoListVC {
// 保存
func saveInfo() {
let params = ["go_next": 0,
"graduate": educationInfo?.isSpouseNameSame ?? 0,
"order_id": self.orderId,
"qualification": educationInfo?.isNameSame ?? 0] as [String : Any]
guard let educationInfo = educationInfo else { return }
let params:[String : Any] = [ "order_id": self.orderId,
"goNextFlow": 0,
"isSpouseNameSame": educationInfo.isSpouseNameSame ?? false,
"isNameSame": educationInfo.isNameSame ?? false]
self.educationRequest.saveAllEducationInfo(params: params) {
[weak self] success, error in
......
......@@ -236,13 +236,6 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
return 52.0
}
return UITableView.automaticDimension
}
......
......@@ -16,8 +16,8 @@ class YHEducationRequestViewModel {
// 专业详情信息
var qualificationDetailInfo: YHQualificationDetailInfo?
// 请求学历和专业证书信息
func requestEducationInfo(params:[String:Any], callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
// 请求学历和专业证书信息列表
func requestEducationInfoList(params:[String:Any], callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
YHHUD.show(.progress(message: "数据加载中..."))
......
......@@ -265,7 +265,6 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.setTips(detailItem.tips, isShow: detailItem.isShowTips)
cell.title = detailItem.getTitle()
cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = {
[weak self] (text, isEditEnd) in
guard let self = self else { return }
......@@ -305,7 +304,6 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle()
cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.setTips(detailItem.tips, isShow: detailItem.isShowTips)
return cell
}
......@@ -317,7 +315,6 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.title = item.getTitle()
cell.answerArr = nil
cell.setTips(detailItem.tips, isShow: detailItem.isShowTips)
cell.isShowBottomLine = indexPath.row != arr.count-1
if detailItem.type == .birthNation { // 出生国家
var select = false
......
......@@ -224,7 +224,6 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
var select = false
if let value = detailItem.value {
......@@ -278,7 +277,6 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell
} else if cellType == .inputText { // 输入文字cell
......@@ -287,7 +285,6 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle()
cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = {
[weak self] (text, isEditEnd) in
guard let self = self else { return }
......
......@@ -363,7 +363,6 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle()
cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
if detailItem.type == .hkIdentityCardNumber { // 输入香港身份证号码
let isEmptyValue = isEmptyString(detailItem.value)
......@@ -416,7 +415,6 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle()
cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
return cell
......@@ -427,7 +425,6 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed
cell.title = item.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.answerArr = nil
......
......@@ -179,7 +179,6 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
cell.isShowBottomLine = indexPath.row != arr.count-1
var select = false
if let value = detailItem.value {
......@@ -234,7 +233,6 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
cell.placeHolder = detailItem.placeHolder
cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell
}
......@@ -247,7 +245,6 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.text = detailItem.value
cell.placeHolder = detailItem.placeHolder
cell.setTips(detailItem.tips, isShow:detailItem.isShowTips)
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = {
[weak self] (text, isEditEnd) in
guard let self = self else { return }
......
......@@ -231,7 +231,6 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = {
......@@ -263,7 +262,6 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell
}
......@@ -272,7 +270,6 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed
cell.title = item.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.answerArr = nil
if detailItem.type == .birthNation { // 出生国家
......
......@@ -181,7 +181,6 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour
cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle()
cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = {
[weak self] (text, isEditEnd) in
......@@ -221,7 +220,6 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell
}
......@@ -231,7 +229,6 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell
}
}
......
......@@ -337,7 +337,6 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
let detailItem = item as! YHFamilyMember
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell
cell.title = detailItem.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.detailLabel.textColor = (isNeedShowError && detailItem.notFillNum > 0 ? .failColor : .labelTextColor2)
if detailItem.notFillNum > 0 {
......
......@@ -264,7 +264,6 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = {
......@@ -296,7 +295,6 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell
}
......@@ -305,7 +303,6 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed
cell.title = item.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.answerArr = nil
if detailItem.type == .birthNation { // 出生国家
......
......@@ -13,8 +13,8 @@ class YHFormItemAddCell: UITableViewCell {
static let cellReuseIdentifier = "YHFormItemAddCell"
let btnTitleColor:UIColor = .brandMainColor
let btnHeight = 44.0
let cornerRadius = 4.0
let btnSize = CGSize(width: (KScreenWidth-(18+16)*2), height: 44)
var clickBlock:(()->Void)?
......@@ -38,8 +38,7 @@ class YHFormItemAddCell: UITableViewCell {
lazy var dotLineLayer:CAShapeLayer = {
let borderLayer = CAShapeLayer()
borderLayer.position = CGPoint(x: addBtn.bounds.midX, y: addBtn.bounds.midY);
borderLayer.path = UIBezierPath(roundedRect: borderLayer.bounds, cornerRadius: addBtn.layer.cornerRadius).cgPath
borderLayer.path = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: btnSize.width, height: btnSize.height), cornerRadius: cornerRadius).cgPath
borderLayer.lineWidth = 1
//[数组第一个数字表示单个虚线长度,第二个数字表示间隔]
borderLayer.lineDashPattern = [3,1] as [NSNumber]?
......@@ -68,18 +67,13 @@ class YHFormItemAddCell: UITableViewCell {
addBtn.layer.addSublayer(dotLineLayer)
addBtn.snp.makeConstraints { make in
make.left.top.equalToSuperview().offset(18)
make.right.bottom.equalToSuperview().offset(-18)
make.height.equalTo(btnHeight)
make.top.equalToSuperview().offset(18)
make.bottom.equalToSuperview().offset(-18)
make.size.equalTo(btnSize)
make.centerX.equalToSuperview()
}
}
override func layoutSubviews() {
super.layoutSubviews()
dotLineLayer.path = UIBezierPath(roundedRect: addBtn.bounds, cornerRadius: cornerRadius).cgPath
}
@objc func didClickAddBtn() {
if let clickBlock = clickBlock {
......
......@@ -81,10 +81,10 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
}
}
// 是否展示底部分割线
var isShowBottomLine:Bool = false {
// 是否隐藏顶部分割线
var isHiddenTopLine:Bool = false {
didSet {
bottomLine.isHidden = !isShowBottomLine
topLine.isHidden = isHiddenTopLine
}
}
......@@ -139,10 +139,9 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
return label
}()
private lazy var bottomLine:UIView = {
private lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
view.isHidden = true
return view
}()
......@@ -164,7 +163,7 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
contentView.addSubview(answer2Btn)
contentView.addSubview(answer1Btn)
contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine)
contentView.addSubview(topLine)
titleLabel.snp.makeConstraints { make in
......@@ -186,11 +185,11 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
make.top.equalToSuperview().offset(16)
}
bottomLine.snp.makeConstraints { make in
topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.bottom.equalToSuperview()
make.top.equalToSuperview()
}
setTips("", isShow: false)
......
......@@ -25,13 +25,13 @@ class YHFormItemEnterDetailCell: UITableViewCell {
arrowImgView.isHidden = isShowDeleteBtn
}
}
// 是否展示底部分割线
var isShowBottomLine:Bool = false {
// 是否隐藏顶部分割线
var isHiddenTopLine:Bool = false {
didSet {
bottomLine.isHidden = !isShowBottomLine
topLine.isHidden = isHiddenTopLine
}
}
var title:String? {
didSet {
......@@ -88,10 +88,9 @@ class YHFormItemEnterDetailCell: UITableViewCell {
return btn
}()
private lazy var bottomLine:UIView = {
private lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
view.isHidden = true
return view
}()
......@@ -111,14 +110,14 @@ class YHFormItemEnterDetailCell: UITableViewCell {
contentView.addSubview(detailLabel)
contentView.addSubview(arrowImgView)
contentView.addSubview(deleteButton)
contentView.addSubview(bottomLine)
contentView.addSubview(topLine)
titleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalTo(detailLabel.snp.left).offset(-8)
make.bottom.equalTo(bottomLine.snp.top).offset(-16)
make.bottom.equalToSuperview().offset(-16)
}
detailLabel.snp.makeConstraints { make in
......@@ -139,11 +138,11 @@ class YHFormItemEnterDetailCell: UITableViewCell {
make.right.equalToSuperview()
}
bottomLine.snp.makeConstraints { make in
topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.bottom.equalToSuperview()
make.top.equalToSuperview()
}
}
......
......@@ -21,10 +21,10 @@ class YHFormItemExpireDateCell: UITableViewCell {
var placeHolder:String? = "请选择"
var clickBlock:(()->Void)?
// 是否展示底部分割线
var isShowBottomLine:Bool = false {
// 是否隐藏顶部分割线
var isHiddenTopLine:Bool = false {
didSet {
bottomLine.isHidden = !isShowBottomLine
topLine.isHidden = isHiddenTopLine
}
}
......@@ -105,10 +105,9 @@ class YHFormItemExpireDateCell: UITableViewCell {
return label
}()
private lazy var bottomLine:UIView = {
private lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
view.isHidden = true
return view
}()
......@@ -130,7 +129,7 @@ class YHFormItemExpireDateCell: UITableViewCell {
contentView.addSubview(detailLabel)
contentView.addSubview(longTimeBtn)
contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine)
contentView.addSubview(topLine)
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
......@@ -150,11 +149,11 @@ class YHFormItemExpireDateCell: UITableViewCell {
make.centerY.equalTo(titleLabel)
}
bottomLine.snp.makeConstraints { make in
topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.bottom.equalToSuperview()
make.top.equalToSuperview()
}
setTips("", isShow: false)
......
......@@ -14,10 +14,10 @@ class YHFormItemInputTextCell: UITableViewCell {
let horizonalGap = 18.0
// 是否必填 如必填title会展示红色*
var isMust = false
// 是否展示底部分割线
var isShowBottomLine:Bool = false {
// 是否隐藏顶部分割线
var isHiddenTopLine:Bool = false {
didSet {
bottomLine.isHidden = !isShowBottomLine
topLine.isHidden = isHiddenTopLine
}
}
// BOOL值表示编辑是否结束
......@@ -91,10 +91,9 @@ class YHFormItemInputTextCell: UITableViewCell {
return label
}()
private lazy var bottomLine:UIView = {
private lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
view.isHidden = true
return view
}()
......@@ -113,7 +112,7 @@ class YHFormItemInputTextCell: UITableViewCell {
contentView.addSubview(titleLabel)
contentView.addSubview(textField)
contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine)
contentView.addSubview(topLine)
isMust = true
......@@ -129,11 +128,11 @@ class YHFormItemInputTextCell: UITableViewCell {
make.left.equalTo(titleLabel.snp.right).offset(10)
}
bottomLine.snp.makeConstraints { make in
topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.bottom.equalToSuperview()
make.top.equalToSuperview()
}
setTips("", isShow: false)
......
......@@ -11,7 +11,7 @@ import UIKit
class YHFormItemQuestionsCell: UITableViewCell {
static let cellReuseIdentifier = "YHFormItemQuestionsCell"
let horizonalGap = 18.0
private let btnWidth = 70.0
private let btnHeight = 32.0
private let btnTitleSelectColor = UIColor.brandMainColor
......@@ -67,6 +67,13 @@ class YHFormItemQuestionsCell: UITableViewCell {
}
}
// 是否隐藏顶部分割线
var isHiddenTopLine:Bool = false {
didSet {
topLine.isHidden = isHiddenTopLine
}
}
// 更新答案按钮选中状态
private func updateAnswerButton(_ btn:UIButton, _ isSelect:Bool) {
btn.layer.borderColor = (isSelect ? btnTitleSelectColor : .clear).cgColor
......@@ -114,6 +121,22 @@ class YHFormItemQuestionsCell: UITableViewCell {
btn.addTarget(self, action: #selector(didClickResponseBtn(btn:)), for: .touchUpInside)
return btn
}()
private lazy var tipsLabel: UILabel = {
let label = UILabel()
label.textColor = .failColor
label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
label.isHidden = true
return label
}()
private lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
required init?(coder: NSCoder) {
......@@ -132,6 +155,8 @@ class YHFormItemQuestionsCell: UITableViewCell {
contentView.addSubview(titleLabel)
contentView.addSubview(answer2Btn)
contentView.addSubview(answer1Btn)
contentView.addSubview(tipsLabel)
contentView.addSubview(topLine)
titleLabel.snp.makeConstraints { make in
make.top.equalTo(contentView.snp.top).offset(22)
......@@ -151,6 +176,38 @@ class YHFormItemQuestionsCell: UITableViewCell {
make.left.equalTo(answer1Btn.snp.right).offset(16)
make.centerY.equalTo(answer1Btn)
}
topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.top.equalToSuperview()
}
setTips("", isShow: false)
}
func setTips(_ tips:String?, isShow:Bool) {
tipsLabel.text = tips
tipsLabel.isHidden = !isShow
if isShow {
tipsLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.top.equalTo(answer1Btn.snp.bottom)
make.bottom.equalToSuperview().offset(-16)
}
} else {
tipsLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.top.equalTo(answer1Btn.snp.bottom)
make.height.equalTo(0)
make.bottom.equalToSuperview().offset(-16)
}
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
......
......@@ -57,10 +57,10 @@ class YHFormItemSelectSheetCell: UITableViewCell {
}
}
// 是否展示底部分割线
var isShowBottomLine:Bool = false {
// 是否隐藏顶部分割线
var isHiddenTopLine:Bool = false {
didSet {
bottomLine.isHidden = !isShowBottomLine
topLine.isHidden = isHiddenTopLine
}
}
......@@ -111,10 +111,9 @@ class YHFormItemSelectSheetCell: UITableViewCell {
return label
}()
private lazy var bottomLine:UIView = {
private lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
view.isHidden = true
return view
}()
......@@ -134,7 +133,7 @@ class YHFormItemSelectSheetCell: UITableViewCell {
contentView.addSubview(detailLabel)
contentView.addSubview(arrowImgView)
contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine)
contentView.addSubview(topLine)
contentView.addSubview(tipsButton)
titleLabel.snp.makeConstraints { make in
......@@ -161,11 +160,11 @@ class YHFormItemSelectSheetCell: UITableViewCell {
make.centerY.equalTo(detailLabel)
}
bottomLine.snp.makeConstraints { make in
topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.bottom.equalToSuperview()
make.top.equalToSuperview()
}
setTips("", isShow: false)
......
......@@ -79,12 +79,6 @@ class YHFormItemTitleCell: UITableViewCell {
return btn
}()
lazy var bottomLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
......@@ -98,7 +92,6 @@ class YHFormItemTitleCell: UITableViewCell {
self.selectionStyle = .none
contentView.addSubview(titleLabel)
contentView.addSubview(bottomLine)
contentView.addSubview(editButton)
contentView.addSubview(cancelButton)
......@@ -120,13 +113,6 @@ class YHFormItemTitleCell: UITableViewCell {
make.centerY.equalTo(editButton)
make.right.equalToSuperview()
}
bottomLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.bottom.equalToSuperview()
}
}
func showEditType(type: YHFormTitleItemEditType) {
......@@ -146,7 +132,7 @@ class YHFormItemTitleCell: UITableViewCell {
titleMaxRight = -(horizonalGap+92.0+5.0)
}
titleLabel.snp.updateConstraints { make in
make.right.equalToSuperview().offset(-horizonalGap)
make.right.equalToSuperview().offset(titleMaxRight)
}
self.setNeedsLayout()
self.layoutIfNeeded()
......
......@@ -186,35 +186,46 @@ extension YHServiceCenterMainViewModel {
callBackBlock(false,nil)
return
}
informationFillStepModel = resultModel
myInfoFillStep = resultModel.step
let arr = [1,2,3,4,5,6]
let target = myInfoFillStep //for test hjl 待填写的项目
for item in arr {
let model = YHInformationPerfectModel()
model.type = item
arrInfoFillStep.append(model)
if model.code == 200 {
if item < target {
model.isFinished = true
} else {
model.isFinished = false
informationFillStepModel = resultModel
myInfoFillStep = resultModel.step
let arr = [1,2,3,4,5,6]
let target = myInfoFillStep
for item in arr {
let model = YHInformationPerfectModel()
model.type = item
arrInfoFillStep.append(model)
if item < target {
model.isFinished = true
} else {
model.isFinished = false
}
if item == target {
model.isDoing = true
}
if item == target + 1 {
model.isNextDoingCell = true
} else {
model.isNextDoingCell = false
}
}
callBackBlock(true,nil)
if item == target {
model.isDoing = true
}
} else {
if item == target + 1 {
model.isNextDoingCell = true
} else {
model.isNextDoingCell = false
}
let error : YHErrorModel = YHErrorModel(errorCode:Int32(model.code),errorMsg: model.msg)
self.arrInfoFillStep = []
informationFillStepModel = nil
}
callBackBlock(true,nil)
} failBlock: { err in
self.arrInfoFillStep = []
self.informationFillStepModel = nil
......
......@@ -37,9 +37,11 @@ class YHAllApiName {
static let scoreDetailApi = "frontend/order-assessment/score_detail"
//获取其他资料填写信息
static let otherInfoFillApi = "frontend/order/getOrderOtherInformation"
// static let otherInfoFillApi = "frontend/order/getOrderOtherInformation"
static let otherInfoFillApi = "infoflow/order/getOrderOtherInformation"
//保存其他资料信息
static let updateOtherInfoApi = "frontend/order/updateOrderOtherInformation"
// static let updateOtherInfoApi = "frontend/order/updateOrderOtherInformation"
static let updateOtherInfoApi = "infoflow/order/updateOrderOtherInformation"
}
......@@ -67,7 +69,9 @@ class YHAllApiName {
// 删除学历
static let deleteEducationInfoApi = "frontend/education/del"
// 保存所有信息
static let saveAllEduAndQuaInfoApi = "frontend/education/save_all"
// static let saveAllEduAndQuaInfoApi = "frontend/education/save_all"
static let saveAllEduAndQuaInfoApi = "infoflow/submitEducert"
}
struct Qualification {
......
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