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
d47f5cf3
Commit
d47f5cf3
authored
Aug 10, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联调 3个接口
parent
7297531f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
167 additions
and
8 deletions
+167
-8
YHOfficialApprovalResultVC.swift
...OfficialApprovalBatch/C/YHOfficialApprovalResultVC.swift
+63
-7
YHOffivialApprovalSuccessCheckView.swift
...lApprovalBatch/V/YHOffivialApprovalSuccessCheckView.swift
+12
-1
YHPrincipleWaitResultModel.swift
...ce/PrincipleBatch(原则批)/M/YHPrincipleWaitResultModel.swift
+11
-0
YHPrincleViewModel.swift
...erService/PrincipleBatch(原则批)/VM/YHPrincleViewModel.swift
+76
-0
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+5
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/OfficialApprovalBatch/C/YHOfficialApprovalResultVC.swift
View file @
d47f5cf3
...
@@ -20,6 +20,8 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
...
@@ -20,6 +20,8 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
setupUI
()
setupUI
()
getAlertStatus
()
}
}
//背景
//背景
...
@@ -133,9 +135,67 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
...
@@ -133,9 +135,67 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
}
}
}
}
lazy
var
princleVM
:
YHPrincleViewModel
=
{
let
vm
=
YHPrincleViewModel
()
return
vm
}()
}
}
private
extension
YHOfficialApprovalResultVC
{
private
extension
YHOfficialApprovalResultVC
{
//上报弹窗状态
func
postAlertStatus
(
_
type
:
Int
)
{
princleVM
.
postAlertStatus
(
type
)
{
success
,
error
in
if
success
{
}
else
{
}
}
}
//获取弹窗状态
func
getAlertStatus
()
{
princleVM
.
getPrincleStatus
{
success
,
error
in
if
success
{
guard
let
model
=
self
.
princleVM
.
alertStatusModel
else
{
return
}
model
.
type
=
1
//for test hjl
if
model
.
type
==
1
{
let
now
=
Date
()
let
timestamp
=
now
.
timeIntervalSince1970
print
(
"当前时间戳:
\(
timestamp
)
"
)
let
offsetSecond
=
CGFloat
(
Int64
(
timestamp
)
-
Int64
(
model
.
date
))
var
roundedUp
=
0
if
offsetSecond
>
0
{
roundedUp
=
Int
(
ceil
(
offsetSecond
/
(
24
*
60
*
60
)))
printLog
(
roundedUp
)
}
let
view
=
YHOffivialApprovalSuccessCheckView
.
sheetView
()
view
.
days
=
roundedUp
view
.
show
()
view
.
block
=
{
tag
in
DispatchQueue
.
main
.
async
{
self
.
postAlertStatus
(
6
)
}
if
tag
==
0
{
//
self
.
clickRightItemBtn
()
}
}
}
}
}
}
func
setupUI
()
{
func
setupUI
()
{
gk_navBarAlpha
=
0.0
gk_navBarAlpha
=
0.0
...
@@ -275,12 +335,8 @@ private extension YHOfficialApprovalResultVC {
...
@@ -275,12 +335,8 @@ private extension YHOfficialApprovalResultVC {
@objc
func
clickRightItemBtn
()
{
@objc
func
clickRightItemBtn
()
{
// let view = YHOffivialApprovalGuildLineCheckView.sheetView()
let
view
=
YHOffivialApprovalGuildLineCheckView
.
sheetView
()
// view.show()
view
.
show
()
let
view
=
YHOffivialApprovalSuccessCheckView
.
sheetView
()
view
.
show
()
//for test hjl
}
}
}
}
...
@@ -296,7 +352,7 @@ extension YHOfficialApprovalResultVC: FSPagerViewDataSource, FSPagerViewDelegate
...
@@ -296,7 +352,7 @@ extension YHOfficialApprovalResultVC: FSPagerViewDataSource, FSPagerViewDelegate
let
cell
=
pagerView
.
dequeueReusableCell
(
withReuseIdentifier
:
"cell"
,
at
:
index
)
as!
YHHomeBannerCollectionViewCell
let
cell
=
pagerView
.
dequeueReusableCell
(
withReuseIdentifier
:
"cell"
,
at
:
index
)
as!
YHHomeBannerCollectionViewCell
if
index
<
dataArr
.
count
{
if
index
<
dataArr
.
count
{
// cell.dataModel = dataArr[index]
// cell.dataModel = dataArr[index]
cell
.
contentView
.
backgroundColor
=
.
red
//for test hjl
//
cell.contentView.backgroundColor = .red//for test hjl
}
}
return
cell
return
cell
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/OfficialApprovalBatch/V/YHOffivialApprovalSuccessCheckView.swift
View file @
d47f5cf3
...
@@ -12,6 +12,10 @@ import Lottie
...
@@ -12,6 +12,10 @@ import Lottie
import
YYImage
import
YYImage
class
YHOffivialApprovalSuccessCheckView
:
UIView
{
class
YHOffivialApprovalSuccessCheckView
:
UIView
{
typealias
Block
=
(
Int
)
->
()
var
block
:
Block
?
lazy
var
blackMaskView
:
UIView
=
{
lazy
var
blackMaskView
:
UIView
=
{
let
view
=
UIView
()
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
(
hex
:
0x0F1214
,
alpha
:
0.6
)
view
.
backgroundColor
=
UIColor
(
hex
:
0x0F1214
,
alpha
:
0.6
)
...
@@ -96,6 +100,12 @@ class YHOffivialApprovalSuccessCheckView: UIView {
...
@@ -96,6 +100,12 @@ class YHOffivialApprovalSuccessCheckView: UIView {
private
var
fullText
:
String
=
"恭喜您申请的【优秀人才入境计划】"
private
var
fullText
:
String
=
"恭喜您申请的【优秀人才入境计划】"
private
var
centerText
:
String
=
"已获得港府的正式批准!"
private
var
centerText
:
String
=
"已获得港府的正式批准!"
private
var
lastText
:
String
=
"从递交资料伊始,经历了235天,感谢您这一路以来对银河的信赖与包容!"
private
var
lastText
:
String
=
"从递交资料伊始,经历了235天,感谢您这一路以来对银河的信赖与包容!"
var
days
:
Int
=
0
{
didSet
{
lastText
=
"从递交资料伊始,经历了"
+
String
(
days
)
+
"天,感谢您这一路以来对银河的信赖与包容!"
}
}
}
}
extension
YHOffivialApprovalSuccessCheckView
{
extension
YHOffivialApprovalSuccessCheckView
{
...
@@ -114,11 +124,12 @@ extension YHOffivialApprovalSuccessCheckView {
...
@@ -114,11 +124,12 @@ extension YHOffivialApprovalSuccessCheckView {
}
}
@objc
func
clickSureBtn
()
{
@objc
func
clickSureBtn
()
{
YHHUD
.
flash
(
message
:
"点击了 xx"
)
self
.
block
?(
0
)
dismiss
()
dismiss
()
}
}
@objc
func
clickCloseBtn
()
{
@objc
func
clickCloseBtn
()
{
self
.
block
?(
1
)
dismiss
()
dismiss
()
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/PrincipleBatch(原则批)/M/YHPrincipleWaitResultModel.swift
View file @
d47f5cf3
...
@@ -16,6 +16,17 @@ enum YHPrincipleWaitItemType: Int {
...
@@ -16,6 +16,17 @@ enum YHPrincipleWaitItemType: Int {
case
profile
=
3
// 申请资料已递交港府留档
case
profile
=
3
// 申请资料已递交港府留档
}
}
// MARK: - Applicant
class
YHPrincipleAlertStatusModel
:
SmartCodable
{
var
type
:
Int
=
0
//1-展示正式批已获批弹窗 2-展示原则批已获批弹窗 0-不展示
var
date
:
Int
=
0
//正式批获批时间
required
init
()
{
}
}
class
YHPrincipleWaitResultModel
:
SmartCodable
{
class
YHPrincipleWaitResultModel
:
SmartCodable
{
var
lastQueryAt
:
String
=
""
var
lastQueryAt
:
String
=
""
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/PrincipleBatch(原则批)/VM/YHPrincleViewModel.swift
View file @
d47f5cf3
...
@@ -14,10 +14,86 @@ class YHPrincleViewModel: YHBaseViewModel {
...
@@ -14,10 +14,86 @@ class YHPrincleViewModel: YHBaseViewModel {
var
waitResultModel
=
YHPrincipleWaitResultModel
()
var
waitResultModel
=
YHPrincipleWaitResultModel
()
var
envelopModel
=
YHPrincipleEnvelopeModel
()
var
envelopModel
=
YHPrincipleEnvelopeModel
()
var
uploadDetailModel
=
YHPrincipleUploadDetailModel
()
var
uploadDetailModel
=
YHPrincipleUploadDetailModel
()
//原则批、正式批弹窗状态
var
alertStatusModel
:
YHPrincipleAlertStatusModel
?
}
}
extension
YHPrincleViewModel
{
extension
YHPrincleViewModel
{
//上报弹窗状态
func
postAlertStatus
(
_
type
:
Int
,
callback
:((
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())?)
{
var
params
:
[
String
:
Any
]
=
[:]
if
type
==
14
{
//IdentifyPrincipleApprovalCongratulation = 14 // 原则批获批祝贺弹窗
params
=
[
"IdentifyPrincipleApprovalCongratulation"
:
14
]
}
else
if
type
==
6
{
//IdentifyApprovalCongratulation = 6 // 赴港获批祝贺弹窗 - 正式批
params
=
[
"IdentifyApprovalCongratulation"
:
6
]
}
else
if
type
==
2
{
//IdentifyGetHKAcceptOperateGuid = 2 // 香港身份获批操作指引
params
=
[
"IdentifyGetHKAcceptOperateGuid"
:
2
]
}
else
{
return
}
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Principle
.
postAlertStatusApi
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
code
in
//1. json字符串 转 对象
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
callback
?(
true
,
nil
)
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
callback
?(
false
,
err
)
}
}
failBlock
:
{
err
in
callback
?(
false
,
err
)
}
}
//获取是否弹窗
func
getPrincleStatus
(
callback
:((
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())?)
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Principle
.
getAlertStatusApi
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
let
dic
=
json
.
data
guard
let
resultModel
=
YHPrincipleAlertStatusModel
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
let
err
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callback
?(
false
,
err
)
return
}
self
.
alertStatusModel
=
resultModel
callback
?(
true
,
nil
)
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
callback
?(
false
,
err
)
}
}
failBlock
:
{
err
in
callback
?(
false
,
err
)
}
}
func
getPrincipleWaitReviewResult
(
params
:[
String
:
Any
],
callback
:((
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())?)
{
func
getPrincipleWaitReviewResult
(
params
:[
String
:
Any
],
callback
:((
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())?)
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Principle
.
getProfileList
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Principle
.
getProfileList
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
d47f5cf3
...
@@ -378,6 +378,11 @@ class YHAllApiName {
...
@@ -378,6 +378,11 @@ class YHAllApiName {
}
}
struct
Principle
{
struct
Principle
{
//上报原则批弹窗已展示
static
let
postAlertStatusApi
=
"super-app/common/agreement/add"
//原则批弹窗状态
static
let
getAlertStatusApi
=
"super-app/home/agreement-check"
// 原则批审批结果
// 原则批审批结果
static
let
getReviewResult
=
"super-app/order/approval/principle"
static
let
getReviewResult
=
"super-app/order/approval/principle"
// 获取档案号列表
// 获取档案号列表
...
...
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