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
6d1c606b
Commit
6d1c606b
authored
Oct 17, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传旅行证件相关bug修复
parent
7f0c0169
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
19 deletions
+62
-19
YHResignUploadTravelHKViewController.swift
...Crad(上传旅行证件)/C/YHResignUploadTravelHKViewController.swift
+26
-15
YHResignUploadTravelPassportViewController.swift
...传旅行证件)/C/YHResignUploadTravelPassportViewController.swift
+12
-2
YHResignUploadTravelGuideView.swift
...dTravelCrad(上传旅行证件)/V/YHResignUploadTravelGuideView.swift
+1
-1
YHResignUploadTravelHKTableViewCell.swift
...lCrad(上传旅行证件)/V/YHResignUploadTravelHKTableViewCell.swift
+21
-1
YHResignUploadTravelPassportTableViewCell.swift
...上传旅行证件)/V/YHResignUploadTravelPassportTableViewCell.swift
+2
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/UploadTravelCrad(上传旅行证件)/C/YHResignUploadTravelHKViewController.swift
View file @
6d1c606b
...
@@ -97,15 +97,14 @@ class YHResignUploadTravelHKViewController: YHBaseViewController {
...
@@ -97,15 +97,14 @@ class YHResignUploadTravelHKViewController: YHBaseViewController {
func
getTextWithType
(
type
:
Int
,
date
:
String
)
->
ASAttributedString
{
func
getTextWithType
(
type
:
Int
,
date
:
String
)
->
ASAttributedString
{
if
type
==
0
{
if
type
==
0
{
return
.
init
(
"上传《港澳通行证》(
需
有效期≥
\(
date
)
)"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
(
alpha
:
0.5
)))
return
.
init
(
"上传《港澳通行证》(
背面逗留D签注
有效期≥
\(
date
)
)"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
(
alpha
:
0.5
)))
}
}
if
type
==
1
{
if
type
==
1
{
let
a
=
ASAttributedString
.
init
(
"
办理逗留D签注延期(有效期≥签证时长)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor50
))
let
a
=
ASAttributedString
.
init
(
"
点击查看办理逗留D签注延期
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor50
))
let
b
=
ASAttributedString
.
init
(
"《"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
brandMainColor
))
let
b
=
ASAttributedString
.
init
(
"《"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
brandMainColor
))
let
c
=
ASAttributedString
.
init
(
"港澳通行证逗留(D)签注延期-办理指引"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
brandMainColor
),
.
underline
(
.
single
),
.
action
{
let
c
=
ASAttributedString
.
init
(
"港澳通行证逗留(D)签注延期-办理指引"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
brandMainColor
),
.
underline
(
.
single
),
.
action
{
//跳转提示
//跳转提示
YHHUD
.
flash
(
message
:
"弹窗提示"
)
let
view
=
YHResignUploadTravelGuideView
.
sheetView
()
let
view
=
YHResignUploadTravelGuideView
.
sheetView
()
view
.
show
()
view
.
show
()
})
})
...
@@ -141,17 +140,26 @@ class YHResignUploadTravelHKViewController: YHBaseViewController {
...
@@ -141,17 +140,26 @@ class YHResignUploadTravelHKViewController: YHBaseViewController {
// 头部提示
// 头部提示
tipsArr
=
getTipsWithType
(
date
:
self
.
dataModel
.
latest_validaty_date
)
tipsArr
=
getTipsWithType
(
date
:
self
.
dataModel
.
latest_validaty_date
)
tableView
.
reloadData
()
tableView
.
reloadData
()
}
}
// travel_cert_type 证件类型 0-未知 1-护照 3-港澳通行证
}
// nationality : Int = -1 国籍 1-中国 2-国外
func
updateAllViews
()
{
if
dataModel
.
img_front
.
count
!=
0
{
urls
[
0
]
=
dataModel
.
img_front
}
if
dataModel
.
img_back
.
count
!=
0
{
urls
[
1
]
=
dataModel
.
img_back
}
self
.
data
=
viewModel
.
getBaseDataSource
(
isShowPrompt
)
// 头部提示
tipsArr
=
getTipsWithType
(
date
:
self
.
dataModel
.
latest_validaty_date
)
tableView
.
reloadData
()
}
}
@objc
func
didSaveBtnClicked
()
{
@objc
func
didSaveBtnClicked
()
{
if
!
checkInfo
()
{
if
!
checkInfo
()
{
isShowPrompt
=
true
isShowPrompt
=
true
update
Data
()
update
AllViews
()
return
return
}
}
...
@@ -160,11 +168,11 @@ class YHResignUploadTravelHKViewController: YHBaseViewController {
...
@@ -160,11 +168,11 @@ class YHResignUploadTravelHKViewController: YHBaseViewController {
func
checkInfo
()
->
Bool
{
func
checkInfo
()
->
Bool
{
if
urls
.
first
?
.
count
==
0
{
if
urls
.
first
?
.
count
==
0
{
failString
=
"请港澳通行证正面"
failString
=
"请
上传
港澳通行证正面"
return
false
return
false
}
}
if
urls
.
last
?
.
count
==
0
{
if
urls
.
last
?
.
count
==
0
{
failString
=
"请
港澳通行证背
面"
failString
=
"请
上传港澳通行证反
面"
return
false
return
false
}
}
if
self
.
viewModel
.
dataModel
.
issue_start
.
count
==
0
{
if
self
.
viewModel
.
dataModel
.
issue_start
.
count
==
0
{
...
@@ -244,7 +252,7 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView
...
@@ -244,7 +252,7 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView
cell
.
firstImageName
=
"service_adopter_card_travel_front"
cell
.
firstImageName
=
"service_adopter_card_travel_front"
cell
.
lastImageName
=
"service_adopter_card_travel_back"
cell
.
lastImageName
=
"service_adopter_card_travel_back"
cell
.
firstLabelName
=
"港澳通行证正面"
cell
.
firstLabelName
=
"港澳通行证正面"
cell
.
lastLabelName
=
"港澳通行证
倍
面"
cell
.
lastLabelName
=
"港澳通行证
反
面"
cell
.
dataModel
=
dataModel
cell
.
dataModel
=
dataModel
cell
.
failString
=
failString
cell
.
failString
=
failString
cell
.
data
=
data
cell
.
data
=
data
...
@@ -265,26 +273,29 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView
...
@@ -265,26 +273,29 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView
if
!
result
.
end_of_term
.
isEmpty
{
if
!
result
.
end_of_term
.
isEmpty
{
self
.
dataModel
.
issue_end
=
result
.
end_of_term
self
.
dataModel
.
issue_end
=
result
.
end_of_term
}
}
self
.
failString
=
""
}
else
{
}
else
{
// OCR 无法识别
// OCR 无法识别
self
.
failString
=
"非逗留(D
)签证,请检
查文件"
self
.
failString
=
"非逗留(D
)签证,请核
查文件"
}
}
self
.
update
Data
()
self
.
update
AllViews
()
}
}
}
else
{
}
else
{
self
.
viewModel
.
getHKCardBackInfoByOcr
(
url
,
isBack
:
1
)
{
success
,
result
in
self
.
viewModel
.
getHKCardBackInfoByOcr
(
url
,
isBack
:
1
)
{
success
,
result
in
YHHUD
.
hide
()
YHHUD
.
hide
()
if
success
,
let
result
=
result
{
if
success
,
let
result
=
result
{
if
!
result
.
back_term_begins
.
isEmpty
{
self
.
dataModel
.
visa_start
=
result
.
back_term_begins
if
!
result
.
back_term_begins
.
isEmpty
{
self
.
dataModel
.
visa_start
=
result
.
back_term_begins
}
}
if
!
result
.
back_end_of_term
.
isEmpty
{
if
!
result
.
back_end_of_term
.
isEmpty
{
self
.
dataModel
.
visa_end
=
result
.
back_end_of_term
self
.
dataModel
.
visa_end
=
result
.
back_end_of_term
}
}
self
.
failString
=
""
}
else
{
}
else
{
// OCR 无法识别
// OCR 无法识别
self
.
failString
=
"非逗留(D
)签证,请检
查文件"
self
.
failString
=
"非逗留(D
)签证,请核
查文件"
}
}
self
.
update
Data
()
self
.
update
AllViews
()
}
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/UploadTravelCrad(上传旅行证件)/C/YHResignUploadTravelPassportViewController.swift
View file @
6d1c606b
...
@@ -98,7 +98,7 @@ class YHResignUploadTravelPassportViewController: YHBaseViewController {
...
@@ -98,7 +98,7 @@ class YHResignUploadTravelPassportViewController: YHBaseViewController {
func
getTextWithType
(
type
:
Int
,
date
:
String
)
->
ASAttributedString
{
func
getTextWithType
(
type
:
Int
,
date
:
String
)
->
ASAttributedString
{
if
type
==
0
{
if
type
==
0
{
return
.
init
(
"上传《护照》(需有效期≥
最新签证逗留截止日
)"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
(
alpha
:
0.5
)))
return
.
init
(
"上传《护照》(需有效期≥
\(
date
)
)"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
(
alpha
:
0.5
)))
}
}
return
.
init
(
""
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
(
alpha
:
0.5
)))
return
.
init
(
""
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
(
alpha
:
0.5
)))
...
@@ -132,10 +132,20 @@ class YHResignUploadTravelPassportViewController: YHBaseViewController {
...
@@ -132,10 +132,20 @@ class YHResignUploadTravelPassportViewController: YHBaseViewController {
}
}
func
updateAllViews
()
{
if
dataModel
.
img_front
.
count
!=
0
{
urls
[
0
]
=
dataModel
.
img_front
}
self
.
data
=
viewModel
.
getPassPortDataSource
(
isShowPrompt
)
// 头部提示
tipsArr
=
getTipsWithType
(
date
:
self
.
dataModel
.
latest_validaty_date
)
tableView
.
reloadData
()
}
@objc
func
didSaveBtnClicked
()
{
@objc
func
didSaveBtnClicked
()
{
if
!
checkInfo
()
{
if
!
checkInfo
()
{
isShowPrompt
=
true
isShowPrompt
=
true
update
Data
()
update
AllViews
()
return
return
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/UploadTravelCrad(上传旅行证件)/V/YHResignUploadTravelGuideView.swift
View file @
6d1c606b
...
@@ -176,7 +176,7 @@ private extension YHResignUploadTravelGuideView {
...
@@ -176,7 +176,7 @@ private extension YHResignUploadTravelGuideView {
func
setButtonEnable
(
_
enable
:
Bool
)
{
func
setButtonEnable
(
_
enable
:
Bool
)
{
rewardBtn
.
isEnabled
=
enable
rewardBtn
.
isEnabled
=
enable
if
enable
{
if
enable
{
rewardBtn
.
setTitle
(
"
我已知悉,确认
"
,
for
:
.
normal
)
rewardBtn
.
setTitle
(
"
知道了
"
,
for
:
.
normal
)
rewardBtn
.
backgroundColor
=
UIColor
.
brandMainColor
rewardBtn
.
backgroundColor
=
UIColor
.
brandMainColor
}
else
{
}
else
{
rewardBtn
.
setTitle
(
"请上滑看完指引后操作(5s)"
,
for
:
.
normal
)
rewardBtn
.
setTitle
(
"请上滑看完指引后操作(5s)"
,
for
:
.
normal
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/UploadTravelCrad(上传旅行证件)/V/YHResignUploadTravelHKTableViewCell.swift
View file @
6d1c606b
...
@@ -65,6 +65,24 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
...
@@ -65,6 +65,24 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
var
urls
:
[
String
]?
{
var
urls
:
[
String
]?
{
didSet
{
didSet
{
guard
let
firstUrl
=
urls
?
.
first
,
firstUrl
.
count
!=
0
else
{
guard
let
firstUrl
=
urls
?
.
first
,
firstUrl
.
count
!=
0
else
{
guard
let
lastUrl
=
urls
?
.
last
,
lastUrl
.
count
!=
0
else
{
cardLabel
.
isHidden
=
true
signLabel
.
isHidden
=
true
cardBeginView
.
isHidden
=
true
cardEndView
.
isHidden
=
true
signBeginView
.
isHidden
=
true
signEndView
.
isHidden
=
true
return
}
self
.
lastUrl
=
lastUrl
self
.
viewModel
.
getPublicImageUrl
(
lastUrl
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
backSurfaceImageButton
.
kf
.
setBackgroundImage
(
with
:
URL
(
string
:
url
),
for
:
.
normal
,
completionHandler
:
{
_
in
self
.
backSurfaceDeleteButton
.
isHidden
=
false
})
self
.
backSurfaceImageButton
.
setContent
(
""
,
""
)
}
cardLabel
.
isHidden
=
true
cardLabel
.
isHidden
=
true
signLabel
.
isHidden
=
true
signLabel
.
isHidden
=
true
cardBeginView
.
isHidden
=
true
cardBeginView
.
isHidden
=
true
...
@@ -494,7 +512,9 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
...
@@ -494,7 +512,9 @@ class YHResignUploadTravelHKTableViewCell: UITableViewCell {
if
let
block
=
self
.
block
{
if
let
block
=
self
.
block
{
block
(
model
)
block
(
model
)
if
self
.
compareDates
(
dateString1
:
model
.
message
??
""
,
dateString2
:
self
.
dataModel
.
latest_validaty_date
)
{
if
self
.
compareDates
(
dateString1
:
model
.
message
??
""
,
dateString2
:
self
.
dataModel
.
latest_validaty_date
)
{
if
failString
==
"签注有效期不足,需要为
\(
self
.
dataModel
.
latest_validaty_date
)
或以后"
{
failString
=
""
}
}
else
{
}
else
{
failString
=
"签注有效期不足,需要为
\(
self
.
dataModel
.
latest_validaty_date
)
或以后"
failString
=
"签注有效期不足,需要为
\(
self
.
dataModel
.
latest_validaty_date
)
或以后"
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/UploadTravelCrad(上传旅行证件)/V/YHResignUploadTravelPassportTableViewCell.swift
View file @
6d1c606b
...
@@ -307,7 +307,9 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell {
...
@@ -307,7 +307,9 @@ class YHResignUploadTravelPassportTableViewCell: UITableViewCell {
if
let
block
=
self
.
block
{
if
let
block
=
self
.
block
{
block
(
model
)
block
(
model
)
if
self
.
compareDates
(
dateString1
:
model
.
message
??
""
,
dateString2
:
self
.
dataModel
.
latest_validaty_date
)
{
if
self
.
compareDates
(
dateString1
:
model
.
message
??
""
,
dateString2
:
self
.
dataModel
.
latest_validaty_date
)
{
if
failString
==
"有效期不足,需要为
\(
self
.
dataModel
.
latest_validaty_date
)
或以后"
{
failString
=
""
failString
=
""
}
}
else
{
}
else
{
failString
=
"有效期不足,需要为
\(
self
.
dataModel
.
latest_validaty_date
)
或以后"
failString
=
"有效期不足,需要为
\(
self
.
dataModel
.
latest_validaty_date
)
或以后"
}
}
...
...
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