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

// 学历资格

parent b7c7c226
...@@ -274,13 +274,6 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -274,13 +274,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
} }
......
...@@ -401,13 +401,6 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource { ...@@ -401,13 +401,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 +478,7 @@ extension YHEducationInfoListVC { ...@@ -485,7 +478,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 +515,11 @@ extension YHEducationInfoListVC { ...@@ -522,10 +515,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: "数据加载中..."))
......
...@@ -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 {
......
...@@ -67,7 +67,9 @@ class YHAllApiName { ...@@ -67,7 +67,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