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
8dc576d5
Commit
8dc576d5
authored
Feb 01, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
3257c54a
' into davidhuang
* commit '
3257c54a
': 解决冲突 主申请人 获取信息接口
parents
aa84852a
3257c54a
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
458 additions
and
13 deletions
+458
-13
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+16
-0
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+1
-1
YHMainApplicantInformationViewController.swift
...ormation/C/YHMainApplicantInformationViewController.swift
+12
-10
YHSelectCountryViewController.swift
...pplicantInformation/C/YHSelectCountryViewController.swift
+237
-0
YHCountryMessage.swift
...ess(流程)/MainApplicantInformation/M/YHCountryMessage.swift
+25
-0
YHItemModel.swift
...eProcess(流程)/MainApplicantInformation/M/YHItemModel.swift
+14
-1
YHMainInformationModel.swift
...)/MainApplicantInformation/M/YHMainInformationModel.swift
+64
-0
YHImagePickerView.swift
...ss(流程)/MainApplicantInformation/V/YHImagePickerView.swift
+0
-1
YHItemView.swift
...ceProcess(流程)/MainApplicantInformation/V/YHItemView.swift
+48
-0
YHMainApplicantInformationViewModel.swift
...tInformation/VM/YHMainApplicantInformationViewModel.swift
+0
-0
YHSelectCountryViewModel.swift
...ainApplicantInformation/VM/YHSelectCountryViewModel.swift
+41
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
8dc576d5
...
...
@@ -59,6 +59,10 @@
0468D47B2B68A08600CFB916
/* YHAddressPresentAnimated.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4752B68A08600CFB916
/* YHAddressPresentAnimated.swift */
;
};
0468D47C2B68A08600CFB916
/* YHAddressPickView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4762B68A08600CFB916
/* YHAddressPickView.swift */
;
};
0468D47E2B68CEA200CFB916
/* YHImagePickerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D47D2B68CEA200CFB916
/* YHImagePickerView.swift */
;
};
0468D4802B6914E600CFB916
/* YHSelectCountryViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D47F2B6914E600CFB916
/* YHSelectCountryViewController.swift */
;
};
0468D4822B6A2A8500CFB916
/* YHSelectCountryViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4812B6A2A8500CFB916
/* YHSelectCountryViewModel.swift */
;
};
0468D4842B6A2F0D00CFB916
/* YHCountryMessage.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4832B6A2F0D00CFB916
/* YHCountryMessage.swift */
;
};
0468D4862B6A41F300CFB916
/* YHMainInformationModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4852B6A41F300CFB916
/* YHMainInformationModel.swift */
;
};
04808C062B4686510056D53C
/* ATAuthSDK.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04808C042B4686510056D53C
/* ATAuthSDK.bundle */
;
};
04808C082B4686C10056D53C
/* ATAuthSDK_D.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04808C032B4686510056D53C
/* ATAuthSDK_D.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
049A48A82B49417300D0C641
/* YHAboutUsViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
049A48A72B49417300D0C641
/* YHAboutUsViewController.swift */
;
};
...
...
@@ -266,6 +270,10 @@
0468D4752B68A08600CFB916
/* YHAddressPresentAnimated.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAddressPresentAnimated.swift
;
sourceTree
=
"<group>"
;
};
0468D4762B68A08600CFB916
/* YHAddressPickView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAddressPickView.swift
;
sourceTree
=
"<group>"
;
};
0468D47D2B68CEA200CFB916
/* YHImagePickerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHImagePickerView.swift
;
sourceTree
=
"<group>"
;
};
0468D47F2B6914E600CFB916
/* YHSelectCountryViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSelectCountryViewController.swift
;
sourceTree
=
"<group>"
;
};
0468D4812B6A2A8500CFB916
/* YHSelectCountryViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSelectCountryViewModel.swift
;
sourceTree
=
"<group>"
;
};
0468D4832B6A2F0D00CFB916
/* YHCountryMessage.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCountryMessage.swift
;
sourceTree
=
"<group>"
;
};
0468D4852B6A41F300CFB916
/* YHMainInformationModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMainInformationModel.swift
;
sourceTree
=
"<group>"
;
};
04808C032B4686510056D53C
/* ATAuthSDK_D.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
ATAuthSDK_D.framework
;
sourceTree
=
"<group>"
;
};
04808C042B4686510056D53C
/* ATAuthSDK.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
path
=
ATAuthSDK.bundle
;
sourceTree
=
"<group>"
;
};
049A48A72B49417300D0C641
/* YHAboutUsViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAboutUsViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -543,6 +551,7 @@
isa
=
PBXGroup
;
children
=
(
0468D4422B61F76800CFB916
/* YHMainApplicantInformationViewController.swift */
,
0468D47F2B6914E600CFB916
/* YHSelectCountryViewController.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
...
...
@@ -551,6 +560,8 @@
isa
=
PBXGroup
;
children
=
(
0468D44A2B625AAB00CFB916
/* YHItemModel.swift */
,
0468D4832B6A2F0D00CFB916
/* YHCountryMessage.swift */
,
0468D4852B6A41F300CFB916
/* YHMainInformationModel.swift */
,
);
path
=
M
;
sourceTree
=
"<group>"
;
...
...
@@ -575,6 +586,7 @@
isa
=
PBXGroup
;
children
=
(
0468D44E2B634E8A00CFB916
/* YHMainApplicantInformationViewModel.swift */
,
0468D4812B6A2A8500CFB916
/* YHSelectCountryViewModel.swift */
,
);
path
=
VM
;
sourceTree
=
"<group>"
;
...
...
@@ -1306,11 +1318,14 @@
A5ACE9542B4564F7002C94D2
/* YHNavigationController.swift in Sources */
,
A5FD63DF2B6639AD00D1D9DA
/* YHScoreDataModel.swift in Sources */
,
A5ACE95E2B4571BF002C94D2
/* YHHomeViewController.swift in Sources */
,
0468D4842B6A2F0D00CFB916
/* YHCountryMessage.swift in Sources */
,
A5FD63BD2B623C2C00D1D9DA
/* YHInformationPerfectListVC.swift in Sources */
,
041B52932B5E6CBA007EBCEB
/* YHFormItemTitleCell.swift in Sources */
,
0468D4822B6A2A8500CFB916
/* YHSelectCountryViewModel.swift in Sources */
,
041B52952B5E7037007EBCEB
/* YHFormItemAddCell.swift in Sources */
,
A5ACE93D2B4564F7002C94D2
/* UIButton+Extension.swift in Sources */
,
041B528D2B5E58FA007EBCEB
/* YHFormItemDoubleChoiceCell.swift in Sources */
,
0468D4802B6914E600CFB916
/* YHSelectCountryViewController.swift in Sources */
,
A5ACE9292B4564F7002C94D2
/* YHSmsCodeInputView.swift in Sources */
,
A5ACE9452B4564F7002C94D2
/* YHHUDContainerView.swift in Sources */
,
A5ACE93A2B4564F7002C94D2
/* NSAttributedString+Extension.swift in Sources */
,
...
...
@@ -1371,6 +1386,7 @@
A5FD63D82B6603A500D1D9DA
/* YHScoreResultView.swift in Sources */
,
A5ACE9342B4564F7002C94D2
/* YHAllApiName.swift in Sources */
,
A5ACE9502B4564F7002C94D2
/* YhCacheTool.swift in Sources */
,
0468D4862B6A41F300CFB916
/* YHMainInformationModel.swift in Sources */
,
0468D4242B494BEA00CFB916
/* YHCodeResultViewController.swift in Sources */
,
A5FD63EA2B67D95100D1D9DA
/* YHFamilyMemberViewController.swift in Sources */
,
A5ACE93F2B4564F7002C94D2
/* UIViewController+Extension.swift in Sources */
,
...
...
galaxy/galaxy/AppDelegate.swift
View file @
8dc576d5
...
...
@@ -109,7 +109,7 @@ extension AppDelegate {
IQKeyboardManager
.
shared
.
enable
=
true
IQKeyboardManager
.
shared
.
enableAutoToolbar
=
true
IQKeyboardManager
.
shared
.
resignOnTouchOutside
=
true
//
控制点击背景是否收起键盘
IQKeyboardManager
.
shared
.
resignOnTouchOutside
=
true
//
控制点击背景是否收起键盘
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/C/YHMainApplicantInformationViewController.swift
View file @
8dc576d5
...
...
@@ -26,17 +26,19 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
}
func
getData
()
{
if
stepView
.
currentIndex
==
0
{
dataSource
=
viewModel
.
getBaseDataSource
()
}
else
if
stepView
.
currentIndex
==
1
{
dataSource
=
viewModel
.
getIDCardDataSource
()
}
else
if
stepView
.
currentIndex
==
2
{
dataSource
=
viewModel
.
getDocumentInformation
()
}
else
if
stepView
.
currentIndex
==
3
{
dataSource
=
viewModel
.
getDetailDataSource
()
viewModel
.
requestMainInformation
(
"133969"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
self
.
stepView
.
currentIndex
==
0
{
self
.
dataSource
=
self
.
viewModel
.
getBaseDataSource
()
}
else
if
self
.
stepView
.
currentIndex
==
1
{
self
.
dataSource
=
self
.
viewModel
.
getIDCardDataSource
()
}
else
if
self
.
stepView
.
currentIndex
==
2
{
self
.
dataSource
=
self
.
viewModel
.
getDocumentInformation
()
}
else
if
self
.
stepView
.
currentIndex
==
3
{
self
.
dataSource
=
self
.
viewModel
.
getDetailDataSource
()
}
self
.
tableView
.
reloadData
()
}
tableView
.
reloadData
()
}
func
setView
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/C/YHSelectCountryViewController.swift
0 → 100644
View file @
8dc576d5
//
// YHSelectCountryViewController.swift
// galaxy
//
// Created by EDY on 2024/1/30.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHSelectCountryViewController
:
YHBaseViewController
{
var
searchView
:
UITextField
!
var
flagLabel
:
UILabel
!
var
tableView
:
UITableView
!
var
collectionView
:
UICollectionView
!
var
hotDataSource
=
[
"中国-China"
,
"中国香港-Hong Kong"
,
"中国澳门-Macau"
,
"中国台湾-Taiwan"
,
"新加坡-Singapore"
,
"澳大利亚-Australia"
,
"美国-United States"
]
var
searchDataSource
:
[
YHCountryMessage
]?
var
viewModel
:
YHSelectCountryViewModel
?
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
gk_navTitle
=
"国家/地区"
viewModel
=
YHSelectCountryViewModel
()
setView
()
getData
()
}
func
getData
()
{
tableView
.
reloadData
()
}
func
setView
()
{
view
.
backgroundColor
=
.
white
searchView
=
{
let
searchBar
=
UITextField
()
searchBar
.
placeholder
=
"搜索国家/地区"
searchBar
.
backgroundColor
=
UIColor
(
hex
:
0xf8f9fb
)
searchBar
.
keyboardType
=
.
default
searchBar
.
delegate
=
self
searchBar
.
layer
.
cornerRadius
=
21
searchBar
.
leftView
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
16
,
height
:
42
))
searchBar
.
leftViewMode
=
.
always
return
searchBar
}()
view
.
addSubview
(
searchView
)
searchView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
16
)
make
.
height
.
equalTo
(
42
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
}
tableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
plain
)
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
tableView
.
backgroundColor
=
.
clear
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
cellWithClass
:
YHCountryTableViewCell
.
self
)
tableView
.
isHidden
=
true
return
tableView
}()
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
78
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
equalTo
(
view
)
}
flagLabel
=
{
let
label
=
UILabel
()
label
.
text
=
"热门国家/地区"
label
.
textColor
=
UIColor
(
hex
:
0x222222
)
label
.
font
=
kFont
(
size
:
14
)
return
label
}()
view
.
addSubview
(
flagLabel
)
flagLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
78
)
make
.
left
.
equalTo
(
21
)
make
.
height
.
equalTo
(
20
)
}
collectionView
=
{
let
layout
=
UICollectionViewFlowLayout
()
layout
.
minimumInteritemSpacing
=
12
// 设置水平间距
layout
.
minimumLineSpacing
=
16
// 设置垂直间距
layout
.
scrollDirection
=
.
vertical
// 初始化UICollectionView对象
let
collection
=
UICollectionView
(
frame
:
CGRect
.
zero
,
collectionViewLayout
:
layout
)
collection
.
dataSource
=
self
collection
.
delegate
=
self
// 注册自定义单元格类型
collection
.
register
(
cellWithClass
:
YHCountryCollectionViewCell
.
self
)
return
collection
}()
view
.
addSubview
(
collectionView
)
collectionView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
114
)
make
.
left
.
equalTo
(
21
)
make
.
right
.
equalTo
(
-
21
)
make
.
bottom
.
equalToSuperview
()
}
}
}
extension
YHSelectCountryViewController
:
UITextFieldDelegate
{
func
textFieldDidChangeSelection
(
_
textField
:
UITextField
)
{
if
textField
.
text
==
""
{
tableView
.
isHidden
=
true
flagLabel
.
isHidden
=
false
collectionView
.
isHidden
=
false
}
else
{
viewModel
?
.
requestCountry
(
textField
.
text
??
""
)
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
searchDataSource
=
success
as?
[
YHCountryMessage
]
self
.
tableView
.
isHidden
=
false
self
.
flagLabel
.
isHidden
=
true
self
.
collectionView
.
isHidden
=
true
self
.
tableView
.
reloadData
()
}
}
}
}
extension
YHSelectCountryViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
searchDataSource
?
.
count
??
0
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHCountryTableViewCell
.
self
)
let
cn
=
searchDataSource
?[
indexPath
.
row
]
.
name_cn
??
""
let
en
=
searchDataSource
?[
indexPath
.
row
]
.
name_en
??
""
cell
.
titleLabel
.
text
=
cn
+
en
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
44
}
}
extension
YHSelectCountryViewController
:
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
return
hotDataSource
.
count
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
collectionCell
=
collectionView
.
dequeueReusableCell
(
withClass
:
YHCountryCollectionViewCell
.
self
,
for
:
indexPath
)
collectionCell
.
label
.
text
=
hotDataSource
[
indexPath
.
row
]
return
collectionCell
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
sizeForItemAt
indexPath
:
IndexPath
)
->
CGSize
{
let
string
=
hotDataSource
[
indexPath
.
row
]
let
size
=
(
string
as
NSString
)
.
size
(
withAttributes
:
[
NSAttributedString
.
Key
.
font
:
kFont
(
size
:
13
)])
return
CGSize
(
width
:
size
.
width
+
25
,
height
:
32
)
// 这里可以根据需求设置不同的尺寸
}
}
class
YHCountryCollectionViewCell
:
UICollectionViewCell
{
var
label
:
UILabel
!
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
setUpView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setUpView
()
{
label
=
{
let
view
=
UILabel
()
view
.
textAlignment
=
.
center
view
.
font
=
kFont
(
size
:
13
)
view
.
textColor
=
UIColor
(
hex
:
0x222222
)
view
.
backgroundColor
=
UIColor
(
hex
:
0xf8f9fb
)
view
.
layer
.
masksToBounds
=
true
view
.
layer
.
cornerRadius
=
16
return
view
}()
contentView
.
addSubview
(
label
)
label
.
snp
.
makeConstraints
{
make
in
make
.
top
.
bottom
.
right
.
left
.
equalToSuperview
()
}
}
}
class
YHCountryTableViewCell
:
UITableViewCell
{
var
titleLabel
:
UILabel
!
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
// Initialization code
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
// Configure the view for the selected state
}
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
}
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
selectionStyle
=
.
none
setupUI
()
}
func
setupUI
()
{
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
kFont
(
size
:
13
)
label
.
textColor
=
UIColor
(
hex
:
0x222222
)
return
label
}()
contentView
.
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
22
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
20
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/M/YHCountryMessage.swift
0 → 100644
View file @
8dc576d5
//
// YHCountryModel.swift
// galaxy
//
// Created by EDY on 2024/1/31.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
Foundation
import
SmartCodable
struct
YHCountryMessage
:
SmartCodable
{
var
name_cn
:
String
?
var
name_en
:
String
?
var
code
:
String
?
init
(
name_cn
:
String
?
=
nil
,
name_en
:
String
?
=
nil
,
code
:
String
?
=
nil
)
{
self
.
name_cn
=
name_cn
self
.
name_en
=
name_en
self
.
code
=
code
}
init
()
{
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/M/YHItemModel.swift
View file @
8dc576d5
...
...
@@ -8,6 +8,17 @@
import
UIKit
enum
YHItemSelectType
:
Int
{
case
normal
=
0
case
address
=
1
case
time
=
2
case
image
=
3
case
id
=
4
case
country
=
5
case
sex
=
6
case
marry
=
7
}
struct
YHItemModel
{
var
isNeed
:
Bool
?
var
title
:
String
?
...
...
@@ -16,8 +27,9 @@ struct YHItemModel {
var
message
:
String
?
var
leftButtonString
:
String
?
var
rightButtonString
:
String
?
var
type
:
YHItemSelectType
?
init
(
isNeed
:
Bool
?
=
nil
,
title
:
String
?
=
nil
,
isUserKeyBoard
:
Bool
?
=
nil
,
prompts
:
String
?
=
nil
,
message
:
String
?
=
nil
,
leftButtonString
:
String
?
=
nil
,
rightButtonString
:
String
?
=
nil
)
{
init
(
isNeed
:
Bool
?
=
nil
,
title
:
String
?
=
nil
,
isUserKeyBoard
:
Bool
?
=
nil
,
prompts
:
String
?
=
nil
,
message
:
String
?
=
nil
,
leftButtonString
:
String
?
=
nil
,
rightButtonString
:
String
?
=
nil
,
type
:
YHItemSelectType
?
=
nil
)
{
self
.
isNeed
=
isNeed
self
.
title
=
title
self
.
isUserKeyBoard
=
isUserKeyBoard
...
...
@@ -25,6 +37,7 @@ struct YHItemModel {
self
.
message
=
message
self
.
leftButtonString
=
leftButtonString
self
.
rightButtonString
=
rightButtonString
self
.
type
=
type
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/M/YHMainInformationModel.swift
0 → 100644
View file @
8dc576d5
//
// YHMainInformationModel.swift
// galaxy
//
// Created by EDY on 2024/1/31.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
Foundation
import
SmartCodable
struct
YHMainInformationModel
:
SmartCodable
{
var
id
:
Int
?
var
order_id
:
String
?
var
nationality
:
String
?
var
is_handled
:
Int
?
var
username
:
String
?
var
used_name
:
String
?
var
birthday
:
String
?
var
age
:
String
?
var
birth_place_aboard
:
Int
?
var
sex
:
String
?
var
married
:
String
?
var
mobile
:
String
?
var
email
:
String
?
var
address_aboard
:
Int
?
var
has_hk_id
:
Int
?
var
hk_id_number
:
String
?
var
step
:
Int
?
var
surname
:
String
?
var
is_live_oversea_year
:
Int
?
var
username_pinyin
:
YHUserNameModel
?
var
birth_place
:
YHAddressModel
?
var
address
:
YHAddressModel
?
var
certificates
:
YHCertificatesModels
?
}
struct
YHUserNameModel
:
SmartCodable
{
var
family_name
:
String
?
var
given_name
:
String
?
}
struct
YHAddressModel
:
SmartCodable
{
var
area
:
[
String
]?
var
country
:
String
?
var
details
:
String
?
var
foreign
:
String
?
}
struct
YHCertificatesModels
:
SmartCodable
{
var
hk_macao_pass
:
YHCertificatesModel
?
var
passport
:
YHCertificatesModel
?
var
cn_identity_card
:
YHCertificatesModel
?
}
struct
YHCertificatesModel
:
SmartCodable
{
var
number
:
String
?
var
issue_at
:
String
?
var
issue_date_start_at
:
String
?
var
issue_date_end_at
:
String
?
var
img_front
:
String
?
var
img_back
:
String
?
var
passport_type
:
String
?
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/V/YHImagePickerView.swift
View file @
8dc576d5
...
...
@@ -199,7 +199,6 @@ extension YHImagePickerView: UINavigationControllerDelegate, UIImagePickerContro
func
imagePickerController
(
_
picker
:
UIImagePickerController
,
didFinishPickingMediaWithInfo
info
:
[
UIImagePickerController
.
InfoKey
:
Any
])
{
if
let
image
=
info
[
UIImagePickerController
.
InfoKey
.
originalImage
]
as?
UIImage
{
// 将图片显示给UIImageView
if
let
block
=
backImage
{
block
(
image
)
self
.
dismiss
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/V/YHItemView.swift
View file @
8dc576d5
...
...
@@ -9,6 +9,8 @@
import
UIKit
class
YHItemView
:
UIView
{
typealias
Block
=
(
_
model
:
YHItemModel
)
->
()
var
block
:
Block
?
var
titleLabel
:
UILabel
!
var
messageTextField
:
UITextField
!
var
nextStepImageView
:
UIImageView
!
...
...
@@ -45,6 +47,7 @@ class YHItemView: UIView {
messageTextField
=
{
let
textField
=
UITextField
()
textField
.
delegate
=
self
return
textField
}()
addSubview
(
messageTextField
)
...
...
@@ -67,6 +70,7 @@ class YHItemView: UIView {
centerButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
addTarget
(
self
,
action
:
#selector(
centerClick
)
,
for
:
.
touchUpInside
)
return
button
}()
addSubview
(
centerButton
)
...
...
@@ -84,6 +88,7 @@ class YHItemView: UIView {
button
.
layer
.
borderWidth
=
1
button
.
layer
.
borderColor
=
UIColor
(
hex
:
0x4487f9
)
.
cgColor
button
.
isSelected
=
true
button
.
addTarget
(
self
,
action
:
#selector(
rightClick
)
,
for
:
.
touchUpInside
)
return
button
}()
addSubview
(
rightButton
)
...
...
@@ -100,6 +105,7 @@ class YHItemView: UIView {
button
.
setTitleColor
(
UIColor
(
hex
:
0x4487f9
),
for
:
.
selected
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x222222
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
16
button
.
addTarget
(
self
,
action
:
#selector(
leftClick
)
,
for
:
.
touchUpInside
)
return
button
}()
addSubview
(
leftButton
)
...
...
@@ -147,6 +153,12 @@ class YHItemView: UIView {
leftButton
.
isHidden
=
false
leftButton
.
setTitle
(
dataSource
.
leftButtonString
,
for
:
.
normal
)
nextStepImageView
.
isHidden
=
true
messageTextField
.
isHidden
=
true
if
dataSource
.
message
==
"0"
{
rightClick
()
}
else
{
leftClick
()
}
}
else
{
leftButton
.
isHidden
=
true
}
...
...
@@ -155,8 +167,44 @@ class YHItemView: UIView {
rightButton
.
isHidden
=
false
rightButton
.
setTitle
(
dataSource
.
rightButtonString
,
for
:
.
normal
)
nextStepImageView
.
isHidden
=
true
messageTextField
.
isHidden
=
true
}
else
{
rightButton
.
isHidden
=
true
}
}
@objc
func
rightClick
()
{
rightButton
.
isSelected
=
true
leftButton
.
isSelected
=
false
rightButton
.
layer
.
borderWidth
=
1
rightButton
.
layer
.
borderColor
=
UIColor
(
hex
:
0x4487f9
)
.
cgColor
rightButton
.
backgroundColor
=
UIColor
(
hex
:
0x4487f9
)
.
withAlphaComponent
(
0.08
)
leftButton
.
backgroundColor
=
UIColor
(
hex
:
0xf8f9fb
)
leftButton
.
layer
.
borderWidth
=
0
dataSource
?
.
message
=
"0"
}
@objc
func
leftClick
()
{
leftButton
.
isSelected
=
true
rightButton
.
isSelected
=
false
leftButton
.
layer
.
borderWidth
=
1
leftButton
.
layer
.
borderColor
=
UIColor
(
hex
:
0x4487f9
)
.
cgColor
leftButton
.
backgroundColor
=
UIColor
(
hex
:
0x4487f9
)
.
withAlphaComponent
(
0.08
)
rightButton
.
backgroundColor
=
UIColor
(
hex
:
0xf8f9fb
)
rightButton
.
layer
.
borderWidth
=
0
dataSource
?
.
message
=
"1"
}
@objc
func
centerClick
()
{
}
}
extension
YHItemView
:
UITextFieldDelegate
{
func
textFieldDidEndEditing
(
_
textField
:
UITextField
)
{
dataSource
?
.
message
=
textField
.
text
if
let
block
=
block
{
block
(
dataSource
??
YHItemModel
())
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/VM/YHMainApplicantInformationViewModel.swift
View file @
8dc576d5
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/VM/YHSelectCountryViewModel.swift
0 → 100644
View file @
8dc576d5
//
// YHSelectCountryViewModel.swift
// galaxy
//
// Created by EDY on 2024/1/31.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHSelectCountryViewModel
:
NSObject
{
override
init
()
{
super
.
init
()
}
func
requestCountry
(
_
key
:
String
,
callBackBlock
:
@escaping
(
_
success
:
[
YHCountryMessage
?]?,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
"frontend/country?keyword=
\(
key
)
"
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
guard
let
model
=
NetBaseModel
.
deserialize
(
dict
:
json
)
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callBackBlock
([],
error
)
return
}
//// printLog("model 是 ==> \(model)")
let
dic
=
model
.
data
?
.
peel
guard
let
resultArray
=
[
YHCountryMessage
]
.
deserialize
(
array
:
dic
as?
[
Any
])
else
{
callBackBlock
([],
nil
)
return
}
callBackBlock
(
resultArray
,
nil
)
}
failBlock
:
{
err
in
callBackBlock
([],
err
)
}
}
}
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