Commit 6476b61f authored by Steven杜宇's avatar Steven杜宇

// 家庭

parent 15881b12
...@@ -177,34 +177,34 @@ class YHGCFamilyMemberInfoListVC: YHBaseViewController { ...@@ -177,34 +177,34 @@ class YHGCFamilyMemberInfoListVC: YHBaseViewController {
items.append(childArr) items.append(childArr)
// 父母section // 父母section
var parents = [YHFormItemProtocol]() // var parents = [YHFormItemProtocol]()
let item0 = YHFormTitleItem(type: .parent) // let item0 = YHFormTitleItem(type: .parent)
parents.append(item0) // parents.append(item0)
//
if let father = familyMemberInfo?.father { // if let father = familyMemberInfo?.father {
// 信息未填写时服务器返回的relation=0 // // 信息未填写时服务器返回的relation=0
father.relationType = .father // father.relationType = .father
parents.append(father) // parents.append(father)
} // }
//
if let mother = familyMemberInfo?.mother { // if let mother = familyMemberInfo?.mother {
// 信息未填写时服务器返回的relation=0 // // 信息未填写时服务器返回的relation=0
mother.relationType = .mother // mother.relationType = .mother
parents.append(mother) // parents.append(mother)
} // }
items.append(parents) // items.append(parents)
//
//
// 兄妹section // // 兄妹section
var brotherArr:[YHFormItemProtocol] = [YHFormTitleItem(type: .brother), YHFormAddItem(type: .addBrother)] // var brotherArr:[YHFormItemProtocol] = [YHFormTitleItem(type: .brother), YHFormAddItem(type: .addBrother)]
if let brothers = familyMemberInfo?.brother, !brothers.isEmpty { // if let brothers = familyMemberInfo?.brother, !brothers.isEmpty {
for brother in brothers { // for brother in brothers {
// 信息未填写时服务器返回的relation=0 // // 信息未填写时服务器返回的relation=0
brother.relation = String(format: "%d", YHFamilyMemberType.brother.rawValue) // brother.relation = String(format: "%d", YHFamilyMemberType.brother.rawValue)
} // }
brotherArr.insert(contentsOf: brothers, at:1) // brotherArr.insert(contentsOf: brothers, at:1)
} // }
items.append(brotherArr) // items.append(brotherArr)
let childCount = familyMemberInfo?.child?.count ?? 0 let childCount = familyMemberInfo?.child?.count ?? 0
if childCount <= 0 { if childCount <= 0 {
...@@ -215,14 +215,14 @@ class YHGCFamilyMemberInfoListVC: YHBaseViewController { ...@@ -215,14 +215,14 @@ class YHGCFamilyMemberInfoListVC: YHBaseViewController {
} }
} }
let brotherCount = familyMemberInfo?.brother?.count ?? 0 // let brotherCount = familyMemberInfo?.brother?.count ?? 0
if brotherCount <= 0 { // if brotherCount <= 0 {
isBrothersEditMode = .none // isBrothersEditMode = .none
} else { // } else {
if isBrothersEditMode == .none { // if isBrothersEditMode == .none {
isBrothersEditMode = .canEdit // isBrothersEditMode = .canEdit
} // }
} // }
tableView.reloadData() tableView.reloadData()
} }
} }
......
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