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
ece05fbb
Commit
ece05fbb
authored
Mar 05, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主申请人国家搜索优化 字段校验优化
parent
ab4fbb8c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
63 deletions
+44
-63
YHSelectCountryViewController.swift
...Information(主申请人信息)/C/YHSelectCountryViewController.swift
+2
-2
YHMainApplicantInformationViewModel.swift
...tion(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
+39
-58
YHSelectCountryViewModel.swift
...cantInformation(主申请人信息)/VM/YHSelectCountryViewModel.swift
+3
-3
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/C/YHSelectCountryViewController.swift
View file @
ece05fbb
...
...
@@ -138,7 +138,7 @@ extension YHSelectCountryViewController: UITableViewDelegate, UITableViewDataSou
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHCountryTableViewCell
.
self
)
let
cn
=
searchDataSource
?[
indexPath
.
row
]
.
name_cn
??
""
let
en
=
searchDataSource
?[
indexPath
.
row
]
.
name_en
??
""
cell
.
titleLabel
.
text
=
cn
+
en
cell
.
titleLabel
.
text
=
cn
+
"-"
+
en
return
cell
}
...
...
@@ -149,7 +149,7 @@ extension YHSelectCountryViewController: UITableViewDelegate, UITableViewDataSou
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
cn
=
searchDataSource
?[
indexPath
.
row
]
.
name_cn
??
""
let
en
=
searchDataSource
?[
indexPath
.
row
]
.
name_en
??
""
let
text
=
cn
+
en
let
text
=
cn
+
"-"
+
en
if
let
backLocationStringController
=
backLocationStringController
{
backLocationStringController
(
text
)
self
.
navigationController
?
.
popViewController
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
View file @
ece05fbb
...
...
@@ -286,10 +286,12 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
}
func
requestMainInformation
(
_
orderID
:
String
,
callBackBlock
:
@escaping
(
_
success
:
YHMainInformationModel
?,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
OrderInformation
.
getInformation
+
"?order_id=
\(
orderID
)
"
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
OrderInformation
.
getInformation
let
param
:
[
String
:
Any
]
=
[
"order_id"
:
orderID
]
// let strUrl = "http://192.168.25.48:18088/" + YHAllApiName.OrderInformation.getInformation + "?order_id=\(orderID)"
// let params: [String : Any] = ["order_id": orderID]
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
param
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
...
...
@@ -479,20 +481,16 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let
area
=
mainModel
.
address
.
area
let
details
=
mainModel
.
address
.
details
let
foreign
=
mainModel
.
address
.
foreign
let
is_live_oversea_year
=
mainModel
.
is_live_oversea_year
let
has_hk_id
=
mainModel
.
has_hk_id
let
is_handled
=
mainModel
.
is_handled
guard
nationality
.
count
>
0
else
{
return
false
}
guard
country
.
count
>
0
else
{
return
false
}
if
country
.
contains
(
"中国"
)
{
if
nationality
.
count
!=
0
&&
country
.
count
!=
0
&&
area
.
count
!=
0
&&
details
.
count
!=
0
{
return
true
}
else
{
return
false
}
guard
area
.
count
>
0
else
{
return
false
}
guard
details
.
count
>
0
else
{
return
false
}
return
true
}
else
{
if
nationality
.
count
!=
0
&&
country
.
count
!=
0
&&
foreign
.
count
!=
0
{
return
true
}
else
{
return
false
}
guard
foreign
.
count
>
0
else
{
return
false
}
return
true
}
}
else
if
step
==
1
{
return
true
...
...
@@ -511,27 +509,25 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let
passport_issue_date_start_at
=
mainModel
.
certificates
.
passport
.
issue_date_start_at
let
passport_issue_date_end_at
=
mainModel
.
certificates
.
passport
.
issue_date_end_at
let
nationality
=
mainModel
.
nationality
if
self
.
mainModel
.
is_handled
==
1
{
guard
hk_macao_pass_number
.
count
>
0
else
{
return
false
}
guard
hk_macao_pass_issue_at
.
count
>
0
else
{
return
false
}
guard
hk_macao_pass_issue_date_start_at
.
count
>
0
else
{
return
false
}
guard
hk_macao_pass_issue_date_end_at
.
count
>
0
else
{
return
false
}
}
if
nationality
.
contains
(
"中国"
)
{
if
mainModel
.
has_hk_id
==
1
{
if
cn_identity_card_number
.
count
!=
0
&&
cn_identity_card_issue_at
.
count
!=
0
&&
cn_identity_card_issue_date_start_at
.
count
!=
0
&&
cn_identity_card_issue_date_end_at
.
count
!=
0
&&
hk_macao_pass_number
.
count
!=
0
&&
hk_macao_pass_issue_at
.
count
!=
0
&&
hk_macao_pass_issue_date_start_at
.
count
!=
0
&&
hk_macao_pass_issue_date_end_at
.
count
!=
0
{
return
true
}
else
{
return
false
}
}
else
{
if
cn_identity_card_number
.
count
!=
0
&&
cn_identity_card_issue_at
.
count
!=
0
&&
cn_identity_card_issue_date_start_at
.
count
!=
0
&&
cn_identity_card_issue_date_end_at
.
count
!=
0
{
return
true
}
else
{
return
false
}
}
guard
cn_identity_card_number
.
count
>
0
else
{
return
false
}
guard
cn_identity_card_issue_at
.
count
>
0
else
{
return
false
}
guard
cn_identity_card_issue_date_start_at
.
count
>
0
else
{
return
false
}
guard
cn_identity_card_issue_date_end_at
.
count
>
0
else
{
return
false
}
}
else
{
if
passport_type
.
count
!=
0
&&
passport_number
.
count
!=
0
&&
passport_issue_at
.
count
!=
0
&&
passport_issue_date_start_at
.
count
!=
0
&&
passport_issue_date_end_at
.
count
!=
0
{
return
true
}
else
{
return
false
}
guard
passport_type
.
count
>
0
else
{
return
false
}
guard
passport_number
.
count
>
0
else
{
return
false
}
guard
passport_issue_at
.
count
>
0
else
{
return
false
}
guard
passport_issue_date_start_at
.
count
>
0
else
{
return
false
}
guard
passport_issue_date_end_at
.
count
>
0
else
{
return
false
}
}
return
true
}
else
{
let
username
=
mainModel
.
username
let
birthday
=
mainModel
.
birthday
...
...
@@ -544,35 +540,20 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let
email
=
mainModel
.
email
let
has_hk_id
=
mainModel
.
has_hk_id
let
hk_id_numbe
=
mainModel
.
hk_id_number
guard
username
.
count
>
0
else
{
return
false
}
guard
birthday
.
count
>
0
else
{
return
false
}
guard
sex
>
0
else
{
return
false
}
guard
email
.
count
>
0
else
{
return
false
}
guard
mobile
.
count
>
0
else
{
return
false
}
if
birth_place_aboard
==
1
{
if
username
.
count
!=
0
&&
birthday
.
count
!=
0
&&
birth_place_foreign
.
count
!=
0
&&
mobile
.
count
!=
0
&&
email
.
count
!=
0
{
if
has_hk_id
==
1
{
if
hk_id_numbe
.
isHKIdentityCardNumber
()
{
return
true
}
else
{
return
false
}
}
else
{
return
true
}
}
else
{
return
false
}
guard
birth_place_foreign
.
count
>
0
else
{
return
false
}
}
else
{
if
username
.
count
!=
0
&&
birthday
.
count
!=
0
&&
birth_place_area
.
count
!=
0
&&
mobile
.
count
!=
0
&&
email
.
count
!=
0
{
if
has_hk_id
==
1
{
if
hk_id_numbe
.
isHKIdentityCardNumber
()
{
return
true
}
else
{
return
false
}
}
else
{
return
true
}
}
else
{
return
false
}
guard
birth_place_area
.
count
>
0
else
{
return
false
}
}
if
has_hk_id
==
1
{
guard
hk_id_numbe
.
count
>
0
else
{
return
false
}
}
return
true
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/VM/YHSelectCountryViewModel.swift
View file @
ece05fbb
...
...
@@ -14,9 +14,9 @@ class YHSelectCountryViewModel: NSObject {
}
func
requestCountry
(
_
key
:
String
,
callBackBlock
:
@escaping
(
_
success
:
[
YHCountryMessage
?]?,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
OrderInformation
.
countryInformation
+
"?keyword =
\(
key
)
"
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
OrderInformation
.
countryInformation
let
param
:
[
String
:
Any
]
=
[
"keyword"
:
key
]
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
param
)
{
[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
let
dic
=
json
.
data
as?
[
Any
]
guard
let
resultArray
=
[
YHCountryMessage
]
.
deserialize
(
from
:
dic
)
else
{
...
...
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