Commit 0b730193 authored by Steven杜宇's avatar Steven杜宇

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

parents fa8566ed 4e5e705c
...@@ -118,6 +118,8 @@ ...@@ -118,6 +118,8 @@
0430E67E2C75872E000511E2 /* YHAdopterOtherViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E67D2C75872E000511E2 /* YHAdopterOtherViewController.swift */; }; 0430E67E2C75872E000511E2 /* YHAdopterOtherViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E67D2C75872E000511E2 /* YHAdopterOtherViewController.swift */; };
0430E6802C75966D000511E2 /* YHAdopterCardExampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E67F2C75966D000511E2 /* YHAdopterCardExampleView.swift */; }; 0430E6802C75966D000511E2 /* YHAdopterCardExampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E67F2C75966D000511E2 /* YHAdopterCardExampleView.swift */; };
0430E6822C75E068000511E2 /* YHAdopterCardOtherGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6812C75E067000511E2 /* YHAdopterCardOtherGuideView.swift */; }; 0430E6822C75E068000511E2 /* YHAdopterCardOtherGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6812C75E067000511E2 /* YHAdopterCardOtherGuideView.swift */; };
0430E6842C76D702000511E2 /* YHAddpterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6832C76D702000511E2 /* YHAddpterViewModel.swift */; };
0430E6862C76DF6A000511E2 /* YHAdopterMainModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6852C76DF6A000511E2 /* YHAdopterMainModel.swift */; };
0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */; }; 0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */; };
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; }; 0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; };
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; }; 0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; };
...@@ -854,6 +856,8 @@ ...@@ -854,6 +856,8 @@
0430E67D2C75872E000511E2 /* YHAdopterOtherViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterOtherViewController.swift; sourceTree = "<group>"; }; 0430E67D2C75872E000511E2 /* YHAdopterOtherViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterOtherViewController.swift; sourceTree = "<group>"; };
0430E67F2C75966D000511E2 /* YHAdopterCardExampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterCardExampleView.swift; sourceTree = "<group>"; }; 0430E67F2C75966D000511E2 /* YHAdopterCardExampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterCardExampleView.swift; sourceTree = "<group>"; };
0430E6812C75E067000511E2 /* YHAdopterCardOtherGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterCardOtherGuideView.swift; sourceTree = "<group>"; }; 0430E6812C75E067000511E2 /* YHAdopterCardOtherGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterCardOtherGuideView.swift; sourceTree = "<group>"; };
0430E6832C76D702000511E2 /* YHAddpterViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAddpterViewModel.swift; sourceTree = "<group>"; };
0430E6852C76DF6A000511E2 /* YHAdopterMainModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterMainModel.swift; sourceTree = "<group>"; };
0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCommonAlertView.swift; sourceTree = "<group>"; }; 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCommonAlertView.swift; sourceTree = "<group>"; };
0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; }; 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; };
0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; }; 0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; };
...@@ -1742,6 +1746,7 @@ ...@@ -1742,6 +1746,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0430E65B2C744187000511E2 /* YHAdopterCardModel.swift */, 0430E65B2C744187000511E2 /* YHAdopterCardModel.swift */,
0430E6852C76DF6A000511E2 /* YHAdopterMainModel.swift */,
); );
path = M; path = M;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1795,6 +1800,7 @@ ...@@ -1795,6 +1800,7 @@
children = ( children = (
0430E6592C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift */, 0430E6592C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift */,
0430E6632C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift */, 0430E6632C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift */,
0430E6832C76D702000511E2 /* YHAddpterViewModel.swift */,
); );
path = VM; path = VM;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -4370,6 +4376,7 @@ ...@@ -4370,6 +4376,7 @@
A59B43C72C48F68200B28379 /* YHEvaluationView.swift in Sources */, A59B43C72C48F68200B28379 /* YHEvaluationView.swift in Sources */,
045EEF122B9F171A0022A143 /* YHCNIDCardModel.swift in Sources */, 045EEF122B9F171A0022A143 /* YHCNIDCardModel.swift in Sources */,
045EEF032B9F171A0022A143 /* YHFormItemDoubleChoiceCell.swift in Sources */, 045EEF032B9F171A0022A143 /* YHFormItemDoubleChoiceCell.swift in Sources */,
0430E6842C76D702000511E2 /* YHAddpterViewModel.swift in Sources */,
045EEEAE2B9F171A0022A143 /* YHWorkHighlightsTableViewCell.swift in Sources */, 045EEEAE2B9F171A0022A143 /* YHWorkHighlightsTableViewCell.swift in Sources */,
A567E59A2BD7643D00D5D5A0 /* YHHomeKingKongBlockModel.swift in Sources */, A567E59A2BD7643D00D5D5A0 /* YHHomeKingKongBlockModel.swift in Sources */,
045EEF062B9F171A0022A143 /* YHFormItemQuestionsCell.swift in Sources */, 045EEF062B9F171A0022A143 /* YHFormItemQuestionsCell.swift in Sources */,
...@@ -4458,6 +4465,7 @@ ...@@ -4458,6 +4465,7 @@
045EEEF72B9F171A0022A143 /* YHFormItemAddCell.swift in Sources */, 045EEEF72B9F171A0022A143 /* YHFormItemAddCell.swift in Sources */,
045EEEC82B9F171A0022A143 /* YHOtherSelecteItemView.swift in Sources */, 045EEEC82B9F171A0022A143 /* YHOtherSelecteItemView.swift in Sources */,
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */, 0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */,
0430E6862C76DF6A000511E2 /* YHAdopterMainModel.swift in Sources */,
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */, A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */,
045EEECF2B9F171A0022A143 /* YHScoreOptionsView.swift in Sources */, 045EEECF2B9F171A0022A143 /* YHScoreOptionsView.swift in Sources */,
04CE1AD22C2AD91F001CB80A /* YHActivityModel.swift in Sources */, 04CE1AD22C2AD91F001CB80A /* YHActivityModel.swift in Sources */,
......
...@@ -174,6 +174,7 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource { ...@@ -174,6 +174,7 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let model = self.viewModel.arrDataForSeviceCenterProgress[indexPath.section] let model = self.viewModel.arrDataForSeviceCenterProgress[indexPath.section]
let vc = YHAddAdoptersViewController() let vc = YHAddAdoptersViewController()
vc.orderId = orderID
navigationController?.pushViewController(vc) navigationController?.pushViewController(vc)
......
...@@ -12,6 +12,8 @@ class YHAddAdoptersViewController: YHBaseViewController { ...@@ -12,6 +12,8 @@ class YHAddAdoptersViewController: YHBaseViewController {
var tableView: UITableView! var tableView: UITableView!
var nextButton: UIButton! var nextButton: UIButton!
var clickIndex = -1 var clickIndex = -1
let viewModel = YHAddpterViewModel()
var orderId: Int = 0
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -23,6 +25,9 @@ class YHAddAdoptersViewController: YHBaseViewController { ...@@ -23,6 +25,9 @@ class YHAddAdoptersViewController: YHBaseViewController {
} }
func getData() { func getData() {
viewModel.getAddpterMainData(orderId: orderId) {[weak self] success, error in
guard let self = self else { return }
}
tableView.reloadData() tableView.reloadData()
let view = YHNoAdopterAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)) let view = YHNoAdopterAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
let window = UIApplication.shared.yhKeyWindow() let window = UIApplication.shared.yhKeyWindow()
......
//
// YHAdopterMainModel.swift
// galaxy
//
// Created by EDY on 2024/8/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
class YHAdopterMainModel: SmartCodable {
var order_id : Int = 0
var has_dependent : Int = 0 //是否有受养人
var spouse_name : String = "" //配偶姓名
var spouse_used_name : String = "" //配偶曾用名
var spouse_id : Int = 0
var has_spouse : Bool = false //是否有配偶
var has_deposit : Bool = false //是否有旅行证件
var dependent: [YHAdopterDependentModel] = [] // 受养人数组
var deposit: YHAdopterDepositModel = YHAdopterDepositModel()
required init() {
}
}
class YHAdopterDependentModel: SmartCodable {
var id : Int = 0
var order_sn : String = ""
var applicant_name : String = "" //姓名
var order_id : Int = 0
var dep_name : String = ""
var dep_nationality : Int = 0 // 受抚养人国籍0大陆1台湾2澳门3海外
var status : Int = 0 // 0待完善,1审核中,2已驳回,3已完成
var sync_status : Int = 0
var created_at : String = ""
var updated_at : String = ""
var deleted_at : String = ""
var has_spouse : Bool = false //是否有配偶
var sync_subset_id : Int = 0
required init() {
}
}
class YHAdopterDepositModel: SmartCodable {
var id : Int = 0
var order_id : String = ""
var user_id : Int = 0
var user_type : String = ""
var type : Int = 0
var issue_start : String = ""
var issue_end : String = ""
var img_front : String = ""
var img_back : String = ""
var other : String = ""
var status : Int = 0
var collect_status : Int = 0
var checked_user_id : Int = 0
var checked_at : String = ""
var commited_at : String = ""
var remark : String = ""
var created_at : String = ""
var updated_at : String = ""
var deleted_at : String = ""
var order_sn : String = ""
var urls: String = ""
required init() {
}
}
//
// YHAddpterViewModel.swift
// galaxy
//
// Created by EDY on 2024/8/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAddpterViewModel: YHBaseViewModel {
var model: YHAdopterMainModel?
func getAddpterMainData(orderId: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let params: [String: Any] = ["order_id": orderId]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Adopter.main
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 resultModel = YHAdopterMainModel.deserialize(dict: dic as? [AnyHashable : Any]) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false,err)
return
}
self.model = resultModel
callBackBlock(true,nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false,err)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
}
...@@ -446,4 +446,11 @@ class YHAllApiName { ...@@ -446,4 +446,11 @@ class YHAllApiName {
} }
// 新增受养人
struct Adopter {
// 新增受养人首页
static let main = "super-app/order/information/getDepList"
}
} }
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