Commit 7d8dacdd authored by David黄金龙's avatar David黄金龙

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

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  协助后台编程
  // 分割线处理
  // 学历资格
parents 4b1b596d 587ac748
...@@ -198,7 +198,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -198,7 +198,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
let cellType = getCellType(detailItem) let cellType = getCellType(detailItem)
if cellType == .inputText { if cellType == .inputText {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as! YHFormItemInputTextCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as! YHFormItemInputTextCell
cell.isShowBottomLine = (indexPath.row != arr.count-1)
var isValueValid = false var isValueValid = false
if let value = detailItem.value, !value.isEmpty { if let value = detailItem.value, !value.isEmpty {
isValueValid = true isValueValid = true
...@@ -237,7 +236,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -237,7 +236,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
} else if cellType == .selectSheet { } else if cellType == .selectSheet {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as! YHFormItemSelectSheetCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as! YHFormItemSelectSheetCell
cell.isShowBottomLine = (indexPath.row != arr.count-1)
cell.isShowTipsButton = (detailItem.type == .degreeType) cell.isShowTipsButton = (detailItem.type == .degreeType)
cell.tipsBtnClickBlock = nil cell.tipsBtnClickBlock = nil
if detailItem.type == .degreeType { if detailItem.type == .degreeType {
...@@ -274,13 +272,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -274,13 +272,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 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 return UITableView.automaticDimension
} }
......
...@@ -307,7 +307,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource { ...@@ -307,7 +307,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
if eduInfo.vacantNum > 0 { // 有未填项 if eduInfo.vacantNum > 0 { // 有未填项
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell
cell.isShowBottomLine = (indexPath.row != eduList.count)
if let college = eduInfo.college, !college.isEmpty { if let college = eduInfo.college, !college.isEmpty {
cell.title = eduInfo.college cell.title = eduInfo.college
} else { } else {
...@@ -360,7 +359,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource { ...@@ -360,7 +359,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
// 第一行是标题 // 第一行是标题
let quaInfo:YHQualificationInfo = quaList[indexPath.row-1] let quaInfo:YHQualificationInfo = quaList[indexPath.row-1]
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell
cell.isShowBottomLine = (indexPath.row != quaList.count)
cell.title = "证书标题" cell.title = "证书标题"
if let qualification = quaInfo.qualification, !qualification.isEmpty { if let qualification = quaInfo.qualification, !qualification.isEmpty {
cell.title = qualification cell.title = qualification
...@@ -401,13 +399,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource { ...@@ -401,13 +399,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 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 return UITableView.automaticDimension
} }
...@@ -485,7 +476,7 @@ extension YHEducationInfoListVC { ...@@ -485,7 +476,7 @@ extension YHEducationInfoListVC {
// 请求家庭成员信息 // 请求家庭成员信息
func requestEducationInfo() { func requestEducationInfo() {
self.educationRequest.requestEducationInfo(params: ["order_id": self.orderId]) { self.educationRequest.requestEducationInfoList(params: ["order_id": self.orderId]) {
[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 {
...@@ -522,10 +513,11 @@ extension YHEducationInfoListVC { ...@@ -522,10 +513,11 @@ extension YHEducationInfoListVC {
// 保存 // 保存
func saveInfo() { func saveInfo() {
let params = ["go_next": 0, guard let educationInfo = educationInfo else { return }
"graduate": educationInfo?.isSpouseNameSame ?? 0, let params:[String : Any] = [ "order_id": self.orderId,
"order_id": self.orderId, "goNextFlow": 0,
"qualification": educationInfo?.isNameSame ?? 0] as [String : Any] "isSpouseNameSame": educationInfo.isSpouseNameSame ?? false,
"isNameSame": educationInfo.isNameSame ?? false]
self.educationRequest.saveAllEducationInfo(params: params) { self.educationRequest.saveAllEducationInfo(params: params) {
[weak self] success, error in [weak self] success, error in
......
...@@ -236,13 +236,6 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -236,13 +236,6 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource {
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 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 return UITableView.automaticDimension
} }
......
...@@ -16,8 +16,8 @@ class YHEducationRequestViewModel { ...@@ -16,8 +16,8 @@ class YHEducationRequestViewModel {
// 专业详情信息 // 专业详情信息
var qualificationDetailInfo: YHQualificationDetailInfo? 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: "数据加载中...")) YHHUD.show(.progress(message: "数据加载中..."))
......
...@@ -265,7 +265,6 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -265,7 +265,6 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.setTips(detailItem.tips, isShow: detailItem.isShowTips) cell.setTips(detailItem.tips, isShow: detailItem.isShowTips)
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.text = detailItem.value cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = { cell.textChange = {
[weak self] (text, isEditEnd) in [weak self] (text, isEditEnd) in
guard let self = self else { return } guard let self = self else { return }
...@@ -305,7 +304,6 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -305,7 +304,6 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.placeHolder = detailItem.placeHolder cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.detail = detailItem.value cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.setTips(detailItem.tips, isShow: detailItem.isShowTips) cell.setTips(detailItem.tips, isShow: detailItem.isShowTips)
return cell return cell
} }
...@@ -317,7 +315,6 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -317,7 +315,6 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.title = item.getTitle() cell.title = item.getTitle()
cell.answerArr = nil cell.answerArr = nil
cell.setTips(detailItem.tips, isShow: detailItem.isShowTips) cell.setTips(detailItem.tips, isShow: detailItem.isShowTips)
cell.isShowBottomLine = indexPath.row != arr.count-1
if detailItem.type == .birthNation { // 出生国家 if detailItem.type == .birthNation { // 出生国家
var select = false var select = false
......
...@@ -224,7 +224,6 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -224,7 +224,6 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
var select = false var select = false
if let value = detailItem.value { if let value = detailItem.value {
...@@ -278,7 +277,6 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -278,7 +277,6 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.detail = detailItem.value cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell return cell
} else if cellType == .inputText { // 输入文字cell } else if cellType == .inputText { // 输入文字cell
...@@ -287,7 +285,6 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -287,7 +285,6 @@ extension YHChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.placeHolder = detailItem.placeHolder cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.text = detailItem.value cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = { cell.textChange = {
[weak self] (text, isEditEnd) in [weak self] (text, isEditEnd) in
guard let self = self else { return } guard let self = self else { return }
......
...@@ -363,7 +363,6 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -363,7 +363,6 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.placeHolder = detailItem.placeHolder cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.text = detailItem.value cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
if detailItem.type == .hkIdentityCardNumber { // 输入香港身份证号码 if detailItem.type == .hkIdentityCardNumber { // 输入香港身份证号码
let isEmptyValue = isEmptyString(detailItem.value) let isEmptyValue = isEmptyString(detailItem.value)
...@@ -416,7 +415,6 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -416,7 +415,6 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.placeHolder = detailItem.placeHolder cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.detail = detailItem.value cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips) cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
return cell return cell
...@@ -427,7 +425,6 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -427,7 +425,6 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = item.getTitle() cell.title = item.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.answerArr = nil cell.answerArr = nil
......
...@@ -179,7 +179,6 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -179,7 +179,6 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips) cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
cell.isShowBottomLine = indexPath.row != arr.count-1
var select = false var select = false
if let value = detailItem.value { if let value = detailItem.value {
...@@ -234,7 +233,6 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -234,7 +233,6 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips) cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
cell.placeHolder = detailItem.placeHolder cell.placeHolder = detailItem.placeHolder
cell.detail = detailItem.value cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell return cell
} }
...@@ -247,7 +245,6 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -247,7 +245,6 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.text = detailItem.value cell.text = detailItem.value
cell.placeHolder = detailItem.placeHolder cell.placeHolder = detailItem.placeHolder
cell.setTips(detailItem.tips, isShow:detailItem.isShowTips) cell.setTips(detailItem.tips, isShow:detailItem.isShowTips)
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = { cell.textChange = {
[weak self] (text, isEditEnd) in [weak self] (text, isEditEnd) in
guard let self = self else { return } guard let self = self else { return }
......
...@@ -231,7 +231,6 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -231,7 +231,6 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.text = detailItem.value cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = { cell.textChange = {
...@@ -263,7 +262,6 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -263,7 +262,6 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.detail = detailItem.value cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell return cell
} }
...@@ -272,7 +270,6 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -272,7 +270,6 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = item.getTitle() cell.title = item.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.answerArr = nil cell.answerArr = nil
if detailItem.type == .birthNation { // 出生国家 if detailItem.type == .birthNation { // 出生国家
......
...@@ -181,7 +181,6 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour ...@@ -181,7 +181,6 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour
cell.placeHolder = detailItem.placeHolder cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.text = detailItem.value cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = { cell.textChange = {
[weak self] (text, isEditEnd) in [weak self] (text, isEditEnd) in
...@@ -221,7 +220,6 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour ...@@ -221,7 +220,6 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.detail = detailItem.value cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell return cell
} }
...@@ -231,7 +229,6 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour ...@@ -231,7 +229,6 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.detail = detailItem.value cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell return cell
} }
} }
......
...@@ -337,7 +337,6 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -337,7 +337,6 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
let detailItem = item as! YHFamilyMember let detailItem = item as! YHFamilyMember
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.detailLabel.textColor = (isNeedShowError && detailItem.notFillNum > 0 ? .failColor : .labelTextColor2) cell.detailLabel.textColor = (isNeedShowError && detailItem.notFillNum > 0 ? .failColor : .labelTextColor2)
if detailItem.notFillNum > 0 { if detailItem.notFillNum > 0 {
......
...@@ -264,7 +264,6 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -264,7 +264,6 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.text = detailItem.value cell.text = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.textChange = { cell.textChange = {
...@@ -296,7 +295,6 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -296,7 +295,6 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.detail = detailItem.value cell.detail = detailItem.value
cell.isShowBottomLine = indexPath.row != arr.count-1
return cell return cell
} }
...@@ -305,7 +303,6 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -305,7 +303,6 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = item.getTitle() cell.title = item.getTitle()
cell.isShowBottomLine = indexPath.row != arr.count-1
cell.answerArr = nil cell.answerArr = nil
if detailItem.type == .birthNation { // 出生国家 if detailItem.type == .birthNation { // 出生国家
......
...@@ -13,8 +13,8 @@ class YHFormItemAddCell: UITableViewCell { ...@@ -13,8 +13,8 @@ class YHFormItemAddCell: UITableViewCell {
static let cellReuseIdentifier = "YHFormItemAddCell" static let cellReuseIdentifier = "YHFormItemAddCell"
let btnTitleColor:UIColor = .brandMainColor let btnTitleColor:UIColor = .brandMainColor
let btnHeight = 44.0
let cornerRadius = 4.0 let cornerRadius = 4.0
let btnSize = CGSize(width: (KScreenWidth-(18+16)*2), height: 44)
var clickBlock:(()->Void)? var clickBlock:(()->Void)?
...@@ -38,8 +38,7 @@ class YHFormItemAddCell: UITableViewCell { ...@@ -38,8 +38,7 @@ class YHFormItemAddCell: UITableViewCell {
lazy var dotLineLayer:CAShapeLayer = { lazy var dotLineLayer:CAShapeLayer = {
let borderLayer = CAShapeLayer() let borderLayer = CAShapeLayer()
borderLayer.position = CGPoint(x: addBtn.bounds.midX, y: addBtn.bounds.midY); borderLayer.path = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: btnSize.width, height: btnSize.height), cornerRadius: cornerRadius).cgPath
borderLayer.path = UIBezierPath(roundedRect: borderLayer.bounds, cornerRadius: addBtn.layer.cornerRadius).cgPath
borderLayer.lineWidth = 1 borderLayer.lineWidth = 1
//[数组第一个数字表示单个虚线长度,第二个数字表示间隔] //[数组第一个数字表示单个虚线长度,第二个数字表示间隔]
borderLayer.lineDashPattern = [3,1] as [NSNumber]? borderLayer.lineDashPattern = [3,1] as [NSNumber]?
...@@ -68,18 +67,13 @@ class YHFormItemAddCell: UITableViewCell { ...@@ -68,18 +67,13 @@ class YHFormItemAddCell: UITableViewCell {
addBtn.layer.addSublayer(dotLineLayer) addBtn.layer.addSublayer(dotLineLayer)
addBtn.snp.makeConstraints { make in addBtn.snp.makeConstraints { make in
make.left.top.equalToSuperview().offset(18) make.top.equalToSuperview().offset(18)
make.right.bottom.equalToSuperview().offset(-18) make.bottom.equalToSuperview().offset(-18)
make.height.equalTo(btnHeight) make.size.equalTo(btnSize)
make.centerX.equalToSuperview()
} }
} }
override func layoutSubviews() {
super.layoutSubviews()
dotLineLayer.path = UIBezierPath(roundedRect: addBtn.bounds, cornerRadius: cornerRadius).cgPath
}
@objc func didClickAddBtn() { @objc func didClickAddBtn() {
if let clickBlock = clickBlock { if let clickBlock = clickBlock {
......
...@@ -81,10 +81,10 @@ class YHFormItemDoubleChoiceCell: UITableViewCell { ...@@ -81,10 +81,10 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
} }
} }
// 是否展示底部分割线 // 是否隐藏顶部分割线
var isShowBottomLine:Bool = false { var isHiddenTopLine:Bool = false {
didSet { didSet {
bottomLine.isHidden = !isShowBottomLine topLine.isHidden = isHiddenTopLine
} }
} }
...@@ -139,10 +139,9 @@ class YHFormItemDoubleChoiceCell: UITableViewCell { ...@@ -139,10 +139,9 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
return label return label
}() }()
private lazy var bottomLine:UIView = { private lazy var topLine:UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .separatorColor view.backgroundColor = .separatorColor
view.isHidden = true
return view return view
}() }()
...@@ -164,7 +163,7 @@ class YHFormItemDoubleChoiceCell: UITableViewCell { ...@@ -164,7 +163,7 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
contentView.addSubview(answer2Btn) contentView.addSubview(answer2Btn)
contentView.addSubview(answer1Btn) contentView.addSubview(answer1Btn)
contentView.addSubview(tipsLabel) contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine) contentView.addSubview(topLine)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
...@@ -186,11 +185,11 @@ class YHFormItemDoubleChoiceCell: UITableViewCell { ...@@ -186,11 +185,11 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
make.top.equalToSuperview().offset(16) make.top.equalToSuperview().offset(16)
} }
bottomLine.snp.makeConstraints { make in topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0) make.height.equalTo(1.0)
make.bottom.equalToSuperview() make.top.equalToSuperview()
} }
setTips("", isShow: false) setTips("", isShow: false)
......
...@@ -25,10 +25,10 @@ class YHFormItemEnterDetailCell: UITableViewCell { ...@@ -25,10 +25,10 @@ class YHFormItemEnterDetailCell: UITableViewCell {
arrowImgView.isHidden = isShowDeleteBtn arrowImgView.isHidden = isShowDeleteBtn
} }
} }
// 是否展示底部分割线 // 是否隐藏顶部分割线
var isShowBottomLine:Bool = false { var isHiddenTopLine:Bool = false {
didSet { didSet {
bottomLine.isHidden = !isShowBottomLine topLine.isHidden = isHiddenTopLine
} }
} }
...@@ -88,10 +88,9 @@ class YHFormItemEnterDetailCell: UITableViewCell { ...@@ -88,10 +88,9 @@ class YHFormItemEnterDetailCell: UITableViewCell {
return btn return btn
}() }()
private lazy var bottomLine:UIView = { private lazy var topLine:UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .separatorColor view.backgroundColor = .separatorColor
view.isHidden = true
return view return view
}() }()
...@@ -111,14 +110,14 @@ class YHFormItemEnterDetailCell: UITableViewCell { ...@@ -111,14 +110,14 @@ class YHFormItemEnterDetailCell: UITableViewCell {
contentView.addSubview(detailLabel) contentView.addSubview(detailLabel)
contentView.addSubview(arrowImgView) contentView.addSubview(arrowImgView)
contentView.addSubview(deleteButton) contentView.addSubview(deleteButton)
contentView.addSubview(bottomLine) contentView.addSubview(topLine)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16) make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
make.right.equalTo(detailLabel.snp.left).offset(-8) 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 detailLabel.snp.makeConstraints { make in
...@@ -139,11 +138,11 @@ class YHFormItemEnterDetailCell: UITableViewCell { ...@@ -139,11 +138,11 @@ class YHFormItemEnterDetailCell: UITableViewCell {
make.right.equalToSuperview() make.right.equalToSuperview()
} }
bottomLine.snp.makeConstraints { make in topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0) make.height.equalTo(1.0)
make.bottom.equalToSuperview() make.top.equalToSuperview()
} }
} }
......
...@@ -21,10 +21,10 @@ class YHFormItemExpireDateCell: UITableViewCell { ...@@ -21,10 +21,10 @@ class YHFormItemExpireDateCell: UITableViewCell {
var placeHolder:String? = "请选择" var placeHolder:String? = "请选择"
var clickBlock:(()->Void)? var clickBlock:(()->Void)?
// 是否展示底部分割线 // 是否隐藏顶部分割线
var isShowBottomLine:Bool = false { var isHiddenTopLine:Bool = false {
didSet { didSet {
bottomLine.isHidden = !isShowBottomLine topLine.isHidden = isHiddenTopLine
} }
} }
...@@ -105,10 +105,9 @@ class YHFormItemExpireDateCell: UITableViewCell { ...@@ -105,10 +105,9 @@ class YHFormItemExpireDateCell: UITableViewCell {
return label return label
}() }()
private lazy var bottomLine:UIView = { private lazy var topLine:UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .separatorColor view.backgroundColor = .separatorColor
view.isHidden = true
return view return view
}() }()
...@@ -130,7 +129,7 @@ class YHFormItemExpireDateCell: UITableViewCell { ...@@ -130,7 +129,7 @@ class YHFormItemExpireDateCell: UITableViewCell {
contentView.addSubview(detailLabel) contentView.addSubview(detailLabel)
contentView.addSubview(longTimeBtn) contentView.addSubview(longTimeBtn)
contentView.addSubview(tipsLabel) contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine) contentView.addSubview(topLine)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
...@@ -150,11 +149,11 @@ class YHFormItemExpireDateCell: UITableViewCell { ...@@ -150,11 +149,11 @@ class YHFormItemExpireDateCell: UITableViewCell {
make.centerY.equalTo(titleLabel) make.centerY.equalTo(titleLabel)
} }
bottomLine.snp.makeConstraints { make in topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0) make.height.equalTo(1.0)
make.bottom.equalToSuperview() make.top.equalToSuperview()
} }
setTips("", isShow: false) setTips("", isShow: false)
......
...@@ -14,10 +14,10 @@ class YHFormItemInputTextCell: UITableViewCell { ...@@ -14,10 +14,10 @@ class YHFormItemInputTextCell: UITableViewCell {
let horizonalGap = 18.0 let horizonalGap = 18.0
// 是否必填 如必填title会展示红色* // 是否必填 如必填title会展示红色*
var isMust = false var isMust = false
// 是否展示底部分割线 // 是否隐藏顶部分割线
var isShowBottomLine:Bool = false { var isHiddenTopLine:Bool = false {
didSet { didSet {
bottomLine.isHidden = !isShowBottomLine topLine.isHidden = isHiddenTopLine
} }
} }
// BOOL值表示编辑是否结束 // BOOL值表示编辑是否结束
...@@ -91,10 +91,9 @@ class YHFormItemInputTextCell: UITableViewCell { ...@@ -91,10 +91,9 @@ class YHFormItemInputTextCell: UITableViewCell {
return label return label
}() }()
private lazy var bottomLine:UIView = { private lazy var topLine:UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .separatorColor view.backgroundColor = .separatorColor
view.isHidden = true
return view return view
}() }()
...@@ -113,7 +112,7 @@ class YHFormItemInputTextCell: UITableViewCell { ...@@ -113,7 +112,7 @@ class YHFormItemInputTextCell: UITableViewCell {
contentView.addSubview(titleLabel) contentView.addSubview(titleLabel)
contentView.addSubview(textField) contentView.addSubview(textField)
contentView.addSubview(tipsLabel) contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine) contentView.addSubview(topLine)
isMust = true isMust = true
...@@ -129,11 +128,11 @@ class YHFormItemInputTextCell: UITableViewCell { ...@@ -129,11 +128,11 @@ class YHFormItemInputTextCell: UITableViewCell {
make.left.equalTo(titleLabel.snp.right).offset(10) make.left.equalTo(titleLabel.snp.right).offset(10)
} }
bottomLine.snp.makeConstraints { make in topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0) make.height.equalTo(1.0)
make.bottom.equalToSuperview() make.top.equalToSuperview()
} }
setTips("", isShow: false) setTips("", isShow: false)
......
...@@ -11,7 +11,7 @@ import UIKit ...@@ -11,7 +11,7 @@ import UIKit
class YHFormItemQuestionsCell: UITableViewCell { class YHFormItemQuestionsCell: UITableViewCell {
static let cellReuseIdentifier = "YHFormItemQuestionsCell" static let cellReuseIdentifier = "YHFormItemQuestionsCell"
let horizonalGap = 18.0
private let btnWidth = 70.0 private let btnWidth = 70.0
private let btnHeight = 32.0 private let btnHeight = 32.0
private let btnTitleSelectColor = UIColor.brandMainColor private let btnTitleSelectColor = UIColor.brandMainColor
...@@ -67,6 +67,13 @@ class YHFormItemQuestionsCell: UITableViewCell { ...@@ -67,6 +67,13 @@ class YHFormItemQuestionsCell: UITableViewCell {
} }
} }
// 是否隐藏顶部分割线
var isHiddenTopLine:Bool = false {
didSet {
topLine.isHidden = isHiddenTopLine
}
}
// 更新答案按钮选中状态 // 更新答案按钮选中状态
private func updateAnswerButton(_ btn:UIButton, _ isSelect:Bool) { private func updateAnswerButton(_ btn:UIButton, _ isSelect:Bool) {
btn.layer.borderColor = (isSelect ? btnTitleSelectColor : .clear).cgColor btn.layer.borderColor = (isSelect ? btnTitleSelectColor : .clear).cgColor
...@@ -115,6 +122,22 @@ class YHFormItemQuestionsCell: UITableViewCell { ...@@ -115,6 +122,22 @@ class YHFormItemQuestionsCell: UITableViewCell {
return btn 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) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
...@@ -132,6 +155,8 @@ class YHFormItemQuestionsCell: UITableViewCell { ...@@ -132,6 +155,8 @@ class YHFormItemQuestionsCell: UITableViewCell {
contentView.addSubview(titleLabel) contentView.addSubview(titleLabel)
contentView.addSubview(answer2Btn) contentView.addSubview(answer2Btn)
contentView.addSubview(answer1Btn) contentView.addSubview(answer1Btn)
contentView.addSubview(tipsLabel)
contentView.addSubview(topLine)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.top.equalTo(contentView.snp.top).offset(22) make.top.equalTo(contentView.snp.top).offset(22)
...@@ -151,6 +176,38 @@ class YHFormItemQuestionsCell: UITableViewCell { ...@@ -151,6 +176,38 @@ class YHFormItemQuestionsCell: UITableViewCell {
make.left.equalTo(answer1Btn.snp.right).offset(16) make.left.equalTo(answer1Btn.snp.right).offset(16)
make.centerY.equalTo(answer1Btn) 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 { ...@@ -57,10 +57,10 @@ class YHFormItemSelectSheetCell: UITableViewCell {
} }
} }
// 是否展示底部分割线 // 是否隐藏顶部分割线
var isShowBottomLine:Bool = false { var isHiddenTopLine:Bool = false {
didSet { didSet {
bottomLine.isHidden = !isShowBottomLine topLine.isHidden = isHiddenTopLine
} }
} }
...@@ -111,10 +111,9 @@ class YHFormItemSelectSheetCell: UITableViewCell { ...@@ -111,10 +111,9 @@ class YHFormItemSelectSheetCell: UITableViewCell {
return label return label
}() }()
private lazy var bottomLine:UIView = { private lazy var topLine:UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .separatorColor view.backgroundColor = .separatorColor
view.isHidden = true
return view return view
}() }()
...@@ -134,7 +133,7 @@ class YHFormItemSelectSheetCell: UITableViewCell { ...@@ -134,7 +133,7 @@ class YHFormItemSelectSheetCell: UITableViewCell {
contentView.addSubview(detailLabel) contentView.addSubview(detailLabel)
contentView.addSubview(arrowImgView) contentView.addSubview(arrowImgView)
contentView.addSubview(tipsLabel) contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine) contentView.addSubview(topLine)
contentView.addSubview(tipsButton) contentView.addSubview(tipsButton)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
...@@ -161,11 +160,11 @@ class YHFormItemSelectSheetCell: UITableViewCell { ...@@ -161,11 +160,11 @@ class YHFormItemSelectSheetCell: UITableViewCell {
make.centerY.equalTo(detailLabel) make.centerY.equalTo(detailLabel)
} }
bottomLine.snp.makeConstraints { make in topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0) make.height.equalTo(1.0)
make.bottom.equalToSuperview() make.top.equalToSuperview()
} }
setTips("", isShow: false) setTips("", isShow: false)
......
...@@ -79,12 +79,6 @@ class YHFormItemTitleCell: UITableViewCell { ...@@ -79,12 +79,6 @@ class YHFormItemTitleCell: UITableViewCell {
return btn return btn
}() }()
lazy var bottomLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
...@@ -98,7 +92,6 @@ class YHFormItemTitleCell: UITableViewCell { ...@@ -98,7 +92,6 @@ class YHFormItemTitleCell: UITableViewCell {
self.selectionStyle = .none self.selectionStyle = .none
contentView.addSubview(titleLabel) contentView.addSubview(titleLabel)
contentView.addSubview(bottomLine)
contentView.addSubview(editButton) contentView.addSubview(editButton)
contentView.addSubview(cancelButton) contentView.addSubview(cancelButton)
...@@ -120,13 +113,6 @@ class YHFormItemTitleCell: UITableViewCell { ...@@ -120,13 +113,6 @@ class YHFormItemTitleCell: UITableViewCell {
make.centerY.equalTo(editButton) make.centerY.equalTo(editButton)
make.right.equalToSuperview() 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) { func showEditType(type: YHFormTitleItemEditType) {
...@@ -146,7 +132,7 @@ class YHFormItemTitleCell: UITableViewCell { ...@@ -146,7 +132,7 @@ class YHFormItemTitleCell: UITableViewCell {
titleMaxRight = -(horizonalGap+92.0+5.0) titleMaxRight = -(horizonalGap+92.0+5.0)
} }
titleLabel.snp.updateConstraints { make in titleLabel.snp.updateConstraints { make in
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(titleMaxRight)
} }
self.setNeedsLayout() self.setNeedsLayout()
self.layoutIfNeeded() self.layoutIfNeeded()
......
...@@ -93,7 +93,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController { ...@@ -93,7 +93,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
guard let self = self else { return } guard let self = self else { return }
if self.viewModel.isCanNext(self.stepView.currentIndex) { if self.viewModel.isCanNext(self.stepView.currentIndex) {
self.stepView.currentIndex = self.stepView.currentIndex + 1 self.stepView.currentIndex = self.stepView.currentIndex + 1
self.viewModel.updateMainInformation(.submit) {[weak self] success in self.viewModel.updateMainInformation(.submit, self.orderId) {[weak self] success in
guard let self = self else { return } guard let self = self else { return }
self.isShowPrompt = false self.isShowPrompt = false
self.stepView.currentIndex = self.stepView.currentIndex self.stepView.currentIndex = self.stepView.currentIndex
...@@ -112,7 +112,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController { ...@@ -112,7 +112,7 @@ class YHMainApplicantInformationViewController: 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.updateMainInformation(.save) {[weak self] success in self.viewModel.updateMainInformation(.save, self.orderId) {[weak self] success in
guard let self = self else { return } guard let self = self else { return }
} }
} }
......
...@@ -209,10 +209,10 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -209,10 +209,10 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
func requestMainInformation(_ orderID: String, callBackBlock:@escaping (_ success: YHMainInformationModel?, _ error:YHErrorModel?)->()) { func requestMainInformation(_ orderID: String, callBackBlock:@escaping (_ success: YHMainInformationModel?, _ error:YHErrorModel?)->()) {
// /infoflow/order-information/get_information?order_id=9402 // /infoflow/order-information/get_information?order_id=9402
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.OrderInformation.getInformation let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.OrderInformation.getInformation + "?order_id=\(orderID)"
// let strUrl = "http://192.168.25.48:18088/" + YHAllApiName.OrderInformation.getInformation // let strUrl = "http://192.168.25.48:18088/" + YHAllApiName.OrderInformation.getInformation + "?order_id=\(orderID)"
let params: [String : Any] = ["order_id": orderID] // let params: [String : Any] = ["order_id": orderID]
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard let self = self else { return } guard let self = self else { return }
guard let model = NetBaseModel.deserialize(dict: json) else { guard let model = NetBaseModel.deserialize(dict: json) else {
...@@ -233,7 +233,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -233,7 +233,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
} }
} }
func updateMainInformation(_ saveType: YHSaveType, callBackBlock:@escaping (_ success: Bool)->()) { func updateMainInformation(_ saveType: YHSaveType,_ orderID: Int, callBackBlock:@escaping (_ success: Bool)->()) {
var type = "" var type = ""
if saveType == .save { if saveType == .save {
type = "save" type = "save"
...@@ -279,12 +279,12 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -279,12 +279,12 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
"has_hk_id": mainModel.has_hk_id ?? 0, "has_hk_id": mainModel.has_hk_id ?? 0,
"hk_id_number": mainModel.hk_id_number ?? "", "hk_id_number": mainModel.hk_id_number ?? "",
"id": mainModel.id ?? 0, "id": mainModel.id ?? 0,
"is_handled": mainModel.is_handled ?? "", "is_handled": mainModel.is_handled ?? 0,
"is_live_oversea_year": mainModel.is_live_oversea_year ?? 0, "is_live_oversea_year": mainModel.is_live_oversea_year ?? 0,
"married": mainModel.married ?? 0, "married": mainModel.married ?? 0,
"mobile": mainModel.mobile ?? "", "mobile": mainModel.mobile ?? "",
"nationality": mainModel.nationality ?? "", "nationality": mainModel.nationality ?? "",
"order_id": mainModel.order_id ?? "", "order_id": orderID,
"sex": mainModel.sex ?? 0, "sex": mainModel.sex ?? 0,
"step": mainModel.step ?? 0, "step": mainModel.step ?? 0,
"surname": mainModel.surname ?? "", "surname": mainModel.surname ?? "",
...@@ -297,9 +297,11 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -297,9 +297,11 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
"hk_macao_pass": hkID, "hk_macao_pass": hkID,
"passport": passport] "passport": passport]
] ]
// let strUrl = "http://192.168.25.48:18088/" + YHAllApiName.OrderInformation.updateInformation
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.OrderInformation.updateInformation let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.OrderInformation.updateInformation
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return } guard let self = self else { return }
printLog("code = \(json["code"]) ---- message =\(json["msg"])")
callBackBlock(true) callBackBlock(true)
} failBlock: { err in } failBlock: { err in
callBackBlock(false) callBackBlock(false)
......
...@@ -69,7 +69,9 @@ class YHAllApiName { ...@@ -69,7 +69,9 @@ class YHAllApiName {
// 删除学历 // 删除学历
static let deleteEducationInfoApi = "frontend/education/del" 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 { 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