Commit 3f24a106 authored by David黄金龙's avatar David黄金龙

1、添加默认值函数

2、主申请人 婚姻状态  后端同学维护
parent c7be0525
......@@ -417,7 +417,7 @@ private extension YHPreviewViewModel {
var msg = YHConstantArrayData.getShowNameBy(indexStr: model.sex, type: .sex)
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "性别:", answer: msg)
msg = YHConstantArrayData.getShowNameBy(indexStr: model.married, type: .marry)
msg = model.married//后台 王辉维护这个字段 前端直接展示
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: msg)
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "手机号:", answer: model.mobile)
......
......@@ -40,6 +40,14 @@ extension String {
}
return nil
}
//判断字符串并返回默认值
func defaultStringIfEmpty(detaultValue : String = "-") -> String {
if self.isEmpty {
return detaultValue
}
return self
}
}
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