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

// 配偶信息

parent 46d435cb
......@@ -67,14 +67,17 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
certificateVC.delegate = self
basicInfoVC.delegate = self
updateStepView()
view.addSubview(stepView)
view.addSubview(bottomView)
updateStepView()
bottomView.submitBlock = {
[weak self] in
guard let self = self else { return }
let index = (currentIndex+1)%self.children.count
currentIndex = index
self.didClickSubmitBtn()
}
......@@ -110,6 +113,8 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
vc.removeFromParent()
}
print(self.children)
if spouse.isFollow() {
self.addChild(initalInfoVC)
......@@ -137,7 +142,8 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
print("step:\(spouse.step)")
currentIndex = spouse.step
currentIndex = 0
stepView.block = {
[weak self] index in
guard let self = self else { return }
......
......@@ -383,5 +383,19 @@ extension YHSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.layer.mask = nil
}
}
// 检查填写信息完整性
func checkIntegrity() -> Bool {
guard let spouse = spouse else { return false}
if !spouse.isFollow() {
return true
}
if isEmptyString(spouse.nationality) {
return false
}
return false
}
}
......@@ -8,7 +8,17 @@
import UIKit
import SwifterSwift
// 字符串是否为空(空的标准是nil或"")
func isEmptyString(_ string: String?) -> Bool {
if let string = string, string.count > 0 {
return false
}
return true
}
extension String {
/// JSONString转换为字典
func toDictionary() -> Dictionary<String, Any> {
guard let jsonData:Data = data(using: .utf8) else { return [String:Any]() }
......@@ -30,13 +40,6 @@ extension String {
}
return nil
}
static func isEmpty(string: String?) -> Bool {
if let string = string, string.count > 0 {
return false
}
return true
}
}
extension String {
......
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