Commit 3972805d authored by Steven杜宇's avatar Steven杜宇

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

parents 2a129cf6 3d4e60bd
......@@ -32,6 +32,9 @@ class YHMainInformationModel: YHBaseModel {
var birth_place: YHAddressModel = YHAddressModel()
var address: YHAddressModel = YHAddressModel()
var certificates: YHCertificatesModels = YHCertificatesModels()
var live_address: String = ""
var live_address_detail: String = ""
}
class YHUserNameModel: YHBaseModel {
......
......@@ -11,21 +11,16 @@ import UIKit
*家庭成员信息 预览
*/
class YHPreviewFamilyMemberViewController: YHPreviewBaseViewController {
var arrData : [YHPreviewInfoSessionModel] = [] //用于数据展示
var arrDataForParents : [YHPreviewInfoSessionModel] = []
var arrDataForSpouse : [YHPreviewInfoSessionModel] = []
var arrDataForChildren : [YHPreviewInfoSessionModel] = []
var arrDataForBrother : [YHPreviewInfoSessionModel] = []
private let previewVM : YHPreviewViewModel = YHPreviewViewModel()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
loadData()
}
private var buttonHoldView : UIView = {
let view = UIView()
// view.backgroundColor = .red
return view
}()
......@@ -39,9 +34,6 @@ class YHPreviewFamilyMemberViewController: YHPreviewBaseViewController {
private extension YHPreviewFamilyMemberViewController {
func setupUI() {
installData()
view.addSubview(buttonHoldView)
buttonHoldView.snp.makeConstraints { make in
make.top.equalToSuperview()
......@@ -50,9 +42,6 @@ private extension YHPreviewFamilyMemberViewController {
make.height.equalTo(56)
}
parentButton = createButton()
parentButton.setTitle("父母", for: .normal)
buttonHoldView.addSubview(parentButton)
......@@ -147,338 +136,35 @@ private extension YHPreviewFamilyMemberViewController {
sender.layoutIfNeeded()
if sender == parentButton {
arrData = arrDataForParents
previewVM.arrDataForMainApplicationInfo = previewVM.arrDataForParents
} else if sender == childrenButton {
arrData = arrDataForChildren
previewVM.arrDataForMainApplicationInfo = previewVM.arrDataForChildren
} else if sender == brotherButton {
arrData = arrDataForBrother
previewVM.arrDataForMainApplicationInfo = previewVM.arrDataForBrother
} else if sender == spouseButton {
arrData = arrDataForSpouse
previewVM.arrDataForMainApplicationInfo = previewVM.arrDataForSpouse
} else {
arrData = []
previewVM.arrDataForMainApplicationInfo = []
}
homeTableView.reloadData()
}
func installData() {
//父母
installDataForParents()
//配偶
installDataForSpouse()
//子女
installDataForChildren()
//兄弟姐妹
installDataForBrother()
}
//父母 数据
func installDataForParents() {
do {
//父亲信息-已故
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "父亲姓名:", answer: "父亲姓名父亲姓名:父亲姓名:父亲姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "是否已故:", answer: "是")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let arr = [tmp0,tmp1,tmp2,tmp3]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "父亲信息-已故", cellData0: arr)
arrDataForParents.append(model1)
}
do {
//母亲信息-已故
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "母亲信息:", answer: "父亲姓名父亲姓名:父亲姓名:父亲姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "是否已故:", answer: "是")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let arr = [tmp0,tmp1,tmp2,tmp3]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "母亲信息-已故", cellData0: arr)
arrDataForParents.append(model1)
}
do {
//父亲信息-健在
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "父亲姓名:", answer: "父亲姓名父亲姓名:父亲姓名:父亲姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "是否已故:", answer: "否")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "未婚")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: "在职")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "设计师")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "现居住国家/地区:", answer: "国内 吉林省/吉林市")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "国内 吉林省/吉林市")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "p102987(1)")
let arr = [tmp0,tmp1,tmp11,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "父亲信息-健在", cellData0: arr)
arrDataForParents.append(model1)
}
do {
//母亲信息-健在
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "母亲姓名:", answer: "母亲姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "是否已故:", answer: "否")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "未婚")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: "在职")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "设计师")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "现居住国家/地区:", answer: "国内 吉林省/吉林市")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "国内 吉林省/吉林市")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "p102987(1)")
let arr = [tmp0,tmp1,tmp11,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "母亲信息-健在", cellData0: arr)
arrDataForParents.append(model1)
}
arrData = arrDataForParents
}
//配偶 数据
func installDataForSpouse() {
do {
//随行信息-否
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "是否随行至香港:", answer: "否")
let arr = [tmp0]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "随行信息-否", cellData0: arr)
arrDataForSpouse.append(model1)
}
do {
//配偶信息-否
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "配偶姓名:", answer: "配偶姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: "曾用名:")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: "婚前姓氏:")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "否")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "否")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "否")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "否")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "配偶信息-否", cellData0: arr)
arrDataForSpouse.append(model1)
}
do {
//随行信息 - 是
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "是否随行至香港:", answer: "否")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "国家/国籍:", answer: "中国-China")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "港澳通行证:", answer: "未办理")
let arr = [tmp0,tmp1,tmp2]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "随行信息-否", cellData0: arr)
arrDataForSpouse.append(model1)
}
do {
//基本信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "配偶姓名:", answer: "DavidHuang")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: "--")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: "--")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: "职业")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "职业名称")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否拥有学位:", answer: "是否拥有学位")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "学位证:", answer: "学位证:")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "学位证颁发地区:", answer: "职业名称")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否和主申请人同住:", answer: "职业名称")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer: "职业名称")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "是否在海外居住满1年及以上:", answer: "职业名称")
let tmp13 = YHPreviewQuestionAndAnswerModel(question: "目前是否在港:", answer: "职业名称")
let tmp14 = YHPreviewQuestionAndAnswerModel(question: "获准逗留至:", answer: "职业名称")
let tmp15 = YHPreviewQuestionAndAnswerModel(question: "在港身份:", answer: "职业名称")
let tmp16 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "职业名称")
let tmp17 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "职业名称")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12,tmp13,tmp14,tmp15,tmp16,tmp17]
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "基本信息", cellData0: arr)
arrDataForSpouse.append(model2)
}
do {
//证件信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "中国身份证号码:", answer: "2203381990287633390")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3])
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: "c2345639")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model1 = YHPersonInfoCellModel1(cellTitle: "港澳通行证", cellData: [tmp4,tmp5,tmp6,tmp7])
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "证件类别:", answer: "护照")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "证件号码:", answer: "p2345639")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2028-07-31")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model2 = YHPersonInfoCellModel1(cellTitle: "护照及其他旅行证件", cellData: [tmp8,tmp9,tmp10,tmp11,tmp12])
let arr = [model0,model1,model2]
let model3 = YHPreviewInfoSessionModel(cellType: .idCardInfoType, cellTitle: "证件信息", cellData1: arr)
arrDataForSpouse.append(model3)
}
do {
//证件照片
let model1 = YHPersonInfoCellModel2(cellTitle: "中国身份证",frontUrl: "", backUrl: "", idType: 1)
let model2 = YHPersonInfoCellModel2(cellTitle: "港澳通行证",frontUrl: "", backUrl: "", idType: 2)
let arr = [model1,model2]
let model4 = YHPreviewInfoSessionModel(cellType: .idPictureType, cellTitle: "证件照片", cellData2: arr)
arrDataForSpouse.append(model4)
}
arrData = arrDataForSpouse
}
//子女 数据
func installDataForChildren() {
do {
//随行信息-否
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "该子女是否随行至香港:", answer: "否")
let arr = [tmp0]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "随行信息-否", cellData0: arr)
arrDataForChildren.append(model1)
}
do {
//子女信息-否
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "子女姓名:", answer: "子女姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: "曾用名:")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: "婚前姓氏:")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "性别:", answer: "性别")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "否")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "否")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "否")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "否")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "否")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "否")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "子女信息-否", cellData0: arr)
arrDataForChildren.append(model1)
}
do {
//随行信息 - 是
let tmp00 = YHPreviewQuestionAndAnswerModel(question: "主申请人或现配偶是否拥有孩子护养权:", answer: "否")
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "是否随行至香港:", answer: "否")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "国家/国籍:", answer: "中国-China")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "港澳通行证:", answer: "未办理")
let arr = [tmp00,tmp0,tmp1,tmp2]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "随行信息-是", cellData0: arr)
arrDataForChildren.append(model1)
}
do {
//基本信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "子女姓名:", answer: "子女姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: "--")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: "--")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp44 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "婚姻状况")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: "职业")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "职业名称")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否拥有学位:", answer: "是否拥有学位")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "学位证:", answer: "学位证:")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "学位证颁发地区:", answer: "职业名称")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否和主申请人同住:", answer: "职业名称")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer: "职业名称")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "是否在海外居住满1年及以上:", answer: "职业名称")
let tmp122 = YHPreviewQuestionAndAnswerModel(question: "是否为前次婚姻的子女:", answer: "是否为前次婚姻的子女")
let tmp13 = YHPreviewQuestionAndAnswerModel(question: "目前是否在港:", answer: "职业名称")
let tmp14 = YHPreviewQuestionAndAnswerModel(question: "获准逗留至:", answer: "职业名称")
let tmp15 = YHPreviewQuestionAndAnswerModel(question: "在港身份:", answer: "职业名称")
let tmp16 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "职业名称")
let tmp17 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "p102987(1)")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp44,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12,tmp122,tmp13,tmp14,tmp15,tmp16,tmp17]
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "基本信息", cellData0: arr)
arrDataForChildren.append(model2)
}
do {
//证件信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "中国身份证号码:", answer: "2203381990287633390")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3])
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: "c2345639")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model1 = YHPersonInfoCellModel1(cellTitle: "港澳通行证", cellData: [tmp4,tmp5,tmp6,tmp7])
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "证件类别:", answer: "护照")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "证件号码:", answer: "p2345639")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2028-07-31")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model2 = YHPersonInfoCellModel1(cellTitle: "护照及其他旅行证件", cellData: [tmp8,tmp9,tmp10,tmp11,tmp12])
let arr = [model0,model1,model2]
let model3 = YHPreviewInfoSessionModel(cellType: .idCardInfoType, cellTitle: "证件信息", cellData1: arr)
arrDataForChildren.append(model3)
}
do {
//证件照片
let model1 = YHPersonInfoCellModel2(cellTitle: "中国身份证",frontUrl: "", backUrl: "", idType: 1)
let model2 = YHPersonInfoCellModel2(cellTitle: "港澳通行证",frontUrl: "", backUrl: "", idType: 2)
let arr = [model1,model2]
let model4 = YHPreviewInfoSessionModel(cellType: .idPictureType, cellTitle: "证件照片", cellData2: arr)
arrDataForChildren.append(model4)
}
arrData = arrDataForChildren
}
//兄弟姐妹 数据
func installDataForBrother() {
do {
//兄弟姐妹信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "姓名:", answer: "姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "未婚")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: "在职")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "设计师")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "现居住国家/地区:", answer: "国内 吉林省/吉林市")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "国内 吉林省/吉林市")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "p102987(1)")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "兄弟姐妹信息", cellData0: arr)
arrDataForBrother.append(model1)
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
previewVM.getPreviewForFamilyInfo(params: ["order_id" : orderID]) { success, error in
if success == true {
} else {
}
self.homeTableView.reloadData()
return
}
} else {
printLog("error : orderID 为空")
}
arrData = arrDataForBrother
self.homeTableView.reloadData()
}
}
......@@ -487,13 +173,13 @@ private extension YHPreviewFamilyMemberViewController {
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHPreviewFamilyMemberViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return arrData.count
return previewVM.arrDataForMainApplicationInfo.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHPreviewInfoCell.self)
cell.selectionStyle = .none
cell.model = arrData[indexPath.row]
cell.model = previewVM.arrDataForMainApplicationInfo[indexPath.row]
return cell
}
}
......
......@@ -11,96 +11,35 @@ import UIKit
*主申请人信息 预览
*/
class YHPreviewMainApplicantInfoViewController: YHPreviewBaseViewController {
var arrData : [YHPreviewInfoSessionModel] = []
private let previewVM : YHPreviewViewModel = YHPreviewViewModel()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
loadData()
}
}
private extension YHPreviewMainApplicantInfoViewController {
func installData() {
do {
//国家信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "国家/国籍:", answer: "中国-China")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "港澳通行证:", answer: "未办理")
let arr = [tmp0,tmp1]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "国籍信息", cellData0: arr)
arrData.append(model1)
}
do {
//基本信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "主申请人:", answer: "DavidHuang")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: "--")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: "--")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "性别:", answer: "男")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "已婚")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "手机号:", answer: "13572984488")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "邮箱:", answer: "13572984488@nn.com")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer: "现居住地址:现居住地址:现居住地址:现居住地址:现居住地址:现居住地址:")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "详细地址:", answer: "锐度公园世家北区10-1-701锐度公园世家北区10-1-701")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "是")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "香港身份证:", answer: "否")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12]
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "基本信息", cellData0: arr)
arrData.append(model2)
}
do {
//证件信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "中国身份证号码:", answer: "2203381990287633390")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3])
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: "c2345639")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model1 = YHPersonInfoCellModel1(cellTitle: "港澳通行证", cellData: [tmp4,tmp5,tmp6,tmp7])
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "证件类别:", answer: "护照")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "证件号码:", answer: "p2345639")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2028-07-31")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model2 = YHPersonInfoCellModel1(cellTitle: "护照及其他旅行证件", cellData: [tmp8,tmp9,tmp10,tmp11,tmp12])
let arr = [model0,model1,model2]
let model3 = YHPreviewInfoSessionModel(cellType: .idCardInfoType, cellTitle: "证件信息", cellData1: arr)
arrData.append(model3)
}
do {
//证件照片
let model1 = YHPersonInfoCellModel2(cellTitle: "中国身份证",frontUrl: "", backUrl: "", idType: 1)
let model2 = YHPersonInfoCellModel2(cellTitle: "港澳通行证",frontUrl: "", backUrl: "", idType: 2)
let arr = [model1,model2]
let model4 = YHPreviewInfoSessionModel(cellType: .idPictureType, cellTitle: "证件照片", cellData2: arr)
arrData.append(model4)
}
}
func setupUI() {
installData()
self.homeTableView.register(YHPreviewInfoCell.self,forCellReuseIdentifier: YHPreviewInfoCell.cellReuseIdentifier)
self.homeTableView.reloadData()
}
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
previewVM.getPreviewForMainApplicationInfo(params: ["order_id" : orderID]) { success, error in
if success == true {
} else {
}
self.homeTableView.reloadData()
}
} else {
printLog("error : orderID 为空")
}
}
}
......@@ -108,13 +47,13 @@ private extension YHPreviewMainApplicantInfoViewController {
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHPreviewMainApplicantInfoViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return arrData.count
return previewVM.arrDataForMainApplicationInfo.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHPreviewInfoCell.self)
cell.selectionStyle = .none
cell.model = arrData[indexPath.row]
cell.model = previewVM.arrDataForMainApplicationInfo[indexPath.row]
return cell
}
}
......@@ -9,6 +9,19 @@
import UIKit
class YHPreviewViewModel: YHBaseViewModel {
//家庭成员信息 预览
var familyInfoPreviewModel : YHFamilyMemberGroupInfo?
var arrDataForFamilyInfo : [YHPreviewInfoSessionModel] = [] //用于展示
var arrDataForParents : [YHPreviewInfoSessionModel] = []//父亲
var arrDataForSpouse : [YHPreviewInfoSessionModel] = []//配偶
var arrDataForChildren : [YHPreviewInfoSessionModel] = []//子女
var arrDataForBrother : [YHPreviewInfoSessionModel] = []//兄弟姐妹
//主申请人信息 预览 - 未完成
var mainApplicationInfoPreviewModel : YHMainInformationModel?
var arrDataForMainApplicationInfo : [YHPreviewInfoSessionModel] = []
//其他信息 预览
private var otherInfoPreviewModel : YHPreviewForOtherInfoModel?
var arrDataForOtherInfo : [YHPreviewInfoSessionModel] = []
......@@ -19,10 +32,65 @@ class YHPreviewViewModel: YHBaseViewModel {
}
extension YHPreviewViewModel {
//获取家庭成员 预览数据
func getPreviewForFamilyInfo(params:[String:Any], callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Preview.previewFamilyInfoApi
let _ = YHNetRequest.getRequest(url: strUrl, params:params) {[weak self] json, code in
YHHUD.hide()
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
let dic = json.data as? [AnyHashable : Any]
guard let resultModel = YHFamilyMemberGroupInfo.deserialize(dict: dic) else {
let error = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false,error)
return
}
familyInfoPreviewModel = resultModel
installDataForFamilyInfo()
callBackBlock(true,nil)
} else {
let error = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(false,error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
//获取主申请人 预览数据
func getPreviewForMainApplicationInfo( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Preview.previewMainApplicationInfoApi
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
let dic = json.data
guard let result = YHMainInformationModel.deserialize(from: dic as? Dictionary) else {
callBackBlock(false,nil)
return
}
self.mainApplicationInfoPreviewModel = result
installDataForMainApplicationInfo()
callBackBlock(true, nil)
} else {
installDataForMainApplicationInfo() //for test hjl
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
self.installDataForMainApplicationInfo()//for test hjl
callBackBlock(false,err)
}
}
//获取基本资料预览 数据
func getPreviewForBasicInfo( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Basics.basicInfoApi
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Preview.previewBasicInfoApi
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
......@@ -53,8 +121,8 @@ extension YHPreviewViewModel {
//获取其他信息预览 数据
func getPreviewForOtherInfo( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Preview.PreviewOtherInfoApi
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Preview.previewOtherInfoApi
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
......@@ -84,6 +152,84 @@ extension YHPreviewViewModel {
}
private extension YHPreviewViewModel {
//组装 主申请人预览 数据
func installDataForMainApplicationInfo() {
guard let model = mainApplicationInfoPreviewModel else { return }
do {
//国家信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "国家/国籍:", answer: model.nationality)
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "港澳通行证:", answer: model.is_handled == 0 ? "未办理" : "已办理")
let arr = [tmp0,tmp1]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "国籍信息", cellData0: arr)
arrDataForMainApplicationInfo.append(model1)
}
do {
//基本信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "主申请人:", answer: model.username)
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: model.used_name)
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: model.surname)
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: model.birthday)
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: model.birth_place.area.description) //mainData.birth_place for test hjl todo
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "性别:", answer: model.sex.description)//mainData.birth_place for test hjl todo
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: model.married.description)//for test hjl todo
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "手机号:", answer: model.mobile)
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "邮箱:", answer: model.email)
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer:model.live_address)
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "详细地址:", answer: model.live_address_detail)
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "是")//model.hk_id.has //for test hjl todo
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "香港身份证:", answer: "-")//model.hk_id.number //for test hjl todo
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12]
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "基本信息", cellData0: arr)
arrDataForMainApplicationInfo.append(model2)
}
do {
//证件信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "中国身份证号码:", answer: "2203381990287633390")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3])
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: "c2345639")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model1 = YHPersonInfoCellModel1(cellTitle: "港澳通行证", cellData: [tmp4,tmp5,tmp6,tmp7])
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "证件类别:", answer: "护照")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "证件号码:", answer: "p2345639")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2028-07-31")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model2 = YHPersonInfoCellModel1(cellTitle: "护照及其他旅行证件", cellData: [tmp8,tmp9,tmp10,tmp11,tmp12])
let arr = [model0,model1,model2]
let model3 = YHPreviewInfoSessionModel(cellType: .idCardInfoType, cellTitle: "证件信息", cellData1: arr)
arrDataForMainApplicationInfo.append(model3)
}
do {
//证件照片
let model1 = YHPersonInfoCellModel2(cellTitle: "中国身份证",frontUrl: "", backUrl: "", idType: 1)
let model2 = YHPersonInfoCellModel2(cellTitle: "港澳通行证",frontUrl: "", backUrl: "", idType: 2)
let arr = [model1,model2]
let model4 = YHPreviewInfoSessionModel(cellType: .idPictureType, cellTitle: "证件照片", cellData2: arr)
arrDataForMainApplicationInfo.append(model4)
}
}
//组装 基本资料预览 数据
func installDataForBasicInfo() {
do {
......@@ -120,8 +266,6 @@ private extension YHPreviewViewModel {
do {
//子女-1
//子女 - xxx
if let arrChild = basiceInfoPreviewModel?.child {
for (index,model) in arrChild.enumerated() {
......@@ -279,3 +423,390 @@ private extension YHPreviewViewModel {
}
}
}
private extension YHPreviewViewModel {
func installDataForFamilyInfo() {
//父母
installDataForParents()
// return
//配偶
installDataForSpouse()
//子女
installDataForChildren()
//兄弟姐妹
installDataForBrother()
}
//父母 数据
func installDataForParents() {
do {
if let model = familyInfoPreviewModel?.father {
if model.deceased == 0 {
//父亲信息-健在
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "父亲姓名:", answer: model.subsetName)
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "是否已故:", answer: "否")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: model.birthday)
var city = ""
if model.birthPlaceAboard == 0 {
//国内
if model.birthPlace.area.count > 1 {
city = "国内 " + model.birthPlace.area[0] + "/" + model.birthPlace.area[1]
} else {
city = "国内 --"
}
} else {
//国外
city = "国外 " + model.birthPlace.foreign
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: city)
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: model.married)
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: model.occupation)
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: model.occupationName)
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "现居住国家/地区:", answer: model.liveCountry)
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: model.hkIdentityCard == nil ? "否" : "是")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: model.hkIdentityCard ?? "--")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp11,tmp4,tmp5,tmp6,tmp7,tmp8]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "父亲信息", cellData0: arr)
arrDataForParents.append(model1)
} else {
//父亲信息-已故
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "父亲姓名:", answer: model.subsetName)
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "是否已故:", answer: "是")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: model.birthday)
var city = ""
if model.birthPlaceAboard == 0 {
//国内
if model.birthPlace.area.count > 1 {
city = "国内 " + model.birthPlace.area[0] + "/" + model.birthPlace.area[1]
} else {
city = "国内 --"
}
} else {
//国外
city = "国外 " + model.birthPlace.foreign
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: city)
let arr = [tmp0,tmp1,tmp2,tmp3]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "父亲信息", cellData0: arr)
arrDataForParents.append(model1)
}
} else {
printLog("error:父亲数据不存在")
}
}
do {
if let model = familyInfoPreviewModel?.mother {
if model.deceased == 0 {
//母亲信息-健在
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "母亲姓名:", answer: model.subsetName)
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "是否已故:", answer: "否")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: model.birthday)
var city = ""
if model.birthPlaceAboard == 0 {
//国内
if model.birthPlace.area.count > 1 {
city = "国内 " + model.birthPlace.area[0] + "/" + model.birthPlace.area[1]
} else {
city = "国内 --"
}
} else {
//国外
city = "国外 " + model.birthPlace.foreign
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: city)
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: model.married)
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: model.occupation)
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: model.occupationName)
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "现居住国家/地区:", answer: model.liveCountry)
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: model.hkIdentityCard == nil ? "否" : "是")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: model.hkIdentityCard ?? "--")
let arr = [tmp0,tmp1,tmp11,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "母亲信息-健在", cellData0: arr)
arrDataForParents.append(model1)
} else {
//母亲信息-已故
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "母亲信息:", answer: model.subsetName)
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "是否已故:", answer: "是")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: model.birthday)
var city = ""
if model.birthPlaceAboard == 0 {
//国内
if model.birthPlace.area.count > 1 {
city = "国内 " + model.birthPlace.area[0] + "/" + model.birthPlace.area[1]
} else {
city = "国内 --"
}
} else {
//国外
city = "国外 " + model.birthPlace.foreign
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: city)
let arr = [tmp0,tmp1,tmp2,tmp3]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "母亲信息-已故", cellData0: arr)
arrDataForParents.append(model1)
}
} else {
printLog("error:母亲数据不存在")
}
}
arrDataForFamilyInfo = arrDataForParents
}
//配偶 数据
func installDataForSpouse() {
do {
//随行信息-否
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "是否随行至香港:", answer: "否")
let arr = [tmp0]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "随行信息-否", cellData0: arr)
arrDataForSpouse.append(model1)
}
do {
//配偶信息-否
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "配偶姓名:", answer: "配偶姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: "曾用名:")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: "婚前姓氏:")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "否")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "否")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "否")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "否")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "配偶信息-否", cellData0: arr)
arrDataForSpouse.append(model1)
}
do {
//随行信息 - 是
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "是否随行至香港:", answer: "否")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "国家/国籍:", answer: "中国-China")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "港澳通行证:", answer: "未办理")
let arr = [tmp0,tmp1,tmp2]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "随行信息-否", cellData0: arr)
arrDataForSpouse.append(model1)
}
do {
//基本信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "配偶姓名:", answer: "DavidHuang")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: "--")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: "--")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: "职业")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "职业名称")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否拥有学位:", answer: "是否拥有学位")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "学位证:", answer: "学位证:")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "学位证颁发地区:", answer: "职业名称")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否和主申请人同住:", answer: "职业名称")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer: "职业名称")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "是否在海外居住满1年及以上:", answer: "职业名称")
let tmp13 = YHPreviewQuestionAndAnswerModel(question: "目前是否在港:", answer: "职业名称")
let tmp14 = YHPreviewQuestionAndAnswerModel(question: "获准逗留至:", answer: "职业名称")
let tmp15 = YHPreviewQuestionAndAnswerModel(question: "在港身份:", answer: "职业名称")
let tmp16 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "职业名称")
let tmp17 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "职业名称")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12,tmp13,tmp14,tmp15,tmp16,tmp17]
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "基本信息", cellData0: arr)
arrDataForSpouse.append(model2)
}
do {
//证件信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "中国身份证号码:", answer: "2203381990287633390")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3])
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: "c2345639")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model1 = YHPersonInfoCellModel1(cellTitle: "港澳通行证", cellData: [tmp4,tmp5,tmp6,tmp7])
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "证件类别:", answer: "护照")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "证件号码:", answer: "p2345639")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2028-07-31")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model2 = YHPersonInfoCellModel1(cellTitle: "护照及其他旅行证件", cellData: [tmp8,tmp9,tmp10,tmp11,tmp12])
let arr = [model0,model1,model2]
let model3 = YHPreviewInfoSessionModel(cellType: .idCardInfoType, cellTitle: "证件信息", cellData1: arr)
arrDataForSpouse.append(model3)
}
do {
//证件照片
let model1 = YHPersonInfoCellModel2(cellTitle: "中国身份证",frontUrl: "", backUrl: "", idType: 1)
let model2 = YHPersonInfoCellModel2(cellTitle: "港澳通行证",frontUrl: "", backUrl: "", idType: 2)
let arr = [model1,model2]
let model4 = YHPreviewInfoSessionModel(cellType: .idPictureType, cellTitle: "证件照片", cellData2: arr)
arrDataForSpouse.append(model4)
}
arrDataForFamilyInfo = arrDataForSpouse
}
//子女 数据
func installDataForChildren() {
do {
//随行信息-否
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "该子女是否随行至香港:", answer: "否")
let arr = [tmp0]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "随行信息-否", cellData0: arr)
arrDataForChildren.append(model1)
}
do {
//子女信息-否
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "子女姓名:", answer: "子女姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: "曾用名:")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: "婚前姓氏:")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "性别:", answer: "性别")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "否")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "否")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "否")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "否")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "否")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "否")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "子女信息-否", cellData0: arr)
arrDataForChildren.append(model1)
}
do {
//随行信息 - 是
let tmp00 = YHPreviewQuestionAndAnswerModel(question: "主申请人或现配偶是否拥有孩子护养权:", answer: "否")
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "是否随行至香港:", answer: "否")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "国家/国籍:", answer: "中国-China")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "港澳通行证:", answer: "未办理")
let arr = [tmp00,tmp0,tmp1,tmp2]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "随行信息-是", cellData0: arr)
arrDataForChildren.append(model1)
}
do {
//基本信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "子女姓名:", answer: "子女姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: "--")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: "--")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp44 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "婚姻状况")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: "职业")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "职业名称")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否拥有学位:", answer: "是否拥有学位")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "学位证:", answer: "学位证:")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "学位证颁发地区:", answer: "职业名称")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否和主申请人同住:", answer: "职业名称")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer: "职业名称")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "是否在海外居住满1年及以上:", answer: "职业名称")
let tmp122 = YHPreviewQuestionAndAnswerModel(question: "是否为前次婚姻的子女:", answer: "是否为前次婚姻的子女")
let tmp13 = YHPreviewQuestionAndAnswerModel(question: "目前是否在港:", answer: "职业名称")
let tmp14 = YHPreviewQuestionAndAnswerModel(question: "获准逗留至:", answer: "职业名称")
let tmp15 = YHPreviewQuestionAndAnswerModel(question: "在港身份:", answer: "职业名称")
let tmp16 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "职业名称")
let tmp17 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "p102987(1)")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp44,tmp5,tmp6,tmp7,tmp8,tmp9,tmp10,tmp11,tmp12,tmp122,tmp13,tmp14,tmp15,tmp16,tmp17]
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "基本信息", cellData0: arr)
arrDataForChildren.append(model2)
}
do {
//证件信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "中国身份证号码:", answer: "2203381990287633390")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3])
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: "c2345639")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2018-07-17")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model1 = YHPersonInfoCellModel1(cellTitle: "港澳通行证", cellData: [tmp4,tmp5,tmp6,tmp7])
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "证件类别:", answer: "护照")
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "证件号码:", answer: "p2345639")
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: "北京市分局")
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: "2028-07-31")
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: "2028-07-31")
let model2 = YHPersonInfoCellModel1(cellTitle: "护照及其他旅行证件", cellData: [tmp8,tmp9,tmp10,tmp11,tmp12])
let arr = [model0,model1,model2]
let model3 = YHPreviewInfoSessionModel(cellType: .idCardInfoType, cellTitle: "证件信息", cellData1: arr)
arrDataForChildren.append(model3)
}
do {
//证件照片
let model1 = YHPersonInfoCellModel2(cellTitle: "中国身份证",frontUrl: "", backUrl: "", idType: 1)
let model2 = YHPersonInfoCellModel2(cellTitle: "港澳通行证",frontUrl: "", backUrl: "", idType: 2)
let arr = [model1,model2]
let model4 = YHPreviewInfoSessionModel(cellType: .idPictureType, cellTitle: "证件照片", cellData2: arr)
arrDataForChildren.append(model4)
}
arrDataForFamilyInfo = arrDataForChildren
}
//兄弟姐妹 数据
func installDataForBrother() {
do {
//兄弟姐妹信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "姓名:", answer: "姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "未婚")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: "在职")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "设计师")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "现居住国家/地区:", answer: "国内 吉林省/吉林市")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "国内 吉林省/吉林市")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "p102987(1)")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "兄弟姐妹信息", cellData0: arr)
arrDataForBrother.append(model1)
}
arrDataForFamilyInfo = arrDataForBrother
}
}
......@@ -154,8 +154,15 @@ class YHAllApiName {
}
//预览相关接口
struct Preview {
static let PreviewOtherInfoApi = "infoflow/residence/preview"
//其他信息
static let previewOtherInfoApi = "infoflow/residence/preview"
//基本资料
static let previewBasicInfoApi = "infoflow/basics/get_basics"
//主申请人信息
static let previewMainApplicationInfoApi = "infoflow/order-information/get_information"
//家庭成员信息
static let previewFamilyInfoApi = "infoflow/information/family"
}
}
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