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
52312b82
Commit
52312b82
authored
Jan 29, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基本信息UI
parent
a6cba741
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
532 additions
and
12 deletions
+532
-12
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+20
-0
YHMainApplicantInformationViewController.swift
...ormation/C/YHMainApplicantInformationViewController.swift
+44
-11
YHItemModel.swift
...eProcess(流程)/MainApplicantInformation/M/YHItemModel.swift
+40
-0
YHBottomNextView.swift
...ess(流程)/MainApplicantInformation/V/YHBottomNextView.swift
+77
-0
YHItemView.swift
...ceProcess(流程)/MainApplicantInformation/V/YHItemView.swift
+162
-0
YHMainInformationTableViewCell.swift
...plicantInformation/V/YHMainInformationTableViewCell.swift
+108
-0
YHStepView.swift
...ceProcess(流程)/MainApplicantInformation/V/YHStepView.swift
+6
-1
YHMainApplicantInformationViewModel.swift
...tInformation/VM/YHMainApplicantInformationViewModel.swift
+75
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
52312b82
...
...
@@ -33,6 +33,11 @@
0468D43A2B579EAC00CFB916
/* YHLoginViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4392B579EAC00CFB916
/* YHLoginViewModel.swift */
;
};
0468D4432B61F76800CFB916
/* YHMainApplicantInformationViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4422B61F76800CFB916
/* YHMainApplicantInformationViewController.swift */
;
};
0468D4452B62064700CFB916
/* YHStepView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4442B62064700CFB916
/* YHStepView.swift */
;
};
0468D4472B624AF000CFB916
/* YHBottomNextView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4462B624AF000CFB916
/* YHBottomNextView.swift */
;
};
0468D4492B6258A900CFB916
/* YHItemView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4482B6258A900CFB916
/* YHItemView.swift */
;
};
0468D44B2B625AAB00CFB916
/* YHItemModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D44A2B625AAB00CFB916
/* YHItemModel.swift */
;
};
0468D44D2B62643700CFB916
/* YHMainInformationTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D44C2B62643700CFB916
/* YHMainInformationTableViewCell.swift */
;
};
0468D44F2B634E8B00CFB916
/* YHMainApplicantInformationViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D44E2B634E8A00CFB916
/* YHMainApplicantInformationViewModel.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 */
;
};
...
...
@@ -182,6 +187,11 @@
0468D4392B579EAC00CFB916
/* YHLoginViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginViewModel.swift
;
sourceTree
=
"<group>"
;
};
0468D4422B61F76800CFB916
/* YHMainApplicantInformationViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMainApplicantInformationViewController.swift
;
sourceTree
=
"<group>"
;
};
0468D4442B62064700CFB916
/* YHStepView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHStepView.swift
;
sourceTree
=
"<group>"
;
};
0468D4462B624AF000CFB916
/* YHBottomNextView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHBottomNextView.swift
;
sourceTree
=
"<group>"
;
};
0468D4482B6258A900CFB916
/* YHItemView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHItemView.swift
;
sourceTree
=
"<group>"
;
};
0468D44A2B625AAB00CFB916
/* YHItemModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHItemModel.swift
;
sourceTree
=
"<group>"
;
};
0468D44C2B62643700CFB916
/* YHMainInformationTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMainInformationTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0468D44E2B634E8A00CFB916
/* YHMainApplicantInformationViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMainApplicantInformationViewModel.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>"
;
};
...
...
@@ -413,6 +423,7 @@
0468D43F2B61F6BD00CFB916
/* M */
=
{
isa
=
PBXGroup
;
children
=
(
0468D44A2B625AAB00CFB916
/* YHItemModel.swift */
,
);
path
=
M
;
sourceTree
=
"<group>"
;
...
...
@@ -421,6 +432,9 @@
isa
=
PBXGroup
;
children
=
(
0468D4442B62064700CFB916
/* YHStepView.swift */
,
0468D4462B624AF000CFB916
/* YHBottomNextView.swift */
,
0468D4482B6258A900CFB916
/* YHItemView.swift */
,
0468D44C2B62643700CFB916
/* YHMainInformationTableViewCell.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -428,6 +442,7 @@
0468D4412B61F6CA00CFB916
/* VM */
=
{
isa
=
PBXGroup
;
children
=
(
0468D44E2B634E8A00CFB916
/* YHMainApplicantInformationViewModel.swift */
,
);
path
=
VM
;
sourceTree
=
"<group>"
;
...
...
@@ -1079,6 +1094,8 @@
041B52DD2B60A889007EBCEB
/* YHTest.swift in Sources */
,
A5ACE94F2B4564F7002C94D2
/* YhOverlayView.swift in Sources */
,
A53026902B4E6F2700F35102
/* YHHomeCustomCell.swift in Sources */
,
0468D44F2B634E8B00CFB916
/* YHMainApplicantInformationViewModel.swift in Sources */
,
0468D44D2B62643700CFB916
/* YHMainInformationTableViewCell.swift in Sources */
,
A5ACE92E2B4564F7002C94D2
/* YHValidateCodeInputView.swift in Sources */
,
A5ACE94E2B4564F7002C94D2
/* AlignedCollectionViewFlowLayout.swift in Sources */
,
A5ACE93B2B4564F7002C94D2
/* UIFont+Extension.swift in Sources */
,
...
...
@@ -1100,6 +1117,7 @@
A5ACE9422B4564F7002C94D2
/* AppDelegate+Extension.swift in Sources */
,
A510441A2B495DD0006B60BB
/* UIView+Extension.swift in Sources */
,
A5ACE93E2B4564F7002C94D2
/* UIImage+Extension.swift in Sources */
,
0468D4472B624AF000CFB916
/* YHBottomNextView.swift in Sources */
,
A5ACE94C2B4564F7002C94D2
/* BsHUDErrorView.swift in Sources */
,
041B52D62B5F899E007EBCEB
/* YHSpouseFormVC.swift in Sources */
,
A5D6AB1B2B46A1CC001C10A5
/* YHHomeModel.swift in Sources */
,
...
...
@@ -1108,6 +1126,7 @@
A5C5B3122B57B47D00A7C5D1
/* YHDavidCell0.swift in Sources */
,
A56D2D612B62020C009C83A8
/* YHContractMainItemStatusCell.swift in Sources */
,
0468D43A2B579EAC00CFB916
/* YHLoginViewModel.swift in Sources */
,
0468D4492B6258A900CFB916
/* YHItemView.swift in Sources */
,
041B528F2B5E620E007EBCEB
/* YHSingleLineInputCell.swift in Sources */
,
A5ACE9402B4564F7002C94D2
/* String+Extension.swift in Sources */
,
A5ACE9482B4564F7002C94D2
/* BsHUDWariningView.swift in Sources */
,
...
...
@@ -1116,6 +1135,7 @@
A5ACE9492B4564F7002C94D2
/* BsHUDSuccessView.swift in Sources */
,
A5ACE9432B4564F7002C94D2
/* UILable+Extension.swift in Sources */
,
A5ACE9382B4564F7002C94D2
/* UIApplication+Extension.swift in Sources */
,
0468D44B2B625AAB00CFB916
/* YHItemModel.swift in Sources */
,
041B52872B5657B3007EBCEB
/* IMAppKey.swift in Sources */
,
0468D42B2B55019900CFB916
/* YHAnalytics.swift in Sources */
,
A5ACE93C2B4564F7002C94D2
/* UIColor+Extension.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/C/YHMainApplicantInformationViewController.swift
View file @
52312b82
...
...
@@ -11,21 +11,41 @@ import UIKit
class
YHMainApplicantInformationViewController
:
YHBaseViewController
{
var
stepView
:
YHStepView
!
var
bottomView
:
YHBottomNextView
!
var
tableView
:
UITableView
!
var
viewModel
:
YHMainApplicantInformationViewModel
!
var
dataSource
:
[
YHSectionItemModel
]?
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
viewModel
=
YHMainApplicantInformationViewModel
()
gk_navTitle
=
"主申请人信息填写"
setView
()
getData
()
// Do any additional setup after loading the view.
}
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
()
}
tableView
.
reloadData
()
}
func
setView
()
{
stepView
=
{
let
step
=
YHStepView
()
step
.
dataSource
=
[
"初始信息"
,
"证件上传"
,
"基本信息"
,
"证件信息"
]
step
.
block
=
{
[
weak
self
]
(
index
)
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
return
step
}()
view
.
addSubview
(
stepView
)
...
...
@@ -44,34 +64,47 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YHDoubleChoiceFormCell
.
self
,
forCellReuseIdentifier
:
YHDoubleChoiceFormCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHSingleLineInputCell
.
self
,
forCellReuseIdentifier
:
YHSingleLineInputCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHSingleLineSelectCell
.
self
,
forCellReuseIdentifier
:
YHSingleLineSelectCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHFormTitleCell
.
self
,
forCellReuseIdentifier
:
YHFormTitleCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHFormAddInfoCell
.
self
,
forCellReuseIdentifier
:
YHFormAddInfoCell
.
cellReuseIdentifier
)
tableView
.
register
(
cellWithClass
:
YHMainInformationTableViewCell
.
self
)
return
tableView
}()
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
104
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
}
bottomView
=
{
let
bottom
=
YHBottomNextView
()
bottom
.
block
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
stepView
.
currentIndex
=
self
.
stepView
.
currentIndex
+
1
self
.
getData
()
}
return
bottom
}()
view
.
addSubview
(
bottomView
)
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
make
.
height
.
equalTo
(
k_Height_safeAreaInsetsBottom
()
+
64
)
}
}
}
extension
YHMainApplicantInformationViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
0
return
dataSource
?
.
count
??
0
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
// let cell = tableView.dequeueReusableCell(withClass: <#T##T.Type#>
)
let
cell
=
UITableViewCell
()
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHMainInformationTableViewCell
.
self
)
cell
.
dataSource
=
dataSource
?[
indexPath
.
row
]
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
let
count
=
dataSource
?[
indexPath
.
row
]
.
models
?
.
count
??
0
return
CGFloat
(
count
*
52
+
52
+
14
)
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/M/YHItemModel.swift
0 → 100644
View file @
52312b82
//
// YHItemModel.swift
// galaxy
//
// Created by EDY on 2024/1/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
struct
YHItemModel
{
var
isNeed
:
Bool
?
var
title
:
String
?
var
isUserKeyBoard
:
Bool
?
var
prompts
:
String
?
var
message
:
String
?
var
leftButtonString
:
String
?
var
rightButtonString
:
String
?
init
(
isNeed
:
Bool
?
=
nil
,
title
:
String
?
=
nil
,
isUserKeyBoard
:
Bool
?
=
nil
,
prompts
:
String
?
=
nil
,
message
:
String
?
=
nil
,
leftButtonString
:
String
?
=
nil
,
rightButtonString
:
String
?
=
nil
)
{
self
.
isNeed
=
isNeed
self
.
title
=
title
self
.
isUserKeyBoard
=
isUserKeyBoard
self
.
prompts
=
prompts
self
.
message
=
message
self
.
leftButtonString
=
leftButtonString
self
.
rightButtonString
=
rightButtonString
}
}
struct
YHSectionItemModel
{
var
title
:
String
?
var
models
:
[
YHItemModel
]?
init
(
title
:
String
?
=
nil
,
models
:
[
YHItemModel
]?
=
nil
)
{
self
.
title
=
title
self
.
models
=
models
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/V/YHBottomNextView.swift
0 → 100644
View file @
52312b82
//
// YHBottomNextView.swift
// galaxy
//
// Created by EDY on 2024/1/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHBottomNextView
:
UIView
{
typealias
Block
=
()
->
()
var
block
:
Block
?
var
saveButton
:
UIButton
!
var
nextButton
:
UIButton
!
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
backgroundColor
=
.
white
setUpView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setUpView
()
{
saveButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
(
hex
:
0xf8f9fb
)
button
.
titleLabel
?
.
font
=
kBoldFont
(
size
:
15
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"保存"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x222222
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
8
button
.
addTarget
(
self
,
action
:
#selector(
save
)
,
for
:
.
touchUpInside
)
return
button
}()
addSubview
(
saveButton
)
saveButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
top
.
equalTo
(
10
)
make
.
height
.
equalTo
(
44
)
make
.
width
.
equalTo
(
86
)
}
nextButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
(
hex
:
0x4d9ff8
)
button
.
titleLabel
?
.
font
=
kBoldFont
(
size
:
15
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"下一步"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
8
button
.
addTarget
(
self
,
action
:
#selector(
goNext
)
,
for
:
.
touchUpInside
)
return
button
}()
addSubview
(
nextButton
)
nextButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
10
)
make
.
height
.
equalTo
(
44
)
make
.
width
.
equalTo
(
247
)
}
}
@objc
func
save
()
{
}
@objc
func
goNext
()
{
if
let
block
=
block
{
block
()
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/V/YHItemView.swift
0 → 100644
View file @
52312b82
//
// YHItemView.swift
// galaxy
//
// Created by EDY on 2024/1/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHItemView
:
UIView
{
var
titleLabel
:
UILabel
!
var
messageTextField
:
UITextField
!
var
nextStepImageView
:
UIImageView
!
var
centerButton
:
UIButton
!
var
leftButton
:
UIButton
!
var
rightButton
:
UIButton
!
var
dataSource
:
YHItemModel
?
{
didSet
{
updateAllViews
()
}
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
backgroundColor
=
.
white
setUpView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
setUpView
()
{
titleLabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
return
label
}()
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
top
.
bottom
.
equalToSuperview
()
make
.
width
.
equalTo
(
112
)
}
messageTextField
=
{
let
textField
=
UITextField
()
return
textField
}()
addSubview
(
messageTextField
)
messageTextField
.
snp
.
makeConstraints
{
make
in
make
.
right
.
top
.
bottom
.
equalToSuperview
()
make
.
left
.
equalTo
(
112
)
}
nextStepImageView
=
{
let
imageView
=
UIImageView
()
imageView
.
image
=
UIImage
(
named
:
"form_right_arrow"
)
return
imageView
}()
addSubview
(
nextStepImageView
)
nextStepImageView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
make
.
centerY
.
equalToSuperview
()
make
.
height
.
width
.
equalTo
(
20
)
}
centerButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
return
button
}()
addSubview
(
centerButton
)
centerButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
top
.
bottom
.
equalToSuperview
()
make
.
left
.
equalTo
(
112
)
}
rightButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
(
hex
:
0x4487f9
)
.
withAlphaComponent
(
0.08
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x4487f9
),
for
:
.
selected
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x222222
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
16
button
.
layer
.
borderWidth
=
1
button
.
layer
.
borderColor
=
UIColor
(
hex
:
0x4487f9
)
.
cgColor
button
.
isSelected
=
true
return
button
}()
addSubview
(
rightButton
)
rightButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
32
)
make
.
width
.
equalTo
(
74
)
}
leftButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
backgroundColor
=
UIColor
(
hex
:
0xf8f9fb
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x4487f9
),
for
:
.
selected
)
button
.
setTitleColor
(
UIColor
(
hex
:
0x222222
),
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
16
return
button
}()
addSubview
(
leftButton
)
leftButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
rightButton
.
snp
.
left
)
.
offset
(
-
12
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
32
)
make
.
width
.
equalTo
(
74
)
}
}
func
updateAllViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
if
dataSource
.
isNeed
??
false
{
let
str
=
"*"
+
(
dataSource
.
title
??
""
)
let
attributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
.
font
:
UIFont
.
PFSCR
(
ofSize
:
14
),
.
foregroundColor
:
UIColor
(
hex
:
0x222222
)
]
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
let
starRange
=
NSRange
(
location
:
0
,
length
:
1
)
questionAttrStr
.
addAttribute
(
NSAttributedString
.
Key
.
foregroundColor
,
value
:
UIColor
(
hex
:
0xFF3A3A
),
range
:
starRange
)
titleLabel
.
attributedText
=
questionAttrStr
}
else
{
let
str
=
dataSource
.
title
??
""
let
attributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
.
font
:
UIFont
.
PFSCR
(
ofSize
:
14
),
.
foregroundColor
:
UIColor
(
hex
:
0x222222
)
]
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
titleLabel
.
attributedText
=
questionAttrStr
}
if
dataSource
.
isUserKeyBoard
??
false
{
nextStepImageView
.
isHidden
=
true
centerButton
.
isHidden
=
true
}
else
{
nextStepImageView
.
isHidden
=
false
centerButton
.
isHidden
=
false
}
messageTextField
.
placeholder
=
dataSource
.
prompts
messageTextField
.
text
=
dataSource
.
message
if
(
dataSource
.
leftButtonString
!=
nil
)
{
leftButton
.
isHidden
=
false
leftButton
.
setTitle
(
dataSource
.
leftButtonString
,
for
:
.
normal
)
nextStepImageView
.
isHidden
=
true
}
else
{
leftButton
.
isHidden
=
true
}
if
(
dataSource
.
rightButtonString
!=
nil
)
{
rightButton
.
isHidden
=
false
rightButton
.
setTitle
(
dataSource
.
rightButtonString
,
for
:
.
normal
)
nextStepImageView
.
isHidden
=
true
}
else
{
rightButton
.
isHidden
=
true
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/V/YHMainInformationTableViewCell.swift
0 → 100644
View file @
52312b82
//
// YHMainInformationCountryTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/1/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHMainInformationTableViewCell
:
UITableViewCell
{
var
centerView
:
UIView
!
var
titleLabel
:
UILabel
!
var
mainItemView
:
UIView
!
var
dataSource
:
YHSectionItemModel
?{
didSet
{
updateAllViews
()
}
}
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
()
{
backgroundColor
=
UIColor
(
hex
:
0xe9e9e9
)
centerView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
12
return
view
}()
contentView
.
addSubview
(
centerView
)
centerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
7
)
make
.
bottom
.
equalTo
(
-
7
)
}
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
kFont
(
size
:
17
)
label
.
textColor
=
UIColor
(
hex
:
0x222222
)
return
label
}()
centerView
.
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
16
)
make
.
height
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
18
)
}
mainItemView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
12
return
view
}()
centerView
.
addSubview
(
mainItemView
)
mainItemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
52
)
}
}
func
updateAllViews
()
{
titleLabel
.
text
=
dataSource
?
.
title
mainItemView
.
removeSubviews
()
for
i
in
0
..<
(
dataSource
?
.
models
?
.
count
??
0
)
{
let
line
=
UIView
()
line
.
backgroundColor
=
UIColor
(
hex
:
0xf0f0f0
)
mainItemView
.
addSubview
(
line
)
line
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
52
*
i
)
make
.
height
.
equalTo
(
1
)
make
.
right
.
equalTo
(
-
18
)
}
let
itemView
=
YHItemView
()
itemView
.
dataSource
=
dataSource
?
.
models
?[
i
]
mainItemView
.
addSubview
(
itemView
)
itemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
52
*
i
+
1
)
make
.
height
.
equalTo
(
51
)
make
.
right
.
equalTo
(
-
18
)
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/V/YHStepView.swift
View file @
52312b82
...
...
@@ -9,12 +9,14 @@
import
UIKit
class
YHStepView
:
UIScrollView
{
typealias
Block
=
(
Int
)
->
()
var
block
:
Block
?
var
dataSource
:
[
String
]?
{
didSet
{
setUpView
(
dataSource
??
[])
}
}
var
currentIndex
:
Int
=
3
{
var
currentIndex
:
Int
=
0
{
didSet
{
updateView
(
dataSource
??
[])
}
...
...
@@ -135,6 +137,9 @@ class YHStepView: UIScrollView {
let
tag
=
button
.
tag
if
tag
-
1000
<
currentIndex
{
currentIndex
=
tag
-
1000
if
let
block
=
block
{
block
(
currentIndex
)
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/VM/YHMainApplicantInformationViewModel.swift
0 → 100644
View file @
52312b82
//
// YHMainApplicantInformationViewModel.swift
// galaxy
//
// Created by EDY on 2024/1/26.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHMainApplicantInformationViewModel
:
YHBaseViewModel
{
override
init
()
{
super
.
init
()
}
func
getBaseDataSource
()
->
[
YHSectionItemModel
]
{
let
item
=
YHItemModel
(
isNeed
:
true
,
title
:
"国家/地区"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
)
let
section
=
YHSectionItemModel
(
title
:
"国籍"
,
models
:
[
item
])
let
item1
=
YHItemModel
(
isNeed
:
true
,
title
:
"省市地区"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
)
let
item2
=
YHItemModel
(
isNeed
:
true
,
title
:
"详细地址"
,
isUserKeyBoard
:
true
,
prompts
:
"请填写小区、楼栋、单元室等"
)
let
section1
=
YHSectionItemModel
(
title
:
"现居住地址"
,
models
:
[
item
,
item1
,
item2
])
let
item3
=
YHItemModel
(
isNeed
:
true
,
title
:
"是否办理"
,
isUserKeyBoard
:
false
,
prompts
:
""
,
message
:
nil
,
leftButtonString
:
"是"
,
rightButtonString
:
"否"
)
let
section2
=
YHSectionItemModel
(
title
:
"港澳通行证"
,
models
:
[
item3
])
return
[
section
,
section1
,
section2
]
}
func
getDocumentInformation
()
->
[
YHSectionItemModel
]
{
let
item
=
YHItemModel
(
isNeed
:
true
,
title
:
"身份证号码"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
nil
)
let
item1
=
YHItemModel
(
isNeed
:
true
,
title
:
"签发地"
,
isUserKeyBoard
:
false
,
prompts
:
"请输入"
,
message
:
nil
)
let
item2
=
YHItemModel
(
isNeed
:
true
,
title
:
"签发日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
nil
)
let
item3
=
YHItemModel
(
isNeed
:
true
,
title
:
"届满日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
nil
)
let
section
=
YHSectionItemModel
(
title
:
"中国身份证"
,
models
:
[
item
,
item1
,
item2
,
item3
])
let
section1
=
YHSectionItemModel
(
title
:
"港澳通行证"
,
models
:
[
item
,
item1
,
item2
,
item3
])
let
item4
=
YHItemModel
(
isNeed
:
false
,
title
:
"证件类别"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
nil
)
let
item5
=
YHItemModel
(
isNeed
:
false
,
title
:
"证件号码"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
nil
)
let
item6
=
YHItemModel
(
isNeed
:
false
,
title
:
"签发地"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
nil
)
let
item7
=
YHItemModel
(
isNeed
:
false
,
title
:
"签发日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
nil
)
let
item8
=
YHItemModel
(
isNeed
:
false
,
title
:
"届满日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
nil
)
let
section2
=
YHSectionItemModel
(
title
:
"护照及其他旅行证件(选填)"
,
models
:
[
item4
,
item5
,
item6
,
item7
,
item8
])
return
[
section
,
section1
,
section2
]
}
func
getDetailDataSource
()
->
[
YHSectionItemModel
]
{
let
item
=
YHItemModel
(
isNeed
:
true
,
title
:
"主申请人姓名"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
nil
)
let
item1
=
YHItemModel
(
isNeed
:
false
,
title
:
"曾用名"
,
isUserKeyBoard
:
true
,
prompts
:
"请与户口本一致,若无则不填"
,
message
:
nil
)
let
item2
=
YHItemModel
(
isNeed
:
false
,
title
:
"婚前姓氏"
,
isUserKeyBoard
:
true
,
prompts
:
"如有则填写,仅支持输入字母"
,
message
:
nil
)
let
item3
=
YHItemModel
(
isNeed
:
true
,
title
:
"出生日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
nil
)
let
item4
=
YHItemModel
(
isNeed
:
true
,
title
:
"出生国家/地区"
,
isUserKeyBoard
:
false
,
prompts
:
nil
,
message
:
nil
,
leftButtonString
:
"国内"
,
rightButtonString
:
"国外"
)
let
item5
=
YHItemModel
(
isNeed
:
true
,
title
:
"出生城市"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
nil
)
let
item6
=
YHItemModel
(
isNeed
:
true
,
title
:
"性别"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
nil
)
let
item7
=
YHItemModel
(
isNeed
:
true
,
title
:
"婚姻状况"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
nil
)
let
section
=
YHSectionItemModel
(
title
:
"主申请人信息"
,
models
:
[
item
,
item1
,
item2
,
item3
,
item4
,
item5
,
item6
,
item7
])
let
item8
=
YHItemModel
(
isNeed
:
true
,
title
:
"手机号码"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
nil
)
let
item9
=
YHItemModel
(
isNeed
:
true
,
title
:
"电子邮箱"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
nil
)
let
section1
=
YHSectionItemModel
(
title
:
"联系方式"
,
models
:
[
item8
,
item9
])
let
item10
=
YHItemModel
(
isNeed
:
true
,
title
:
"是否办理过"
,
isUserKeyBoard
:
false
,
prompts
:
nil
,
message
:
nil
,
leftButtonString
:
"是"
,
rightButtonString
:
"否"
)
let
section2
=
YHSectionItemModel
(
title
:
"香港身份证"
,
models
:
[
item10
])
return
[
section
,
section1
,
section2
]
}
func
getIDCardDataSource
()
->
[
YHSectionItemModel
]
{
let
item
=
YHItemModel
(
isNeed
:
true
,
title
:
"身份证"
,
isUserKeyBoard
:
false
,
prompts
:
"请输入"
,
message
:
nil
)
let
section
=
YHSectionItemModel
(
title
:
"中国身份证(选填)"
,
models
:
[
item
])
let
item1
=
YHItemModel
(
isNeed
:
true
,
title
:
"港澳通行证(选填)"
,
isUserKeyBoard
:
false
,
prompts
:
"请输入"
,
message
:
nil
)
let
section1
=
YHSectionItemModel
(
title
:
"中国身份证(选填)"
,
models
:
[
item
])
return
[
section
,
section1
]
}
}
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