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
33b627ee
Commit
33b627ee
authored
Aug 19, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 赴港办证
parent
75425af6
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
909 additions
and
1 deletion
+909
-1
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+68
-0
YHCertificateAppointViewController.swift
...ficate(赴港办证预约)/C/YHCertificateAppointViewController.swift
+99
-0
YHCertificateAppointOptionCell.swift
...ertificate(赴港办证预约)/V/YHCertificateAppointOptionCell.swift
+110
-0
YHCertificateAppointOptionView.swift
...ertificate(赴港办证预约)/V/YHCertificateAppointOptionView.swift
+41
-0
YHInfoItemOptionView.swift
...)/AppointCertificate(赴港办证预约)/V/YHInfoItemOptionView.swift
+191
-0
YHInfoItemSelectSheetView.swift
...ointCertificate(赴港办证预约)/V/YHInfoItemSelectSheetView.swift
+113
-0
YHSelectApplicantCell.swift
.../AppointCertificate(赴港办证预约)/V/YHSelectApplicantCell.swift
+59
-0
YHSelectApplicantGroupCell.swift
...intCertificate(赴港办证预约)/V/YHSelectApplicantGroupCell.swift
+227
-0
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+1
-1
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
33b627ee
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(赴港办证预约)/C/YHCertificateAppointViewController.swift
0 → 100644
View file @
33b627ee
//
// YHCertificateAppointViewController.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHCertificateAppointViewController
:
YHBaseViewController
{
var
items
=
[
""
,
""
]
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
tableView
.
estimatedSectionHeaderHeight
=
16.0
tableView
.
estimatedSectionFooterHeight
=
0.01
tableView
.
contentInsetAdjustmentBehavior
=
.
never
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
backgroundColor
=
UIColor
(
hex
:
0xF8F9FB
)
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YHCertificateAppointOptionCell
.
self
,
forCellReuseIdentifier
:
YHCertificateAppointOptionCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHSelectApplicantGroupCell
.
self
,
forCellReuseIdentifier
:
YHSelectApplicantGroupCell
.
cellReuseIdentifier
)
return
tableView
}()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
createUI
()
}
func
createUI
()
{
super
.
viewDidLoad
()
self
.
gk_navTitle
=
"赴港办证预约"
self
.
view
.
backgroundColor
=
.
white
self
.
view
.
addSubview
(
self
.
tableView
)
self
.
tableView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
}
}
}
extension
YHCertificateAppointViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
items
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
row
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHCertificateAppointOptionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificateAppointOptionCell
return
cell
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHSelectApplicantGroupCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHSelectApplicantGroupCell
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
UITableView
.
automaticDimension
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
}
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
return
0.01
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
CGFloat
{
return
0.01
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
return
view
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
return
view
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(赴港办证预约)/V/YHCertificateAppointOptionCell.swift
0 → 100644
View file @
33b627ee
//
// YHCertificateAppointOptionCell.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
AttributedString
class
YHCertificateAppointOptionCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHCertificateAppointOptionCell"
lazy
var
whiteContentView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius6
return
view
}()
lazy
var
lineView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
separatorColor
return
view
}()
lazy
var
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
let
a
:
ASAttributedString
=
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
failColor
))
let
b
:
ASAttributedString
=
.
init
(
"赴港办证"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
mainTextColor
))
label
.
attributed
.
text
=
a
+
b
return
label
}()
lazy
var
detailLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
let
a
:
ASAttributedString
=
.
init
(
"备注:如您已获得香港居民身份证,此时无需再赴港办理身份证,"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
init
(
hex
:
0x94A3B8
)))
let
b
:
ASAttributedString
=
.
init
(
"则选择“否”"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
brandMainColor
))
label
.
attributed
.
text
=
a
+
b
return
label
}()
lazy
var
optionsView
:
YHInfoItemOptionView
=
{
let
view
=
YHInfoItemOptionView
(
frame
:
.
zero
)
view
.
title
=
"是否赴港办证"
view
.
setOptions
([
"是"
,
"否"
])
view
.
selectIndex
=
0
view
.
selectBlock
=
{
index
in
}
return
view
}()
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
}
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
setupUI
()
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
self
.
backgroundColor
=
.
clear
self
.
contentView
.
backgroundColor
=
.
clear
contentView
.
addSubview
(
whiteContentView
)
whiteContentView
.
addSubview
(
titleLabel
)
whiteContentView
.
addSubview
(
lineView
)
whiteContentView
.
addSubview
(
detailLabel
)
whiteContentView
.
addSubview
(
optionsView
)
whiteContentView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
16
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
bottom
.
equalTo
(
0
)
}
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
16
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
}
lineView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
12
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
0.5
)
}
detailLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
lineView
.
snp
.
bottom
)
.
offset
(
16
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
}
optionsView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
detailLabel
.
snp
.
bottom
)
.
offset
(
10
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
0
)
make
.
bottom
.
equalTo
(
-
8
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(赴港办证预约)/V/YHCertificateAppointOptionView.swift
0 → 100644
View file @
33b627ee
//
// YHCertificateAppointOptionView.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHCertificateAppointOptionView
:
UIView
{
lazy
var
whiteContentView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius6
return
view
}()
lazy
var
lineView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
separatorColor
return
view
}()
lazy
var
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
return
label
}()
lazy
var
detailLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
label
.
text
=
"张全蛋"
label
.
textColor
=
UIColor
.
mainTextColor
return
label
}()
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(赴港办证预约)/V/YHInfoItemOptionView.swift
0 → 100644
View file @
33b627ee
//
// YHInfoItemOptionView.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHInfoItemOption
{
var
value
:
String
=
""
var
isSelect
:
Bool
=
false
}
class
YHInfoItemOptionView
:
UIView
{
let
btnHeight
=
32.0
let
titleMaxWidth
=
113.0
let
baseBtnTag
=
9527
var
options
:
[
String
]
=
[]
var
selectBlock
:((
Int
)
->
())?
var
title
:
String
=
""
{
didSet
{
self
.
titleLabel
.
text
=
title
let
height
=
self
.
getHeight
(
text
:
title
,
font
:
titleLabel
.
font
,
width
:
titleMaxWidth
)
var
isOneLine
=
false
if
height
<=
20
{
// 文字只显示一行
isOneLine
=
true
}
else
{
// 文字超过一行
isOneLine
=
false
}
titleLabel
.
snp
.
remakeConstraints
{
make
in
if
isOneLine
{
make
.
height
.
equalTo
(
20
)
}
make
.
edges
.
equalToSuperview
()
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
}
func
setOptions
(
_
options
:[
String
])
{
self
.
options
=
options
for
(
index
,
text
)
in
options
.
enumerated
()
{
if
let
btn
=
self
.
viewWithTag
(
baseBtnTag
+
index
)
as?
UIButton
{
btn
.
setTitle
(
text
,
for
:
.
normal
)
}
}
}
var
selectIndex
:
Int
=
-
1
{
didSet
{
for
(
index
,
_
)
in
options
.
enumerated
()
{
if
let
btn
=
self
.
viewWithTag
(
baseBtnTag
+
index
)
as?
UIButton
{
setOptionBtnSelected
(
btn
:
btn
,
isSelect
:
index
==
selectIndex
)
}
}
}
}
var
titleGap
=
16.0
{
didSet
{
titleView
.
snp
.
updateConstraints
{
make
in
make
.
top
.
equalTo
(
titleGap
)
make
.
bottom
.
equalTo
(
-
titleGap
)
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
}
lazy
var
lineView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
separatorColor
return
view
}()
lazy
var
titleView
:
UIView
=
{
let
view
=
UIView
()
return
view
}()
lazy
var
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
return
label
}()
func
createOptionButton
()
->
UIButton
{
let
btn
=
UIButton
()
btn
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xF8F9FB
)
btn
.
titleLabel
?
.
font
=
.
PFSC_R
(
ofSize
:
13
)
btn
.
setTitle
(
""
,
for
:
.
normal
)
btn
.
layer
.
cornerRadius
=
self
.
btnHeight
/
2.0
btn
.
clipsToBounds
=
true
return
btn
}
func
setOptionBtnSelected
(
btn
:
UIButton
,
isSelect
:
Bool
)
{
btn
.
layer
.
borderWidth
=
isSelect
?
1.0
:
0.0
btn
.
layer
.
borderColor
=
isSelect
?
UIColor
.
brandMainColor
.
cgColor
:
nil
btn
.
setTitleColor
(
isSelect
?
UIColor
.
brandMainColor
:
UIColor
.
init
(
hex
:
0x222222
),
for
:
.
normal
)
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
createUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
createUI
()
{
self
.
addSubview
(
titleView
)
titleView
.
addSubview
(
titleLabel
)
let
firstBtn
=
self
.
createOptionButton
()
firstBtn
.
tag
=
baseBtnTag
+
0
setOptionBtnSelected
(
btn
:
firstBtn
,
isSelect
:
false
)
firstBtn
.
addTarget
(
self
,
action
:
#selector(
didOptionBtnClicked(_:)
)
,
for
:
.
touchUpInside
)
self
.
addSubview
(
firstBtn
)
let
secondBtn
=
self
.
createOptionButton
()
secondBtn
.
tag
=
baseBtnTag
+
1
setOptionBtnSelected
(
btn
:
secondBtn
,
isSelect
:
false
)
secondBtn
.
addTarget
(
self
,
action
:
#selector(
didOptionBtnClicked(_:)
)
,
for
:
.
touchUpInside
)
self
.
addSubview
(
secondBtn
)
self
.
addSubview
(
lineView
)
lineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
right
.
equalTo
(
0
)
make
.
top
.
equalTo
(
0
)
make
.
height
.
equalTo
(
0.5
)
}
titleView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
top
.
equalTo
(
titleGap
)
make
.
bottom
.
equalTo
(
-
titleGap
)
make
.
width
.
equalTo
(
titleMaxWidth
)
}
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
secondBtn
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
18
)
make
.
size
.
equalTo
(
CGSize
(
width
:
69
,
height
:
32
))
make
.
centerY
.
equalTo
(
titleView
)
}
firstBtn
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
secondBtn
.
snp
.
left
)
.
offset
(
-
8
)
make
.
size
.
equalTo
(
CGSize
(
width
:
69
,
height
:
32
))
make
.
centerY
.
equalTo
(
titleView
)
}
}
@objc
func
didOptionBtnClicked
(
_
sender
:
UIButton
)
{
if
let
btn1
=
self
.
viewWithTag
(
baseBtnTag
+
0
)
as?
UIButton
{
setOptionBtnSelected
(
btn
:
btn1
,
isSelect
:
sender
.
tag
==
baseBtnTag
+
0
)
}
if
let
btn2
=
self
.
viewWithTag
(
baseBtnTag
+
1
)
as?
UIButton
{
setOptionBtnSelected
(
btn
:
btn2
,
isSelect
:
sender
.
tag
==
baseBtnTag
+
1
)
}
}
func
getHeight
(
text
:
String
,
font
:
UIFont
,
width
:
CGFloat
)
->
CGFloat
{
let
size
=
CGSize
.
init
(
width
:
width
,
height
:
CGFloat
(
MAXFLOAT
))
let
dic
=
[
NSAttributedString
.
Key
.
font
:
font
]
let
strSize
=
text
.
boundingRect
(
with
:
size
,
options
:
[
.
usesLineFragmentOrigin
],
attributes
:
dic
,
context
:
nil
)
.
size
return
CGSizeMake
(
strSize
.
width
,
ceil
(
strSize
.
height
))
.
height
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(赴港办证预约)/V/YHInfoItemSelectSheetView.swift
0 → 100644
View file @
33b627ee
//
// YHInfoItemSelectSheetView.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHInfoItemSelectSheetView
:
UIView
{
var
titleMaxWidth
=
112.0
var
title
:
String
=
""
{
didSet
{
titleLabel
.
text
=
title
}
}
var
detail
:
String
=
""
{
didSet
{
detailLabel
.
text
=
detail
}
}
var
isShowDetailOneline
:
Bool
=
false
{
didSet
{
detailLabel
.
textAlignment
=
isShowDetailOneline
?
.
right
:
.
left
detailLabel
.
numberOfLines
=
isShowDetailOneline
?
1
:
0
detailLabel
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
16
)
make
.
right
.
equalTo
(
arrowImgView
.
snp
.
left
)
make
.
bottom
.
equalTo
(
-
16
)
if
isShowDetailOneline
{
make
.
height
.
equalTo
(
20
)
}
else
{
make
.
left
.
equalTo
(
titleLabel
.
snp
.
right
)
}
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
}
lazy
var
lineView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
separatorColor
return
view
}()
lazy
var
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
return
label
}()
lazy
var
detailLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
return
label
}()
lazy
var
arrowImgView
:
UIImageView
=
{
let
view
=
UIImageView
(
image
:
UIImage
(
named
:
"family_info_arrow"
))
return
view
}()
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
createUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
createUI
()
{
self
.
addSubview
(
titleLabel
)
self
.
addSubview
(
detailLabel
)
self
.
addSubview
(
arrowImgView
)
self
.
addSubview
(
lineView
)
lineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
right
.
equalTo
(
0
)
make
.
top
.
equalTo
(
0
)
make
.
height
.
equalTo
(
0.5
)
}
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
top
.
equalTo
(
16
)
make
.
width
.
equalTo
(
titleMaxWidth
)
}
detailLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
16
)
make
.
left
.
equalTo
(
titleLabel
.
snp
.
right
)
make
.
right
.
equalTo
(
arrowImgView
.
snp
.
left
)
make
.
bottom
.
equalTo
(
-
16
)
}
arrowImgView
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
22
)
make
.
top
.
equalTo
(
15
)
make
.
right
.
equalTo
(
0
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(赴港办证预约)/V/YHSelectApplicantCell.swift
0 → 100644
View file @
33b627ee
//
// YHSelectApplicantCell.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHSelectApplicantCell
:
UICollectionViewCell
{
static
let
cellReuseIdentifier
=
"YHSelectApplicantCell"
lazy
var
selectImgView
:
UIImageView
=
{
let
view
=
UIImageView
(
image
:
UIImage
(
named
:
""
))
return
view
}()
lazy
var
nameLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
textColor
=
.
mainTextColor
return
label
}()
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
createUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
createUI
()
{
self
.
addSubview
(
selectImgView
)
self
.
addSubview
(
nameLabel
)
selectImgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
width
.
height
.
equalTo
(
14
)
make
.
centerY
.
equalToSuperview
()
}
nameLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
selectImgView
.
snp
.
right
)
.
offset
(
6
)
make
.
centerY
.
equalToSuperview
()
make
.
right
.
equalToSuperview
()
}
}
func
updateApplicantInfo
(
_
applicant
:
YHSelectApplicantInfo
)
{
nameLabel
.
text
=
applicant
.
name
let
imgName
=
applicant
.
isSelect
?
"login_privacy_agree"
:
"login_privacy_disagree_glay"
selectImgView
.
image
=
UIImage
(
named
:
imgName
)
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(赴港办证预约)/V/YHSelectApplicantGroupCell.swift
0 → 100644
View file @
33b627ee
//
// YHSelectApplicantGroupCell.swift
// galaxy
//
// Created by edy on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
AttributedString
class
YHSelectApplicantInfo
{
var
name
:
String
=
""
var
isSelect
:
Bool
=
false
init
(
name
:
String
,
isSelect
:
Bool
)
{
self
.
name
=
name
self
.
isSelect
=
isSelect
}
}
class
YHSelectApplicantGroupCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHSelectApplicantGroupCell"
lazy
var
selecters
:[
YHSelectApplicantInfo
]
=
{
return
[
YHSelectApplicantInfo
(
name
:
"李小龙"
,
isSelect
:
true
),
YHSelectApplicantInfo
(
name
:
"成龙"
,
isSelect
:
false
),
YHSelectApplicantInfo
(
name
:
"甄子丹"
,
isSelect
:
true
),
YHSelectApplicantInfo
(
name
:
"吉田双阴"
,
isSelect
:
false
),]
}()
lazy
var
whiteContentView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius6
return
view
}()
lazy
var
lineView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
separatorColor
return
view
}()
lazy
var
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
let
a
:
ASAttributedString
=
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
failColor
))
let
b
:
ASAttributedString
=
.
init
(
"请您确认第一批赴港信息"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
mainTextColor
))
label
.
attributed
.
text
=
a
+
b
return
label
}()
lazy
var
detailLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
textColor
=
.
mainTextColor
label
.
text
=
"选择第一批赴港激活签证的申请人"
return
label
}()
lazy
var
selectGroupView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
init
(
hex
:
0xF8F9FB
)
view
.
layer
.
cornerRadius
=
kCornerRadius3
return
view
}()
lazy
var
collectionView
:
UICollectionView
=
{
let
layout
=
UICollectionViewFlowLayout
()
layout
.
scrollDirection
=
.
vertical
layout
.
minimumInteritemSpacing
=
0
layout
.
minimumLineSpacing
=
16
let
collectView
=
UICollectionView
(
frame
:
.
zero
,
collectionViewLayout
:
layout
)
collectView
.
delegate
=
self
collectView
.
dataSource
=
self
collectView
.
backgroundColor
=
.
clear
// 注册自定义单元格
collectView
.
register
(
YHSelectApplicantCell
.
self
,
forCellWithReuseIdentifier
:
YHSelectApplicantCell
.
cellReuseIdentifier
)
return
collectView
}()
lazy
var
optionsView
:
YHInfoItemOptionView
=
{
let
view
=
YHInfoItemOptionView
(
frame
:
.
zero
)
view
.
titleGap
=
22.0
view
.
title
=
"赴港办证时间"
view
.
setOptions
([
"具体日期"
,
"具体时段"
])
view
.
selectIndex
=
0
view
.
selectBlock
=
{
index
in
}
return
view
}()
lazy
var
timeSelectView
:
YHInfoItemSelectSheetView
=
{
let
view
=
YHInfoItemSelectSheetView
(
frame
:
.
zero
)
view
.
isShowDetailOneline
=
true
view
.
title
=
"具体日期"
view
.
detail
=
"2024-03-14 ~ 2024-03-14 "
return
view
}()
lazy
var
locationSelectView
:
YHInfoItemSelectSheetView
=
{
let
view
=
YHInfoItemSelectSheetView
(
frame
:
.
zero
)
view
.
title
=
"港府办证地点"
view
.
detail
=
"九龙办事处(长沙湾) "
return
view
}()
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
}
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
setupUI
()
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
self
.
backgroundColor
=
.
clear
self
.
contentView
.
backgroundColor
=
.
clear
contentView
.
addSubview
(
whiteContentView
)
whiteContentView
.
addSubview
(
titleLabel
)
whiteContentView
.
addSubview
(
lineView
)
whiteContentView
.
addSubview
(
detailLabel
)
whiteContentView
.
addSubview
(
selectGroupView
)
selectGroupView
.
addSubview
(
collectionView
)
whiteContentView
.
addSubview
(
optionsView
)
whiteContentView
.
addSubview
(
timeSelectView
)
whiteContentView
.
addSubview
(
locationSelectView
)
whiteContentView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
16
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
bottom
.
equalTo
(
0
)
}
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
18
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
}
lineView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
12
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
0.5
)
}
detailLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
lineView
.
snp
.
bottom
)
.
offset
(
16
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
}
selectGroupView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
top
.
equalTo
(
detailLabel
.
snp
.
bottom
)
.
offset
(
12
)
}
collectionView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
14
)
make
.
right
.
equalTo
(
-
14
)
make
.
height
.
equalTo
(
40
+
16
)
make
.
top
.
equalTo
(
14
)
make
.
bottom
.
equalTo
(
-
14
)
}
optionsView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
selectGroupView
.
snp
.
bottom
)
.
offset
(
16
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
0
)
}
timeSelectView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
optionsView
.
snp
.
bottom
)
.
offset
(
0
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
}
locationSelectView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
timeSelectView
.
snp
.
bottom
)
.
offset
(
0
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
bottom
.
equalToSuperview
()
}
}
}
extension
YHSelectApplicantGroupCell
:
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UICollectionViewDelegateFlowLayout
{
// 返回单元格数量
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
return
selecters
.
count
}
// 返回每个单元格的大小
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
sizeForItemAt
indexPath
:
IndexPath
)
->
CGSize
{
return
CGSize
(
width
:
floorl
(
collectionView
.
width
/
3.0
),
height
:
20
)
}
// 返回自定义单元格
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHSelectApplicantCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHSelectApplicantCell
if
0
<=
indexPath
.
item
&&
indexPath
.
item
<
selecters
.
count
{
let
applicant
=
selecters
[
indexPath
.
item
]
cell
.
updateApplicantInfo
(
applicant
)
}
return
cell
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
if
0
<=
indexPath
.
item
&&
indexPath
.
item
<
selecters
.
count
{
let
text
=
selecters
[
indexPath
.
item
]
}
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
33b627ee
...
@@ -338,7 +338,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
...
@@ -338,7 +338,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
}
}
if
true
{
if
true
{
let
vc
=
YH
FamilyInfoConfirm
ViewController
()
let
vc
=
YH
CertificateAppoint
ViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
return
return
}
}
...
...
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