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

// 家庭信息

parent 22be963a
......@@ -78,7 +78,8 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
updateStepView()
print("step:\(child.step)")
currentStep = child.step
stepView.maxIndex = child.step
view.addSubview(stepView)
view.addSubview(bottomView)
......@@ -140,7 +141,6 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
stepView.dataSource = titles
let step = currentStep
currentStep = step
stepView.maxIndex = child.step
stepView.block = {
[weak self] index in
......
......@@ -104,6 +104,7 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
updateStepView()
print("step:\(spouse.step)")
currentStep = spouse.step
stepView.maxIndex = spouse.step
bottomView.submitBlock = {
[weak self] in
......@@ -162,7 +163,6 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
}
stepView.dataSource = titles
stepView.maxIndex = spouse.step
// 数据源可能会变,所以需要重新设置step
let step = currentStep
currentStep = step
......
......@@ -1239,6 +1239,7 @@ class YHCertificates: SmartCodable {
// MARK: - YHCNIdentityCard
class YHCNIdentityCard: SmartCodable {
static let longTime = "8888-01-01"
var id: Int = 0
var number: String = ""
var issueAt: String = ""
......@@ -1246,7 +1247,7 @@ class YHCNIdentityCard: SmartCodable {
var issueDateEndAt: String = ""
var imgFront: String = ""
var imgBack: String = ""
var passportType: Int = 0
var passportType: Int = -1
enum CodingKeys: String, CodingKey {
case id = "id"
......
......@@ -14,8 +14,8 @@ class YHFamilyRequestViewModel {
//请求所有家庭成员信息
func getFamilyInfo(params:[String:Any], callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.familyInfoApi
// let strUrl = "http://192.168.34.187:8808/" + YHAllApiName.Family.familyInfoApi
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.familyInfoApi
let strUrl = "http://192.168.34.187:8808/" + YHAllApiName.Family.familyInfoApi
YHHUD.show(.progress(message: "数据加载中..."))
......@@ -45,8 +45,8 @@ class YHFamilyRequestViewModel {
YHHUD.show(.progress(message: "数据加载中..."))
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.familyInfoApi
// let strUrl = "http://192.168.34.187:8808/" + YHAllApiName.Family.familyInfoApi
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.familyInfoApi
let strUrl = "http://192.168.34.187:8808/" + YHAllApiName.Family.familyInfoApi
let _ = YHNetRequest.postRequest(url: strUrl, params:params) {[weak self] json, code in
......
......@@ -20,7 +20,7 @@ class YHFormItemExpireDateCell: UITableViewCell {
var isMust = false
var placeHolder:String? = "请选择"
var clickBlock:(()->Void)?
var clickBlock:((Bool)->Void)?
// 是否隐藏顶部分割线
var isHiddenTopLine:Bool = false {
didSet {
......@@ -185,11 +185,15 @@ class YHFormItemExpireDateCell: UITableViewCell {
func updateUI() {
detailLabel.isHidden = isLontTime
tipsLabel.isHidden = isLontTime
if isLontTime {
tipsLabel.isHidden = true
} else {
tipsLabel.isHidden = !isEmptyString(detail)
}
longTimeBtn.isSelected = isLontTime
longTimeBtn.snp.remakeConstraints { make in
make.size.equalTo(CGSizeMake(longTimeBtnWidth, 40))
make.centerY.equalToSuperview()
make.centerY.equalTo(titleLabel)
if isLontTime {
make.left.equalTo(detailLabel)
} else {
......@@ -200,11 +204,10 @@ class YHFormItemExpireDateCell: UITableViewCell {
@objc func didClickLongTimeBtn() {
longTimeBtn.isSelected = !longTimeBtn.isSelected
isLontTime = longTimeBtn.isSelected
isLontTime = !isLontTime
if let clickBlock = clickBlock {
clickBlock()
clickBlock(isLontTime)
}
}
}
......@@ -46,7 +46,7 @@ class YHFormItemInputTextCell: UITableViewCell {
var placeHolder:String? {
didSet {
if let placeHolder = placeHolder {
if let placeHolder = placeHolder, !placeHolder.isEmpty {
textField.attributedPlaceholder = NSAttributedString(string: placeHolder, attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor])
} else {
textField.attributedPlaceholder = NSAttributedString(string: "请输入", attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor])
......
......@@ -51,7 +51,7 @@ class YHFormItemSelectSheetCell: UITableViewCell {
detailLabel.text = detail
detailLabel.textColor = detailColor
} else {
detailLabel.text = placeHolder
detailLabel.text = isEmptyString(placeHolder) ? "请选择" : placeHolder
detailLabel.textColor = placeHolderColor
}
}
......
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