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
3a9cc3dc
Commit
3a9cc3dc
authored
Aug 26, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 赴港
parent
dfc6263b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
19 deletions
+29
-19
YHCertificateAppointViewController.swift
...cate(3 赴港办证预约)/C/YHCertificateAppointViewController.swift
+14
-12
YHCertificateAppointOptionCell.swift
...tificate(3 赴港办证预约)/V/YHCertificateAppointOptionCell.swift
+6
-6
YHInfoItemOptionView.swift
...AppointCertificate(3 赴港办证预约)/V/YHInfoItemOptionView.swift
+9
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/C/YHCertificateAppointViewController.swift
View file @
3a9cc3dc
...
...
@@ -334,16 +334,14 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
if
item
.
type
==
.
goHKMakeCertificate
{
// 赴港办证
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHCertificateAppointOptionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificateAppointOptionCell
// 此处btnIndex 是从左到右按钮的index从0算起
// 按钮排序如下 [是0,否1]
var
btnIndex
=
1000
if
self
.
isNeedGoHK
==
0
{
// 服务端0代表不需要,否
btnIndex
=
1
// 选中第2个btn
}
else
if
self
.
isNeedGoHK
==
1
{
// 服务端1代表需要,是
btnIndex
=
0
// 选中第1个btn
var
isGoHK
:
Bool
?
=
nil
if
self
.
isNeedGoHK
==
0
{
isGoHK
=
false
}
else
if
self
.
isNeedGoHK
==
1
{
isGoHK
=
true
}
cell
.
selectIndex
=
btnIndex
cell
.
isSelectGoHK
=
isGoHK
cell
.
selectBlock
=
{
[
weak
self
]
index
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -360,11 +358,15 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
}
}
// 默认设置两个按钮可点击
cell
.
optionsView
.
setOptionBtnDisabled
(
index
:
0
,
disabled
:
false
)
cell
.
optionsView
.
setOptionBtnDisabled
(
index
:
1
,
disabled
:
false
)
if
self
.
reservationToHK
==
1
{
// 已经预约过
// 是否赴港办证不能点击否 index 0是是按钮 1是否按钮
cell
.
disableBtn
(
index
:
1
)
}
else
{
// 否按钮不可点击且未选中 标题置灰
cell
.
optionsView
.
setOptionBtnDisabledAndUnselected
(
1
)
cell
.
optionsView
.
setOptionBtnDisabled
(
index
:
0
,
disabled
:
true
)
}
return
cell
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/V/YHCertificateAppointOptionCell.swift
View file @
3a9cc3dc
...
...
@@ -13,17 +13,17 @@ class YHCertificateAppointOptionCell: UITableViewCell {
static
let
cellReuseIdentifier
=
"YHCertificateAppointOptionCell"
//
此处index 是按钮从左到右由0开始
var
selectIndex
=
-
1
{
//
选择是否赴港
var
isSelectGoHK
:
Bool
?
{
didSet
{
var
selectIndex
=
-
1
// 是否都未选择
if
let
isGoHK
=
isSelectGoHK
{
selectIndex
=
isGoHK
?
0
:
1
}
optionsView
.
selectIndex
=
selectIndex
}
}
func
disableBtn
(
index
:
Int
)
{
optionsView
.
setOptionBtnDisabled
(
index
)
}
var
selectBlock
:((
Int
)
->
())?
lazy
var
whiteContentView
:
UIView
=
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/V/YHInfoItemOptionView.swift
View file @
3a9cc3dc
...
...
@@ -111,7 +111,8 @@ class YHInfoItemOptionView: UIView {
btn
.
setTitleColor
(
isSelect
?
UIColor
.
brandMainColor
:
UIColor
.
init
(
hex
:
0x222222
),
for
:
.
normal
)
}
func
setOptionBtnDisabled
(
_
index
:
Int
)
{
// 禁用按钮且更新为未选择状态并将标题置灰
func
setOptionBtnDisabledAndUnselected
(
_
index
:
Int
)
{
if
let
btn
=
self
.
viewWithTag
(
baseBtnTag
+
index
)
as?
UIButton
{
setOptionBtnSelected
(
btn
:
btn
,
isSelect
:
false
)
btn
.
isEnabled
=
false
...
...
@@ -119,6 +120,13 @@ class YHInfoItemOptionView: UIView {
}
}
// 是否禁用按钮点击
func
setOptionBtnDisabled
(
index
:
Int
,
disabled
:
Bool
)
{
if
let
btn
=
self
.
viewWithTag
(
baseBtnTag
+
index
)
as?
UIButton
{
btn
.
isEnabled
=
!
disabled
}
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
createUI
()
...
...
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