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
448dfb43
Commit
448dfb43
authored
Jan 14, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
赴港计划书优化默认保存
parent
75978f19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
YHHKPlanDoctumentVC.swift
...心)/QMAS(优才)/MyDocuments(我的文书)/C/YHHKPlanDoctumentVC.swift
+68
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/MyDocuments(我的文书)/C/YHHKPlanDoctumentVC.swift
View file @
448dfb43
...
@@ -26,6 +26,7 @@ class YHHKPlanDoctumentVC: YHBaseViewController {
...
@@ -26,6 +26,7 @@ class YHHKPlanDoctumentVC: YHBaseViewController {
private
var
timer
:
Timer
?
private
var
timer
:
Timer
?
private
var
finishHandleFlag
:
Bool
=
true
private
var
finishHandleFlag
:
Bool
=
true
private
var
isSaving
:
Bool
=
false
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
...
@@ -50,6 +51,38 @@ class YHHKPlanDoctumentVC: YHBaseViewController {
...
@@ -50,6 +51,38 @@ class YHHKPlanDoctumentVC: YHBaseViewController {
cancelTimer
()
cancelTimer
()
}
}
override
func
backItemClick
(
_
sender
:
Any
)
{
guard
!
isSaving
else
{
return
}
isSaving
=
true
saveOp
{
[
weak
self
]
_
in
self
?
.
isSaving
=
false
if
let
navigationController
=
self
?
.
navigationController
{
navigationController
.
popViewController
(
animated
:
true
)
}
else
{
self
?
.
dismiss
(
animated
:
true
)
}
}
}
/// 是否可以返回,包括点击返回和手势返回,默认YES
override
func
navigationShouldPop
()
->
Bool
{
guard
!
isSaving
else
{
return
false
}
isSaving
=
true
saveOp
{
[
weak
self
]
_
in
self
?
.
isSaving
=
false
if
let
navigationController
=
self
?
.
navigationController
{
navigationController
.
popViewController
(
animated
:
true
)
}
else
{
self
?
.
dismiss
(
animated
:
true
)
}
}
return
false
}
private
var
bottomView
:
UIView
=
{
private
var
bottomView
:
UIView
=
{
let
view
=
UIView
()
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
backgroundColor
=
.
white
...
@@ -155,6 +188,41 @@ extension YHHKPlanDoctumentVC {
...
@@ -155,6 +188,41 @@ extension YHHKPlanDoctumentVC {
return
false
return
false
}
}
//保存数据
private
func
saveOp
(
completion
:
@escaping
(
Bool
)
->
Void
)
{
if
let
orderID
=
UserDefaults
.
standard
.
value
(
forKey
:
"orderIdForPreview"
)
{
let
params
=
[
"order_id"
:
orderID
,
"supplement_id"
:
supplement_id
,
"career_achievement"
:
viewModel
.
arrHKPlanData
[
0
]
.
content
,
"academic_achievement"
:
viewModel
.
arrHKPlanData
[
1
]
.
content
,
"qualifications_and_awards"
:
viewModel
.
arrHKPlanData
[
2
]
.
content
,
"professional_skills"
:
viewModel
.
arrHKPlanData
[
3
]
.
content
,
"visa_contribution"
:
viewModel
.
arrHKPlanData
[
4
]
.
content
,
"plan_detail"
:
viewModel
.
arrHKPlanData
[
5
]
.
content
,
"other"
:
viewModel
.
arrHKPlanData
[
6
]
.
content
,
"content_save"
:
0
]
YHHUD
.
show
(
.
progress
(
message
:
""
))
viewModel
.
submitHKPlanDocument
(
params
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
YHHUD
.
hide
()
if
success
{
YHHUD
.
flash
(
message
:
"保存成功"
)
self
.
getData
()
completion
(
true
)
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
"保存失败"
)
completion
(
false
)
}
}
}
else
{
YHHUD
.
flash
(
message
:
"订单ID 为空"
)
completion
(
false
)
}
}
//提交数据
//提交数据
private
func
submitOp
()
{
private
func
submitOp
()
{
...
...
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