Commit 97e80920 authored by David黄金龙's avatar David黄金龙

Merge commit 'c3021027' into davidhuang

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