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
23d8066e
Commit
23d8066e
authored
Aug 24, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 请求回执显示及点击
parent
5f9f3637
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
119 additions
and
10 deletions
+119
-10
YHCertificateAppointViewController.swift
...cate(3 赴港办证预约)/C/YHCertificateAppointViewController.swift
+54
-0
YHAppointHKResultModel.swift
...pointCertificate(3 赴港办证预约)/M/YHAppointHKResultModel.swift
+13
-0
YHGrabFileCell.swift
...(办证段)/AppointCertificate(3 赴港办证预约)/V/YHGrabFileCell.swift
+15
-2
YHGrabNumberInfoView.swift
...AppointCertificate(3 赴港办证预约)/V/YHGrabNumberInfoView.swift
+33
-5
YHHaveGrabbedNumberListCell.swift
...Certificate(3 赴港办证预约)/V/YHHaveGrabbedNumberListCell.swift
+2
-1
YHCerAppointViewModel.swift
...pointCertificate(3 赴港办证预约)/VM/YHCerAppointViewModel.swift
+2
-2
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/C/YHCertificateAppointViewController.swift
View file @
23d8066e
...
@@ -48,6 +48,8 @@ class YHCertificateAppointViewController: YHBaseViewController {
...
@@ -48,6 +48,8 @@ class YHCertificateAppointViewController: YHBaseViewController {
// 申请人是否统一赴港激活签证 本地记录的开关
// 申请人是否统一赴港激活签证 本地记录的开关
var
isAllMembersGo
:
Bool
=
true
// 默认一起去
var
isAllMembersGo
:
Bool
=
true
// 默认一起去
var
semaphore
=
DispatchSemaphore
(
value
:
1
)
lazy
var
tableView
:
UITableView
=
{
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
tableView
.
estimatedSectionHeaderHeight
=
0.01
tableView
.
estimatedSectionHeaderHeight
=
0.01
...
@@ -138,12 +140,15 @@ class YHCertificateAppointViewController: YHBaseViewController {
...
@@ -138,12 +140,15 @@ class YHCertificateAppointViewController: YHBaseViewController {
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
self
.
requetIsGoToHK
{
// 请求是否赴港办证选项和是否已预约过
self
.
requetIsGoToHK
{
// 请求是否赴港办证选项和是否已预约过
self
.
requetAppointMembers
{
// 请求赴港办证人员名单
self
.
requetAppointMembers
{
// 请求赴港办证人员名单
YHHUD
.
hide
()
if
self
.
reservationToHK
==
1
{
// 有历史预约人员
if
self
.
reservationToHK
==
1
{
// 有历史预约人员
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
self
.
requestAppointResultList
{
// 请求预约结果
self
.
requestAppointResultList
{
// 请求预约结果
YHHUD
.
hide
()
YHHUD
.
hide
()
self
.
updateData
()
self
.
updateData
()
completion
?()
completion
?()
self
.
requestSuccessScriptUrls
()
}
}
}
else
{
// 没有预约过
}
else
{
// 没有预约过
YHHUD
.
hide
()
YHHUD
.
hide
()
...
@@ -259,6 +264,10 @@ class YHCertificateAppointViewController: YHBaseViewController {
...
@@ -259,6 +264,10 @@ class YHCertificateAppointViewController: YHBaseViewController {
if
grabbingNumInfoArr
.
count
>
0
{
if
grabbingNumInfoArr
.
count
>
0
{
sections
.
append
(
grabbingNumInfoArr
)
sections
.
append
(
grabbingNumInfoArr
)
}
}
if
grabbedNumInfoArr
.
count
>
0
{
sections
.
append
(
grabbedNumInfoArr
)
}
self
.
tableView
.
reloadData
()
self
.
tableView
.
reloadData
()
// 底部按钮更新
// 底部按钮更新
...
@@ -352,9 +361,12 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
...
@@ -352,9 +361,12 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
self
.
updateData
()
self
.
updateData
()
}
}
}
}
if
self
.
reservationToHK
==
1
{
// 已经预约过
if
self
.
reservationToHK
==
1
{
// 已经预约过
// 是否赴港办证不能点击否 index 0是是按钮 1是否按钮
// 是否赴港办证不能点击否 index 0是是按钮 1是否按钮
cell
.
disableBtn
(
index
:
1
)
cell
.
disableBtn
(
index
:
1
)
}
else
{
}
}
return
cell
return
cell
}
}
...
@@ -817,5 +829,47 @@ extension YHCertificateAppointViewController {
...
@@ -817,5 +829,47 @@ extension YHCertificateAppointViewController {
YHHUD
.
flash
(
message
:
msg
)
YHHUD
.
flash
(
message
:
msg
)
}
}
}
}
// 请求抢号成功后的反馈回执文件私链URL组对应的公链组
func
requestSuccessScriptUrls
()
{
printLog
(
"XYZ0"
)
if
self
.
successList
.
count
<=
0
{
return
}
self
.
semaphore
=
DispatchSemaphore
(
value
:
1
)
DispatchQueue
.
global
()
.
async
{
for
model
in
self
.
successList
{
var
publicUrls
:[
String
]
=
[]
for
privateUrl
in
model
.
receipts
{
// 信号-1 如果信号<0 则阻塞等待
self
.
semaphore
.
wait
()
self
.
viewModel
.
getPublicImageUrl
(
privateUrl
)
{
success
,
error
in
printLog
(
"success:
\n\(
success
)
"
)
if
let
publicUrl
=
success
{
printLog
(
"ABC: success"
)
publicUrls
.
append
(
publicUrl
)
}
else
{
// 私链转公链失败 只有在点击对应的回执图片的时候再次请求公链
printLog
(
"ABC: failed"
)
publicUrls
.
append
(
""
)
}
// 释放信号+1
self
.
semaphore
.
signal
()
}
}
self
.
semaphore
.
wait
()
model
.
publicReceipts
=
publicUrls
self
.
semaphore
.
signal
()
}
DispatchQueue
.
main
.
async
{
self
.
tableView
.
reloadData
()
self
.
semaphore
.
wait
()
}
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/M/YHAppointHKResultModel.swift
View file @
23d8066e
...
@@ -38,8 +38,21 @@ class YHAppointMemberGroupModel: SmartCodable {
...
@@ -38,8 +38,21 @@ class YHAppointMemberGroupModel: SmartCodable {
var
immigrationOffice
:
String
=
""
var
immigrationOffice
:
String
=
""
var
wantImmigrationOffice
:
String
=
""
var
wantImmigrationOffice
:
String
=
""
var
goTime
:
String
=
""
var
goTime
:
String
=
""
// 此处是私链URL数组
var
receipts
:
[
String
]
=
[]
var
receipts
:
[
String
]
=
[]
var
submitTime
:
String
=
""
var
submitTime
:
String
=
""
// 自定义
// 私链反馈回执对应的公链
var
publicReceipts
:
[
String
]
=
[]
// 公链数组中是否有空链
func
hasEmptyPublicReceipte
()
->
Bool
{
let
filterArr
=
publicReceipts
.
filter
{
return
$0
.
isEmpty
}
return
filterArr
.
count
>
0
}
enum
CodingKeys
:
String
,
CodingKey
{
enum
CodingKeys
:
String
,
CodingKey
{
case
id
=
"id"
case
id
=
"id"
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/V/YHGrabFileCell.swift
View file @
23d8066e
...
@@ -13,10 +13,20 @@ class YHGrabFileCell: UICollectionViewCell {
...
@@ -13,10 +13,20 @@ class YHGrabFileCell: UICollectionViewCell {
static
let
cellReuseIdentifier
=
"YHGrabFileCell"
static
let
cellReuseIdentifier
=
"YHGrabFileCell"
lazy
var
fileImgView
:
UIImageView
=
{
lazy
var
fileImgView
:
UIImageView
=
{
let
view
=
UIImageView
(
image
:
UIImage
(
named
:
""
))
let
view
=
UIImageView
(
image
:
UIImage
(
named
:
"
global_default_image
"
))
return
view
return
view
}()
}()
var
fileUrl
:
String
=
""
{
didSet
{
if
let
url
=
URL
(
string
:
fileUrl
)
{
fileImgView
.
sd_setImage
(
with
:
url
,
placeholderImage
:
UIImage
(
named
:
"global_default_image"
))
}
else
{
fileImgView
.
image
=
UIImage
(
named
:
"global_default_image"
)
}
}
}
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
createUI
()
createUI
()
...
@@ -27,12 +37,15 @@ class YHGrabFileCell: UICollectionViewCell {
...
@@ -27,12 +37,15 @@ class YHGrabFileCell: UICollectionViewCell {
}
}
func
createUI
()
{
func
createUI
()
{
self
.
layer
.
cornerRadius
=
5.0
self
.
layer
.
cornerRadius
=
5.0
self
.
layer
.
borderWidth
=
0.5
self
.
layer
.
borderWidth
=
1.0
self
.
layer
.
borderColor
=
UIColor
.
init
(
hex
:
0xD8D8D8
)
.
cgColor
self
.
layer
.
borderColor
=
UIColor
.
init
(
hex
:
0xD8D8D8
)
.
cgColor
self
.
clipsToBounds
=
true
self
.
addSubview
(
fileImgView
)
self
.
addSubview
(
fileImgView
)
fileImgView
.
snp
.
makeConstraints
{
make
in
fileImgView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
make
.
edges
.
equalToSuperview
()
}
}
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/V/YHGrabNumberInfoView.swift
View file @
23d8066e
...
@@ -18,17 +18,19 @@ class YHGrabItem {
...
@@ -18,17 +18,19 @@ class YHGrabItem {
var
type
:
YHGrabItemViewType
=
.
info
var
type
:
YHGrabItemViewType
=
.
info
var
title
:
String
=
""
var
title
:
String
=
""
var
detail
:
String
=
""
var
detail
:
String
=
""
var
files
:[
String
]
=
[]
var
files
:
[
String
]
=
[]
var
publicFiles
:
[
String
]
=
[]
required
init
()
{
required
init
()
{
}
}
init
(
type
:
YHGrabItemViewType
,
title
:
String
,
detail
:
String
,
files
:[
String
]
=
[])
{
init
(
type
:
YHGrabItemViewType
,
title
:
String
,
detail
:
String
,
files
:[
String
]
=
[]
,
publicFiles
:[
String
]
=
[]
)
{
self
.
type
=
type
self
.
type
=
type
self
.
title
=
title
self
.
title
=
title
self
.
detail
=
detail
self
.
detail
=
detail
self
.
files
=
files
self
.
files
=
files
self
.
publicFiles
=
publicFiles
}
}
}
}
...
@@ -41,6 +43,8 @@ class YHGrabNumberInfoItemView: UIView {
...
@@ -41,6 +43,8 @@ class YHGrabNumberInfoItemView: UIView {
let
gap
=
8.0
let
gap
=
8.0
let
fileWidth
=
floorl
((
KScreenWidth
-
48.0
*
2.0
-
8.0
*
3.0
)
/
4.0
)
let
fileWidth
=
floorl
((
KScreenWidth
-
48.0
*
2.0
-
8.0
*
3.0
)
/
4.0
)
let
viewModel
=
YHBaseViewModel
()
var
item
:
YHGrabItem
=
YHGrabItem
()
var
item
:
YHGrabItem
=
YHGrabItem
()
lazy
var
collectionView
:
UICollectionView
=
{
lazy
var
collectionView
:
UICollectionView
=
{
...
@@ -150,7 +154,7 @@ class YHGrabNumberInfoItemView: UIView {
...
@@ -150,7 +154,7 @@ class YHGrabNumberInfoItemView: UIView {
make
.
width
.
height
.
equalTo
(
dotWidth
)
make
.
width
.
height
.
equalTo
(
dotWidth
)
make
.
centerY
.
equalTo
(
detailLabel
)
make
.
centerY
.
equalTo
(
detailLabel
)
make
.
right
.
equalTo
(
detailLabel
.
snp
.
left
)
.
offset
(
-
4
)
make
.
right
.
equalTo
(
detailLabel
.
snp
.
left
)
.
offset
(
-
4
)
//
make.left.greaterThanOrEqualTo(titleLabel.snp.right).offset(0)
make
.
left
.
greaterThanOrEqualTo
(
titleLabel
.
snp
.
right
)
.
offset
(
0
)
}
}
collectionView
.
snp
.
makeConstraints
{
make
in
collectionView
.
snp
.
makeConstraints
{
make
in
...
@@ -270,14 +274,38 @@ extension YHGrabNumberInfoItemView: UICollectionViewDelegate, UICollectionViewDa
...
@@ -270,14 +274,38 @@ extension YHGrabNumberInfoItemView: UICollectionViewDelegate, UICollectionViewDa
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHGrabFileCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHGrabFileCell
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHGrabFileCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHGrabFileCell
if
0
<=
indexPath
.
item
&&
indexPath
.
item
<
item
.
files
.
count
{
if
0
<=
indexPath
.
item
&&
indexPath
.
item
<
item
.
files
.
count
{
let
url
=
item
.
files
[
indexPath
.
item
]
let
url
=
item
.
files
[
indexPath
.
item
]
if
item
.
publicFiles
.
count
==
item
.
files
.
count
{
// 公链组和私链组数量一致
let
publicUrl
=
item
.
publicFiles
[
indexPath
.
item
]
cell
.
fileUrl
=
publicUrl
}
else
{
cell
.
fileUrl
=
""
}
}
}
return
cell
return
cell
}
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
if
0
<=
indexPath
.
item
&&
indexPath
.
item
<
item
.
files
.
count
{
if
0
<=
indexPath
.
item
&&
indexPath
.
item
<
item
.
files
.
count
{
let
text
=
item
.
files
[
indexPath
.
item
]
let
privateUrl
=
item
.
files
[
indexPath
.
item
]
if
item
.
publicFiles
.
count
==
item
.
files
.
count
{
// 公链组和私链组数量一致
let
publicUrl
=
item
.
publicFiles
[
indexPath
.
item
]
if
!
publicUrl
.
isEmpty
{
YHPictureReviewManager
.
shared
.
showNetWorkPicturs
(
curIndex
:
indexPath
.
item
,
arrPicturs
:
item
.
publicFiles
)
}
else
{
// 当前公链为空 仅请求当前点击文件公链
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
self
.
viewModel
.
getPublicImageUrl
(
privateUrl
)
{
success
,
error
in
YHHUD
.
hide
()
if
let
success
=
success
{
self
.
item
.
publicFiles
[
indexPath
.
item
]
=
success
}
self
.
collectionView
.
reloadData
()
YHPictureReviewManager
.
shared
.
showNetWorkPicturs
(
curIndex
:
indexPath
.
item
,
arrPicturs
:
self
.
item
.
publicFiles
)
}
}
}
}
}
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/V/YHHaveGrabbedNumberListCell.swift
View file @
23d8066e
...
@@ -16,6 +16,7 @@ class YHHaveGrabbedNumberListCell: UITableViewCell {
...
@@ -16,6 +16,7 @@ class YHHaveGrabbedNumberListCell: UITableViewCell {
didSet
{
didSet
{
listContainView
.
removeSubviews
()
listContainView
.
removeSubviews
()
var
lastView
:
YHHaveGrabbedNumberInfoView
?
=
nil
var
lastView
:
YHHaveGrabbedNumberInfoView
?
=
nil
for
(
index
,
group
)
in
listArr
.
enumerated
()
{
for
(
index
,
group
)
in
listArr
.
enumerated
()
{
let
listView
=
YHHaveGrabbedNumberInfoView
(
frame
:
.
zero
)
let
listView
=
YHHaveGrabbedNumberInfoView
(
frame
:
.
zero
)
let
chineseNum
=
convertNumberToChineseText
(
index
+
1
)
let
chineseNum
=
convertNumberToChineseText
(
index
+
1
)
...
@@ -25,7 +26,7 @@ class YHHaveGrabbedNumberListCell: UITableViewCell {
...
@@ -25,7 +26,7 @@ class YHHaveGrabbedNumberListCell: UITableViewCell {
// 抢号信息
// 抢号信息
let
items1
=
[
YHGrabItem
(
type
:
.
info
,
title
:
"赴港时间:"
,
detail
:
group
.
goTime
),
let
items1
=
[
YHGrabItem
(
type
:
.
info
,
title
:
"赴港时间:"
,
detail
:
group
.
goTime
),
YHGrabItem
(
type
:
.
info
,
title
:
"香港入境处:"
,
detail
:
group
.
immigrationOffice
),
YHGrabItem
(
type
:
.
info
,
title
:
"香港入境处:"
,
detail
:
group
.
immigrationOffice
),
YHGrabItem
(
type
:
.
files
,
title
:
"抢号反馈回执:"
,
detail
:
""
,
files
:
group
.
receipts
),
]
YHGrabItem
(
type
:
.
files
,
title
:
"抢号反馈回执:"
,
detail
:
""
,
files
:
group
.
receipts
,
publicFiles
:
group
.
publicReceipts
)
]
listView
.
grabInfoView
.
updateItems
(
items1
)
listView
.
grabInfoView
.
updateItems
(
items1
)
// 意向信息
// 意向信息
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/VM/YHCerAppointViewModel.swift
View file @
23d8066e
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
import
UIKit
import
UIKit
class
YHCerAppointViewModel
:
NSObject
{
class
YHCerAppointViewModel
:
YHBaseViewModel
{
var
serviceArr
:
[
YHServiceItem
]
=
[]
var
serviceArr
:
[
YHServiceItem
]
=
[]
var
hkUsers
:
[
YHHKMemberModel
]
=
[]
var
hkUsers
:
[
YHHKMemberModel
]
=
[]
...
@@ -209,7 +209,7 @@ class YHCerAppointViewModel: NSObject {
...
@@ -209,7 +209,7 @@ class YHCerAppointViewModel: NSObject {
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
AppointHK
.
appointResult
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
AppointHK
.
appointResult
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
code
in
json
,
code
in
printLog
(
"model 是 ==>
\(
json
)
"
)
printLog
(
"model 是 ==>
\(
json
)
"
)
...
...
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