Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
9bce29d0
Commit
9bce29d0
authored
Mar 01, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
e99d7f85
' into davidhuang
* commit '
e99d7f85
': 主申请人上传身份证逻辑 // 家庭成员 上传接口
parents
113055e0
e99d7f85
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
271 additions
and
11 deletions
+271
-11
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+8
-0
YHSpouseInfoContainerVC.swift
...ember(家庭成员信息表)/C/Spouse(配偶)/YHSpouseInfoContainerVC.swift
+1
-0
YHFamilyMemberInfoVC.swift
...ss(流程)/FamilyMember(家庭成员信息表)/C/YHFamilyMemberInfoVC.swift
+3
-1
YHFamilyInitialInfo.swift
...ess(流程)/FamilyMember(家庭成员信息表)/M/YHFamilyInitialInfo.swift
+1
-1
YHFamilyRequestViewModel.swift
...程)/FamilyMember(家庭成员信息表)/M/YHFamilyRequestViewModel.swift
+1
-1
YHFormPickerView.swift
...FamilyMember(家庭成员信息表)/V/PickerView/YHFormPickerView.swift
+8
-1
YHMainApplicantInformationViewController.swift
...(主申请人信息)/C/YHMainApplicantInformationViewController.swift
+6
-3
YHCNIDCardModel.swift
.../MainApplicantInformation(主申请人信息)/M/YHCNIDCardModel.swift
+21
-0
YHHKIDCardModel.swift
.../MainApplicantInformation(主申请人信息)/M/YHHKIDCardModel.swift
+20
-0
YHImagePickerView.swift
...ainApplicantInformation(主申请人信息)/V/YHImagePickerView.swift
+4
-1
YHMainInformationCardTableViewCell.swift
...mation(主申请人信息)/V/YHMainInformationCardTableViewCell.swift
+0
-0
YHMainApplicantInformationViewModel.swift
...tion(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
+157
-1
String+Extension.swift
galaxy/galaxy/Classes/Tools/Extention/String+Extension.swift
+13
-0
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+4
-0
YHNetRequest.swift
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
+2
-2
Contents.json
...iceCenter/主申请人/service_card_delete.imageset/Contents.json
+22
-0
service_card_delete@2x.png
...人/service_card_delete.imageset/service_card_delete@2x.png
+0
-0
service_card_delete@3x.png
...人/service_card_delete.imageset/service_card_delete@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
9bce29d0
...
...
@@ -8,6 +8,8 @@
/* Begin PBXBuildFile section */
04010B952B6A1DE90093F3BB
/* YHSaveAndSubmitView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04010B942B6A1DE90093F3BB
/* YHSaveAndSubmitView.swift */
;
};
040ED45F2B91711A005CA3F8
/* YHCNIDCardModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040ED45E2B91711A005CA3F8
/* YHCNIDCardModel.swift */
;
};
040ED4612B9173DE005CA3F8
/* YHHKIDCardModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040ED4602B9173DE005CA3F8
/* YHHKIDCardModel.swift */
;
};
0413A6D82B8C76290006D154
/* YHCertificateUploadVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0413A6D72B8C76290006D154
/* YHCertificateUploadVC.swift */
;
};
041B52872B5657B3007EBCEB
/* IMAppKey.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041B52862B5657B3007EBCEB
/* IMAppKey.swift */
;
};
041B528D2B5E58FA007EBCEB
/* YHFormItemDoubleChoiceCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041B528C2B5E58FA007EBCEB
/* YHFormItemDoubleChoiceCell.swift */
;
};
...
...
@@ -305,6 +307,8 @@
/* Begin PBXFileReference section */
04010B942B6A1DE90093F3BB
/* YHSaveAndSubmitView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSaveAndSubmitView.swift
;
sourceTree
=
"<group>"
;
};
040ED45E2B91711A005CA3F8
/* YHCNIDCardModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCNIDCardModel.swift
;
sourceTree
=
"<group>"
;
};
040ED4602B9173DE005CA3F8
/* YHHKIDCardModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKIDCardModel.swift
;
sourceTree
=
"<group>"
;
};
0413A6D72B8C76290006D154
/* YHCertificateUploadVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateUploadVC.swift
;
sourceTree
=
"<group>"
;
};
041B52862B5657B3007EBCEB
/* IMAppKey.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
IMAppKey.swift
;
sourceTree
=
"<group>"
;
};
041B528C2B5E58FA007EBCEB
/* YHFormItemDoubleChoiceCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHFormItemDoubleChoiceCell.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -938,6 +942,8 @@
04E86E402B8357EC00A35F4B
/* YHMainInformationModel.swift */
,
04E86E412B8357EC00A35F4B
/* YHCountryMessage.swift */
,
04E86E422B8357EC00A35F4B
/* YHItemModel.swift */
,
040ED45E2B91711A005CA3F8
/* YHCNIDCardModel.swift */
,
040ED4602B9173DE005CA3F8
/* YHHKIDCardModel.swift */
,
);
path
=
M
;
sourceTree
=
"<group>"
;
...
...
@@ -1912,6 +1918,7 @@
04E86E312B81EA1000A35F4B
/* YHWorkItemView.swift in Sources */
,
A5191F642B89E926001069F7
/* YHPreviewOtherInformationViewController.swift in Sources */
,
A5191F6A2B8B1888001069F7
/* YHPreviewInfoCertificateInformationItemsView.swift in Sources */
,
040ED45F2B91711A005CA3F8
/* YHCNIDCardModel.swift in Sources */
,
0468D4492B6258A900CFB916
/* YHItemView.swift in Sources */
,
041B528F2B5E620E007EBCEB
/* YHFormItemInputTextCell.swift in Sources */
,
04E86E612B85CAEA00A35F4B
/* YHWorkExampleModel.swift in Sources */
,
...
...
@@ -1940,6 +1947,7 @@
0468D42B2B55019900CFB916
/* YHAnalytics.swift in Sources */
,
A5ACE93C2B4564F7002C94D2
/* UIColor+Extension.swift in Sources */
,
04E86E4F2B8479B700A35F4B
/* YHWorkIntroductionItemView.swift in Sources */
,
040ED4612B9173DE005CA3F8
/* YHHKIDCardModel.swift in Sources */
,
044CC62D2B876C980083FF76
/* YHSheetPickerViewType.swift in Sources */
,
04E86E5B2B84BF2000A35F4B
/* YHWorkExampleTypeView.swift in Sources */
,
042FBBBD2B63519C00F9DE23
/* YHFormItemSelectSheetCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/C/Spouse(配偶)/YHSpouseInfoContainerVC.swift
View file @
9bce29d0
...
...
@@ -161,6 +161,7 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
guard
let
self
=
self
else
{
return
}
if
let
targetStep
=
getStepForArrayIndex
(
index
)
{
currentStep
=
targetStep
spouse
.
step
=
targetStep
}
print
(
"index:
\(
index
)
"
)
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/C/YHFamilyMemberInfoVC.swift
View file @
9bce29d0
...
...
@@ -336,6 +336,7 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
if
formItem
.
type
==
.
child
{
if
self
.
isChildsEditMode
==
.
canCancel
{
self
.
isChildsEditMode
=
.
canEdit
}
else
if
self
.
isChildsEditMode
==
.
canEdit
{
self
.
isChildsEditMode
=
.
canCancel
}
...
...
@@ -343,6 +344,7 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
if
formItem
.
type
==
.
brother
{
if
self
.
isBrothersEditMode
==
.
canCancel
{
self
.
isBrothersEditMode
=
.
canEdit
}
else
if
self
.
isBrothersEditMode
==
.
canEdit
{
self
.
isBrothersEditMode
=
.
canCancel
}
...
...
@@ -358,7 +360,7 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
let
detailItem
=
item
as!
YHFamilyMember
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHFormItemEnterDetailCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHFormItemEnterDetailCell
cell
.
title
=
detailItem
.
getTitle
()
cell
.
detailLabel
.
textColor
=
(
isNeedShowError
&&
detailItem
.
notFillNumber
>
0
?
.
failColor
:
.
labelTextColor2
)
cell
.
detailLabel
.
textColor
=
(
isNeedShowError
&&
detailItem
.
notFillNumber
!=
0
?
.
failColor
:
.
labelTextColor2
)
if
detailItem
.
notFillNumber
>
0
{
cell
.
detailLabel
.
text
=
String
(
format
:
"有%d项未填写"
.
local
,
detailItem
.
notFillNumber
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/M/YHFamilyInitialInfo.swift
View file @
9bce29d0
...
...
@@ -911,7 +911,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
var
finishFollow
:
Int
=
0
var
step
:
Int
=
0
var
isHandled
:
Int
=
0
var
notFillNumber
:
Int
=
0
var
notFillNumber
:
Int
=
-
1
var
certificates
:
YHCertificates
?
var
usedName
:
String
=
""
var
hkIdentityOther
:
String
=
""
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/M/YHFamilyRequestViewModel.swift
View file @
9bce29d0
...
...
@@ -45,7 +45,7 @@ class YHFamilyRequestViewModel {
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Family
.
familyInfoApi
let
strUrl
=
"http://192.168.34.187:8808/"
+
YHAllApiName
.
Family
.
familyInfoApi
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/V/PickerView/YHFormPickerView.swift
View file @
9bce29d0
...
...
@@ -464,7 +464,14 @@ extension YHFormPickerView {
func
getSubType
(
_
title
:
String
?)
->
YHFormPickerViewSubType
{
guard
let
title
=
title
else
{
return
.
none
}
guard
let
title
=
title
,
!
title
.
isEmpty
else
{
if
let
arr
=
dataDict
[
type
],
arr
.
count
>
0
{
let
item0
:
YHFormPickerViewItem
=
arr
[
0
]
return
item0
.
type
}
return
.
none
}
switch
type
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/C/YHMainApplicantInformationViewController.swift
View file @
9bce29d0
...
...
@@ -9,7 +9,6 @@
import
UIKit
class
YHMainApplicantInformationViewController
:
YHBaseViewController
{
var
stepView
:
YHStepView
!
var
bottomView
:
YHBottomNextView
!
var
tableView
:
UITableView
!
...
...
@@ -135,8 +134,12 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
stepView
.
currentIndex
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHMainInformationCardTableViewCell
.
self
)
cell
.
dataSource
=
dataSource
?[
indexPath
.
row
]
cell
.
type
=
YHCardType
(
rawValue
:
indexPath
.
row
)
cell
.
type
=
YHCardType
(
rawValue
:
indexPath
.
row
)
??
.
identity
cell
.
viewModel
=
viewModel
cell
.
informationBlock
=
{[
weak
self
]
type
,
image
,
isLeft
in
guard
let
self
=
self
else
{
return
}
}
return
cell
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHMainInformationTableViewCell
.
self
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/M/YHCNIDCardModel.swift
0 → 100644
View file @
9bce29d0
//
// YHCNIDCardModel.swift
// galaxy
//
// Created by EDY on 2024/3/1.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHCNIDCardModel
:
YHBaseModel
{
var
gender
:
String
=
""
var
address
:
String
=
""
var
card_num
:
String
=
""
var
issuing_authority
:
String
=
""
var
birth
:
String
=
""
var
term_begins
:
String
=
""
var
end_of_term
:
String
=
""
var
nationality
:
String
=
""
var
name
:
String
=
""
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/M/YHHKIDCardModel.swift
0 → 100644
View file @
9bce29d0
//
// YHHKIDCardModel.swift
// galaxy
//
// Created by EDY on 2024/3/1.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHHKIDCardModel
:
YHBaseModel
{
var
name
:
String
=
""
var
pingyin
:
String
=
""
var
birth
:
String
=
""
var
gender
:
String
=
""
var
term_begins
:
String
=
""
var
end_of_term
:
String
=
""
var
issuing_authority
:
String
=
""
var
card_num
:
String
=
""
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/V/YHImagePickerView.swift
View file @
9bce29d0
...
...
@@ -207,7 +207,10 @@ extension YHImagePickerView: UINavigationControllerDelegate, UIImagePickerContro
func
imagePickerController
(
_
picker
:
UIImagePickerController
,
didFinishPickingMediaWithInfo
info
:
[
UIImagePickerController
.
InfoKey
:
Any
])
{
if
let
image
=
info
[
UIImagePickerController
.
InfoKey
.
originalImage
]
as?
UIImage
{
uploadImage
(
image
:
image
)
self
.
dismiss
()
if
let
block
=
backImage
{
block
(
image
)
self
.
dismiss
()
}
}
else
{
printLog
(
"pick image wrong"
)
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/V/YHMainInformationCardTableViewCell.swift
View file @
9bce29d0
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
View file @
9bce29d0
...
...
@@ -8,6 +8,7 @@
import
UIKit
import
SmartCodable
import
Alamofire
enum
YHSaveType
:
Int
{
case
save
=
0
...
...
@@ -205,9 +206,80 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
}
}
func
updateModel
(
_
type
:
YHCardType
,
isFront
:
Bool
,
url
:
String
)
{
switch
type
{
case
.
identity
:
if
isFront
{
mainModel
.
certificates
.
cn_identity_card
.
img_front
=
url
}
else
{
mainModel
.
certificates
.
cn_identity_card
.
img_back
=
url
}
case
.
passport
:
if
isFront
{
mainModel
.
certificates
.
hk_macao_pass
.
img_front
=
url
}
else
{
mainModel
.
certificates
.
hk_macao_pass
.
img_back
=
url
}
}
}
func
updateModel
(
_
model
:
YHHKIDCardModel
)
{
if
model
.
name
.
count
!=
0
{
mainModel
.
username
=
model
.
name
}
if
model
.
birth
.
count
!=
0
{
mainModel
.
birthday
=
model
.
birth
.
toTimeString
()
}
if
model
.
gender
.
count
!=
0
{
if
model
.
gender
==
"女"
{
mainModel
.
sex
=
2
}
else
{
mainModel
.
sex
=
1
}
}
if
model
.
term_begins
.
count
!=
0
{
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_start_at
=
model
.
term_begins
.
toTimeString
()
}
if
model
.
end_of_term
.
count
!=
0
{
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_end_at
=
model
.
end_of_term
.
toTimeString
()
}
if
model
.
issuing_authority
.
count
!=
0
{
mainModel
.
certificates
.
hk_macao_pass
.
issue_at
=
model
.
issuing_authority
}
if
model
.
card_num
.
count
!=
0
{
mainModel
.
certificates
.
hk_macao_pass
.
number
=
model
.
card_num
}
}
func
updateModel
(
_
model
:
YHCNIDCardModel
)
{
if
model
.
name
.
count
!=
0
{
mainModel
.
username
=
model
.
name
}
if
model
.
birth
.
count
!=
0
{
mainModel
.
birthday
=
model
.
birth
.
toTimeString
()
}
if
model
.
gender
.
count
!=
0
{
if
model
.
gender
==
"女"
{
mainModel
.
sex
=
2
}
else
{
mainModel
.
sex
=
1
}
}
if
model
.
term_begins
.
count
!=
0
{
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_start_at
=
model
.
term_begins
.
toTimeString
()
}
if
model
.
end_of_term
.
count
!=
0
{
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_end_at
=
model
.
end_of_term
.
toTimeString
()
}
if
model
.
issuing_authority
.
count
!=
0
{
mainModel
.
certificates
.
hk_macao_pass
.
issue_at
=
model
.
issuing_authority
}
if
model
.
card_num
.
count
!=
0
{
mainModel
.
certificates
.
hk_macao_pass
.
number
=
model
.
card_num
}
}
func
requestMainInformation
(
_
orderID
:
String
,
callBackBlock
:
@escaping
(
_
success
:
YHMainInformationModel
?,
_
error
:
YHErrorModel
?)
->
())
{
// /infoflow/order-information/get_information?order_id=9402
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
OrderInformation
.
getInformation
+
"?order_id=
\(
orderID
)
"
// let strUrl = "http://192.168.25.48:18088/" + YHAllApiName.OrderInformation.getInformation + "?order_id=\(orderID)"
// let params: [String : Any] = ["order_id": orderID]
...
...
@@ -301,6 +373,90 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
}
}
// 上传方法
func
uploadImage
(
_
image
:
UIImage
,
callBackBlock
:
@escaping
(
_
success
:
String
?,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
"https://test-comserver.galaxy-immi.com/oss/upload/storage"
let
boundary
=
UUID
()
.
uuidString
let
headers
:
HTTPHeaders
=
[
"Content-type"
:
"multipart/form-data; boundary=
\(
boundary
)
"
,
"businessCode"
:
"4001001"
]
let
_
=
YHNetRequest
.
uplaodRequest
(
url
:
strUrl
,
headers
:
headers
,
image
:
image
)
{
[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
callBackBlock
(
json
.
data
as?
String
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
nil
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
nil
,
err
)
}
}
func
getPublicImageUrl
(
_
url
:
String
,
callBackBlock
:
@escaping
(
_
success
:
String
?,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
"https://test-comserver.galaxy-immi.com/oss/storage/convertToPublicURL"
+
"?fileUrl=
\(
url
)
"
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
callBackBlock
(
json
.
data
as?
String
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
nil
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
nil
,
err
)
}
}
func
requestCnIDCardMessage
(
_
url
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
OrderInformation
.
cnIdCard
let
params
:
[
String
:
Any
]
=
[
"url"
:
url
]
let
_
=
YHNetRequest
.
postRequest
(
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
=
YHCNIDCardModel
.
deserialize
(
from
:
dic
as?
Dictionary
)
else
{
callBackBlock
(
false
,
nil
)
return
}
self
.
updateModel
(
result
)
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
func
requestHkIDCardMessage
(
_
url
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
OrderInformation
.
hkIdCard
let
params
:
[
String
:
Any
]
=
[
"url"
:
url
]
let
_
=
YHNetRequest
.
postRequest
(
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
=
YHHKIDCardModel
.
deserialize
(
from
:
dic
as?
Dictionary
)
else
{
callBackBlock
(
false
,
nil
)
return
}
self
.
updateModel
(
result
)
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
func
isCanNext
(
_
step
:
Int
)
->
Bool
{
if
step
==
0
{
let
nationality
=
mainModel
.
nationality
...
...
galaxy/galaxy/Classes/Tools/Extention/String+Extension.swift
View file @
9bce29d0
...
...
@@ -144,6 +144,19 @@ extension String {
dateformatter
.
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
return
dateformatter
.
string
(
from
:
date
as
Date
)
}
func
toTimeString
()
->
String
{
let
formatter
=
DateFormatter
()
formatter
.
dateFormat
=
"yyyyMMdd"
// 设置输入的日期格式
if
let
date
=
formatter
.
date
(
from
:
self
)
{
let
newformatter
=
DateFormatter
()
newformatter
.
dateFormat
=
"yyyy-MM-dd"
// 设置输出的日期格式
let
formatterDateString
=
newformatter
.
string
(
from
:
date
)
return
formatterDateString
}
else
{
return
""
}
}
}
// MARK: - 正则获取http
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
9bce29d0
...
...
@@ -116,6 +116,10 @@ class YHAllApiName {
static
let
updateInformation
=
"infoflow/order-information/update_information"
// 主申请人国家信息
static
let
countryInformation
=
"infoflow/country"
// 主申请人中国
static
let
cnIdCard
=
"infoflow/order-information/get_id_card"
// 主申请人港澳通行证
static
let
hkIdCard
=
"infoflow/order-information/get_hk_macao_pass"
}
struct
WorkExperience
{
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
View file @
9bce29d0
...
...
@@ -174,13 +174,13 @@ class YHNetRequest: NSObject {
return
httpRequest
}
guard
let
imageData
=
image
.
jpegData
(
compressionQuality
:
1
)
else
{
return
httpRequest
}
var
multipartFormData
=
MultipartFormData
()
let
multipartFormData
=
MultipartFormData
()
// 将图片添加到multipartFormData中
multipartFormData
.
append
(
imageData
,
withName
:
"file"
,
fileName
:
"image.jpg"
,
mimeType
:
"image/jpeg"
)
// 发送POST请求
let
uploadRequest
=
AF
.
upload
(
multipartFormData
:
multipartFormData
,
to
:
"https://test-comserver.galaxy-immi.com/oss/upload/storage"
,
headers
:
headers
)
let
uploadRequest
=
AF
.
upload
(
multipartFormData
:
multipartFormData
,
to
:
self
.
url
!
,
headers
:
headers
)
uploadRequest
.
responseString
(
completionHandler
:
{
string
in
#if DEBUG
...
...
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主申请人/service_card_delete.imageset/Contents.json
0 → 100644
View file @
9bce29d0
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"service_card_delete@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"service_card_delete@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主申请人/service_card_delete.imageset/service_card_delete@2x.png
0 → 100644
View file @
9bce29d0
1.79 KB
galaxy/galaxy/Res/Assets.xcassets/ServiceCenter/主申请人/service_card_delete.imageset/service_card_delete@3x.png
0 → 100644
View file @
9bce29d0
2.49 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment