Commit 521aee86 authored by David黄金龙's avatar David黄金龙

处理 一处 数据转换的问题

parent 258fa7c7
......@@ -1006,9 +1006,9 @@ private extension YHPreviewViewModel {
let addationIndex = model.hasDegreeJson.count > 1 ? String(index + 1) : ""
let title = "学位证" + addationIndex + ":"
let tmp8 = YHPreviewQuestionAndAnswerModel(question: title, answer: item.degree)
let tmp8 = YHPreviewQuestionAndAnswerModel(question: title, answer: YHConstantArrayData.getShowNameBy(indexStr: item.degree, type: .degree))
arr.append(tmp8)
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "学位证颁发地区:", answer: item.address)
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "学位证颁发地区:", answer: YHConstantArrayData.getShowNameBy(indexStr: item.address, type: .degreeAddress))
arr.append(tmp9)
}
}
......
......@@ -31,6 +31,10 @@ enum YHOtherPickerViewType: Int {
case sex
// 婚姻状况
case marry
//学位
case degree
//学位地址
case degreeAddress
}
......@@ -323,7 +327,7 @@ class YHConstantArrayData {
]
]
//婚姻状态
static let arrMarry : [[String : String]] = [
["title": "已婚",
"id": "1"
......@@ -342,6 +346,28 @@ class YHConstantArrayData {
]
]
//学位
static let arrDegree = [
[
"id":"1",
"title" : "学士学位",
],
[
"id" : "2",
"title" : "硕士学位",
],
[
"id" : "3",
"title" : "博士学位",
],
]
//学位颁发地
static let arrDegreeAddress = [
[ "id": "0", "title": "国内(颁发)" ],
[ "id": "1", "title": "国外(颁发)" ],
]
//通过 id 获取 title
static func getShowNameBy(indexStr:String,type : YHOtherPickerViewType) -> String {
if indexStr.isEmpty {
......@@ -359,6 +385,10 @@ class YHConstantArrayData {
arrData = YHConstantArrayData.arrStructure
case .level:
arrData = YHConstantArrayData.arrLevel
case .degree:
arrData = YHConstantArrayData.arrDegree
case .degreeAddress:
arrData = YHConstantArrayData.arrDegreeAddress
default:
arrData = [[:]]
}
......
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