Commit 8d42113b authored by David黄金龙's avatar David黄金龙

证件上传 的 4个 接口

parent 02b8cd4a
......@@ -71,7 +71,7 @@
04256E162C75BD2700A37BA4 /* YHPayMemberSectionItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E092C75BD2400A37BA4 /* YHPayMemberSectionItem.swift */; };
04256E172C75BD2700A37BA4 /* YHVisaPaymentTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E0A2C75BD2400A37BA4 /* YHVisaPaymentTipsCell.swift */; };
04256E182C75BD2700A37BA4 /* YHVisaPayTypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E0B2C75BD2400A37BA4 /* YHVisaPayTypeCell.swift */; };
04256E192C75BD2700A37BA4 /* YHUploadCertificateViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E0D2C75BD2400A37BA4 /* YHUploadCertificateViewModel.swift */; };
04256E192C75BD2700A37BA4 /* YHVisaPaymentViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E0D2C75BD2400A37BA4 /* YHVisaPaymentViewModel.swift */; };
04256E1B2C75C60C00A37BA4 /* YHHKMemberModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E1A2C75C60C00A37BA4 /* YHHKMemberModel.swift */; };
04256E1D2C75C74200A37BA4 /* YHAppointHKResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E1C2C75C74200A37BA4 /* YHAppointHKResultModel.swift */; };
04256E1F2C7618A800A37BA4 /* YHAppointWarmTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04256E1E2C7618A800A37BA4 /* YHAppointWarmTipsCell.swift */; };
......@@ -694,6 +694,9 @@
A5DE0D3C2BB9016200976FE1 /* YHEmailInputAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5DE0D3B2BB9016200976FE1 /* YHEmailInputAlertView.swift */; };
A5DF3D462BF72BA1003D5F03 /* YHTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5DF3D452BF72BA0003D5F03 /* YHTestViewController.swift */; };
A5DF9C632C78733200CE48E6 /* YHHKLegaldaysModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5DF9C622C78733200CE48E6 /* YHHKLegaldaysModel.swift */; };
A5DF9C652C78B5A400CE48E6 /* YHUploadCertificateViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5DF9C642C78B5A400CE48E6 /* YHUploadCertificateViewModel.swift */; };
A5DF9C672C78B7E600CE48E6 /* YHUploadCertificateListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5DF9C662C78B7E600CE48E6 /* YHUploadCertificateListModel.swift */; };
A5DF9C692C78BE6000CE48E6 /* YHUploadCertificateDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5DF9C682C78BE6000CE48E6 /* YHUploadCertificateDetailModel.swift */; };
A5E69D512BA304D400411932 /* DIN Alternate Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A5E69D502BA304D400411932 /* DIN Alternate Bold.ttf */; };
A5EB6C6F2C69FB9A0081FB6C /* YHOfficalLetterListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EB6C672C69FB9A0081FB6C /* YHOfficalLetterListModel.swift */; };
A5EB6C702C69FB9A0081FB6C /* YHOfficialApprovalResultVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EB6C692C69FB9A0081FB6C /* YHOfficialApprovalResultVC.swift */; };
......@@ -825,7 +828,7 @@
04256E092C75BD2400A37BA4 /* YHPayMemberSectionItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPayMemberSectionItem.swift; sourceTree = "<group>"; };
04256E0A2C75BD2400A37BA4 /* YHVisaPaymentTipsCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHVisaPaymentTipsCell.swift; sourceTree = "<group>"; };
04256E0B2C75BD2400A37BA4 /* YHVisaPayTypeCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHVisaPayTypeCell.swift; sourceTree = "<group>"; };
04256E0D2C75BD2400A37BA4 /* YHUploadCertificateViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateViewModel.swift; sourceTree = "<group>"; };
04256E0D2C75BD2400A37BA4 /* YHVisaPaymentViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHVisaPaymentViewModel.swift; sourceTree = "<group>"; };
04256E1A2C75C60C00A37BA4 /* YHHKMemberModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKMemberModel.swift; sourceTree = "<group>"; };
04256E1C2C75C74200A37BA4 /* YHAppointHKResultModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppointHKResultModel.swift; sourceTree = "<group>"; };
04256E1E2C7618A800A37BA4 /* YHAppointWarmTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppointWarmTipsCell.swift; sourceTree = "<group>"; };
......@@ -1458,6 +1461,9 @@
A5DE0D3B2BB9016200976FE1 /* YHEmailInputAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEmailInputAlertView.swift; sourceTree = "<group>"; };
A5DF3D452BF72BA0003D5F03 /* YHTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTestViewController.swift; sourceTree = "<group>"; };
A5DF9C622C78733200CE48E6 /* YHHKLegaldaysModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKLegaldaysModel.swift; sourceTree = "<group>"; };
A5DF9C642C78B5A400CE48E6 /* YHUploadCertificateViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateViewModel.swift; sourceTree = "<group>"; };
A5DF9C662C78B7E600CE48E6 /* YHUploadCertificateListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateListModel.swift; sourceTree = "<group>"; };
A5DF9C682C78BE6000CE48E6 /* YHUploadCertificateDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadCertificateDetailModel.swift; sourceTree = "<group>"; };
A5E69D502BA304D400411932 /* DIN Alternate Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "DIN Alternate Bold.ttf"; sourceTree = "<group>"; };
A5EB6C672C69FB9A0081FB6C /* YHOfficalLetterListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHOfficalLetterListModel.swift; sourceTree = "<group>"; };
A5EB6C692C69FB9A0081FB6C /* YHOfficialApprovalResultVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHOfficialApprovalResultVC.swift; sourceTree = "<group>"; };
......@@ -1735,7 +1741,7 @@
04256E0E2C75BD2400A37BA4 /* VM */ = {
isa = PBXGroup;
children = (
04256E0D2C75BD2400A37BA4 /* YHUploadCertificateViewModel.swift */,
04256E0D2C75BD2400A37BA4 /* YHVisaPaymentViewModel.swift */,
);
path = VM;
sourceTree = "<group>";
......@@ -3799,6 +3805,7 @@
A5CA3F5D2C74D56E00EB22F5 /* VM */ = {
isa = PBXGroup;
children = (
A5DF9C642C78B5A400CE48E6 /* YHUploadCertificateViewModel.swift */,
);
path = VM;
sourceTree = "<group>";
......@@ -3806,6 +3813,8 @@
A5CA3F602C74D89500EB22F5 /* M */ = {
isa = PBXGroup;
children = (
A5DF9C662C78B7E600CE48E6 /* YHUploadCertificateListModel.swift */,
A5DF9C682C78BE6000CE48E6 /* YHUploadCertificateDetailModel.swift */,
);
path = M;
sourceTree = "<group>";
......@@ -4421,6 +4430,7 @@
A5FD45232C523DD300908AD9 /* YHJsApi.swift in Sources */,
04B360E32C60A346001EB053 /* YHPrinciplePhotoListCell.swift in Sources */,
04213B292C48EF5300797900 /* YHHomeInformationViewController.swift in Sources */,
A5DF9C692C78BE6000CE48E6 /* YHUploadCertificateDetailModel.swift in Sources */,
048B2A4D2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift in Sources */,
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */,
045EEECD2B9F171A0022A143 /* YHScoreDataModel.swift in Sources */,
......@@ -4471,7 +4481,7 @@
A5FF0F3C2C32F2460069852B /* YHActivityDetailCell1.swift in Sources */,
04256E1B2C75C60C00A37BA4 /* YHHKMemberModel.swift in Sources */,
045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */,
04256E192C75BD2700A37BA4 /* YHUploadCertificateViewModel.swift in Sources */,
04256E192C75BD2700A37BA4 /* YHVisaPaymentViewModel.swift in Sources */,
04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */,
04256DD02C7041C700A37BA4 /* YHInfoItemView.swift in Sources */,
A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */,
......@@ -4553,6 +4563,7 @@
A567E5A32BD7643D00D5D5A0 /* YHHomeBannerView.swift in Sources */,
A5ACE9402B4564F7002C94D2 /* String+Extension.swift in Sources */,
045EEEE42B9F171A0022A143 /* YHMySignatureDetailModel.swift in Sources */,
A5DF9C652C78B5A400CE48E6 /* YHUploadCertificateViewModel.swift in Sources */,
A5EB6C722C69FB9A0081FB6C /* YHOffivialApprovalGuildLineCheckView.swift in Sources */,
04256E272C77127600A37BA4 /* YHWaitAppointMembersCell.swift in Sources */,
047AA3D72C4A4399009C4554 /* YHInvitationWithGiftsShareView.swift in Sources */,
......@@ -4828,6 +4839,7 @@
0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */,
A5D335F92BCE51E700236F21 /* YHServiceCenterProgressModel.swift in Sources */,
045EEECC2B9F171A0022A143 /* YHScoreResultModel.swift in Sources */,
A5DF9C672C78B7E600CE48E6 /* YHUploadCertificateListModel.swift in Sources */,
045EEEDC2B9F171A0022A143 /* YHQualificationDetailVC.swift in Sources */,
045EEEF52B9F171A0022A143 /* YHSpouseInfoContainerVC.swift in Sources */,
047AA3F62C50E773009C4554 /* YHShareCashOutModel.swift in Sources */,
......
//
// YHUploadCertificateDetailModel.swift
// galaxy
//
// Created by davidhuangA on 2024/8/23.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
class YHUploadCertificateDetailModel: SmartCodable {
var id : Int = -1 //证件 id
var order_id : Int = -1 //订单 id
var apply_name : String = ""//申请人姓名
var image_url : String = ""//证件图片地址
var image_back_url : String = ""//证件背面图片地址
var start_time : String = "" //证件开始时间
var end_time : String = ""//证件结束时间
required init() {
}
}
//
// YHUploadCertificateListModel.swift
// galaxy
//
// Created by davidhuangA on 2024/8/23.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
class YHUploadCertificateListModel: SmartCodable {
var id_cards : [YHUploadCertificateModel] = []
var small_whites : [YHUploadCertificateModel] = []
required init() {
}
}
class YHUploadCertificateModel: SmartCodable {
var user_id : Int = -1 //用户 id
var order_id : Int = -1 //订单 id
var apply_name : String = "" //申请人姓名
var user_type : String = "" //用户类型 主申请人-applicant 配偶-spouse 孩子-child 母亲-mother 父亲-father 兄弟姐妹-brother
var status : Int = -1 //状态 1-已上传 2-未上传
required init() {
}
}
//
// YHUploadCertificateViewModel.swift
// galaxy
//
// Created by davidhuangA on 2024/8/23.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHUploadCertificateViewModel: YHBaseViewModel {
//列表信息
var uploadCertificateDataListModel : YHUploadCertificateListModel?
//证件详情
var certificateDetail : YHUploadCertificateDetailModel?
}
extension YHUploadCertificateViewModel {
//获取上传列表
func getUploadCertificateList(_ params: [String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.UploadCertificate.getDocListApi
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
let dic = json.data
guard let resultModel = YHUploadCertificateListModel.deserialize(dict: dic as? [AnyHashable : Any]) else {
callBackBlock(false,nil)
return
}
self.uploadCertificateDataListModel = 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)
}
}
//提交小白条
func submitSmallWhiteBar(_ params: [String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.UploadCertificate.submitSmallWhiteBarApi
let _ = YHNetRequest.postRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
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)
}
}
//提交身份证
func submitIDCardInfo(_ params: [String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.UploadCertificate.submitIdCardApi
let _ = YHNetRequest.postRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
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)
}
}
//过关证件详情
func getCertificateDetailInfo(_ params: [String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.UploadCertificate.getDocmentDetailApi
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
let dic = json.data
guard let resultModel = YHUploadCertificateDetailModel.deserialize(dict: dic as? [AnyHashable : Any]) else {
callBackBlock(false,nil)
return
}
self.certificateDetail = 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)
}
}
}
......@@ -8,7 +8,22 @@
class YHAllApiName {
//办证段 - 签证缴费
//办证段 - 7上传过关证件
struct UploadCertificate {
//GetDocumentsList 获取上传列表内容
static let getDocListApi = "super-app/order/customer/documents/list"
//SubmitDocumentSmallWhiteBar 提交小白条
static let submitSmallWhiteBarApi = "super-app/order/customer/documents/submit/small-white-bar"
//SubmitDocumentIDCard 提交身份证
static let submitIdCardApi = "super-app/order/customer/documents/submit/id-card"
//过关证件详情
static let getDocmentDetailApi = "super-app/order/customer/documents/detail"
}
//办证段 - 4签证缴费
struct VisaPayment {
//GetUserPaymentList 电子签证缴费列表
static let paymentListApi = "super-app/order/customer/service/payment"
......
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