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
054eb999
Commit
054eb999
authored
Feb 01, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成 入口的UI 及接口联调
parent
b7ecc6a6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
161 additions
and
55 deletions
+161
-55
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHInformationPerfectListVC.swift
...telligentService(服务中心)/C/YHInformationPerfectListVC.swift
+41
-50
YHServiceCenterSecondViewController.swift
...Service(服务中心)/C/YHServiceCenterSecondViewController.swift
+3
-1
YHPersonInfoFillStepModel.swift
...ntelligentService(服务中心)/M/YHPersonInfoFillStepModel.swift
+17
-0
YHServiceCenterMainViewModel.swift
...ligentService(服务中心)/VM/YHServiceCenterMainViewModel.swift
+86
-2
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+10
-2
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
054eb999
...
...
@@ -86,6 +86,7 @@
A5573EF52B317C0100D98EC0
/* galaxyUITestsLaunchTests.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5573EF42B317C0100D98EC0
/* galaxyUITestsLaunchTests.swift */
;
};
A56D2D612B62020C009C83A8
/* YHContractMainItemStatusCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A56D2D602B62020C009C83A8
/* YHContractMainItemStatusCell.swift */
;
};
A57F1F252B48F09200B644E6
/* ATAuthSDK_D.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04808C032B4686510056D53C
/* ATAuthSDK_D.framework */
;
};
A58556BA2B6BCF1A003746B2
/* YHPersonInfoFillStepModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A58556B92B6BCF1A003746B2
/* YHPersonInfoFillStepModel.swift */
;
};
A58951C52B398D1000225C19
/* Launch Screen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A58951C42B398D1000225C19
/* Launch Screen.storyboard */
;
};
A5ACE9272B4564F7002C94D2
/* YHLoginViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8DB2B4564F7002C94D2
/* YHLoginViewController.swift */
;
};
A5ACE9282B4564F7002C94D2
/* YHSmsCodeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
;
};
...
...
@@ -302,6 +303,7 @@
A5573EF22B317C0100D98EC0
/* galaxyUITests.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
galaxyUITests.swift
;
sourceTree
=
"<group>"
;
};
A5573EF42B317C0100D98EC0
/* galaxyUITestsLaunchTests.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
galaxyUITestsLaunchTests.swift
;
sourceTree
=
"<group>"
;
};
A56D2D602B62020C009C83A8
/* YHContractMainItemStatusCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHContractMainItemStatusCell.swift
;
sourceTree
=
"<group>"
;
};
A58556B92B6BCF1A003746B2
/* YHPersonInfoFillStepModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPersonInfoFillStepModel.swift
;
sourceTree
=
"<group>"
;
};
A58951C42B398D1000225C19
/* Launch Screen.storyboard */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.storyboard
;
path
=
"Launch Screen.storyboard"
;
sourceTree
=
"<group>"
;
};
A5ACE8DB2B4564F7002C94D2
/* YHLoginViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginViewController.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSmsCodeView.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -972,6 +974,7 @@
A5C382D02B5FAAB300C5E65C
/* YHContactItemModel.swift */
,
A5FD63C02B62616D00D1D9DA
/* YHInformationPerfectModel.swift */
,
A5FD63C22B63438A00D1D9DA
/* YHContactMainItemStatusModel.swift */
,
A58556B92B6BCF1A003746B2
/* YHPersonInfoFillStepModel.swift */
,
);
path
=
M
;
sourceTree
=
"<group>"
;
...
...
@@ -1430,6 +1433,7 @@
A5C382CC2B5EA11800C5E65C
/* YHContractCell.swift in Sources */
,
042FBBC12B63B21700F9DE23
/* YHFormItemDegreeInfoCell.swift in Sources */
,
A5ACE9492B4564F7002C94D2
/* YHHUDSuccessView.swift in Sources */
,
A58556BA2B6BCF1A003746B2
/* YHPersonInfoFillStepModel.swift in Sources */
,
A5FD63D42B65F99500D1D9DA
/* YHScoreItemCell.swift in Sources */
,
A5ACE9432B4564F7002C94D2
/* UILable+Extension.swift in Sources */
,
A5ACE9382B4564F7002C94D2
/* UIApplication+Extension.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHInformationPerfectListVC.swift
View file @
054eb999
...
...
@@ -12,11 +12,9 @@ import UIKit
*信息完善列表
*/
class
YHInformationPerfectListVC
:
YHBaseViewController
{
// private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
private
var
arrData
:
[
YHInformationPerfectModel
]
=
[]
private
var
myTargetIndex
:
Int32
=
3
//for test hjl
var
orderId
:
Int
?
private
let
serviceCenterMainReqVM
:
YHServiceCenterMainViewModel
=
YHServiceCenterMainViewModel
()
private
var
hasSubmitFlag
:
Bool
=
false
{
didSet
{
submitBtn
.
isHidden
=
hasSubmitFlag
...
...
@@ -25,7 +23,7 @@ class YHInformationPerfectListVC: YHBaseViewController {
if
hasSubmitFlag
==
true
{
headerTitleDesLable
.
text
=
"您已提交信息表"
}
else
{
headerTitleDesLable
.
text
=
"您好
,DavidHuang先生"
headerTitleDesLable
.
text
=
"您好
,"
+
(
serviceCenterMainReqVM
.
informationFillStepModel
?
.
applicantName
??
"-"
)
}
}
}
...
...
@@ -81,27 +79,48 @@ class YHInformationPerfectListVC: YHBaseViewController {
super
.
viewDidLoad
()
setupUI
()
loadData
()
}
}
extension
YHInformationPerfectListVC
{
func
submitSweetNotify
()
{
let
params
=
[
"option"
:
1
,
"orderId"
:
orderId
]
serviceCenterMainReqVM
.
submitSweetNotifyOp
(
params
:
params
as
[
String
:
Any
])
{
success
,
error
in
if
success
==
true
{
self
.
hasSubmitFlag
=
true
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
"发生错误,请重试"
)
}
}
}
func
showTipsAlert
()
{
YHInformationFillTipsAlertView
.
showCheckView
{
agree
in
if
agree
==
true
{
printLog
(
"点击了 确认 按钮"
)
self
.
submitSweetNotify
()
}
else
{
printLog
(
"点击了 取消 按钮"
)
}
}
}
}
extension
YHInformationPerfectListVC
{
func
loadData
()
{
// self.serviceCenterMainReqVM.getContactList { success, error in
// if success == true {
//
// }
// self.homeTableView.reloadData()
// }
guard
let
orderId
=
orderId
else
{
return
}
self
.
serviceCenterMainReqVM
.
getPersonInfoFillStep
(
params
:
[
"orderId"
:
orderId
])
{
success
,
error
in
if
success
==
true
{
if
self
.
serviceCenterMainReqVM
.
informationFillStepModel
?
.
sweet_notify_status
==
0
{
self
.
showTipsAlert
()
}
if
self
.
serviceCenterMainReqVM
.
myInfoFillStep
>
6
{
self
.
hasSubmitFlag
=
true
}
else
{
self
.
hasSubmitFlag
=
false
}
}
self
.
homeTableView
.
reloadData
()
}
}
@objc
func
goScoreVC
()
{
...
...
@@ -139,34 +158,6 @@ extension YHInformationPerfectListVC {
gk_navBarAlpha
=
1.0
gk_navLineHidden
=
true
let
arr
=
[
1
,
2
,
3
,
4
,
5
,
6
]
let
target
=
myTargetIndex
//for test hjl 待填写的项目
for
item
in
arr
{
let
model
=
YHInformationPerfectModel
()
model
.
type
=
item
arrData
.
append
(
model
)
if
item
<
target
{
model
.
isFinished
=
true
}
else
{
model
.
isFinished
=
false
}
if
item
==
target
{
model
.
isDoing
=
true
}
if
item
==
target
+
1
{
model
.
isNextDoingCell
=
true
}
else
{
model
.
isNextDoingCell
=
false
}
}
view
.
addSubview
(
topBkg
)
topBkg
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
...
...
@@ -302,7 +293,7 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
6
return
serviceCenterMainReqVM
.
arrInfoFillStep
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
...
...
@@ -312,15 +303,15 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
newCell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHInformationPerfectCell
.
self
)
newCell
.
selectionStyle
=
.
none
newCell
.
dataModel
=
arrData
[
indexPath
.
row
]
newCell
.
dataModel
=
serviceCenterMainReqVM
.
arrInfoFillStep
[
indexPath
.
row
]
return
newCell
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
tableView
.
deselectRow
(
at
:
indexPath
,
animated
:
true
)
printLog
(
"点击了
\(
indexPath
.
section
)
section ---
\(
indexPath
.
row
)
row"
)
let
model
=
arrData
[
indexPath
.
row
]
if
(
indexPath
.
row
+
1
>
myTargetIndex
)
{
let
model
=
serviceCenterMainReqVM
.
arrInfoFillStep
[
indexPath
.
row
]
if
(
indexPath
.
row
+
1
>
serviceCenterMainReqVM
.
myInfoFillStep
)
{
let
message
=
"请先完成"
+
model
.
name
+
"填写"
YHHUD
.
flash
(
message
:
message
)
}
else
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHServiceCenterSecondViewController.swift
View file @
054eb999
...
...
@@ -161,7 +161,9 @@ extension YHServiceCenterSecondViewController : UITableViewDelegate,UITableViewD
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
tableView
.
deselectRow
(
at
:
indexPath
,
animated
:
true
)
if
indexPath
.
row
==
0
{
navigationController
?
.
pushViewController
(
YHInformationPerfectListVC
())
let
vc
=
YHInformationPerfectListVC
()
vc
.
orderId
=
orderId
navigationController
?
.
pushViewController
(
vc
)
}
else
if
indexPath
.
row
==
1
{
}
else
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/M/YHPersonInfoFillStepModel.swift
0 → 100644
View file @
054eb999
//
// YHPersonInfoFillStepModel.swift
// galaxy
//
// Created by davidhuangA on 2024/2/1.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
SmartCodable
struct
YHPersonInfoFillStepModel
:
SmartCodable
{
var
step
:
Int
=
0
var
applicantName
:
String
=
""
var
sweet_notify_status
:
Int
=
0
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/VM/YHServiceCenterMainViewModel.swift
View file @
054eb999
...
...
@@ -17,6 +17,11 @@ class YHServiceCenterMainViewModel: YHBaseViewModel {
//合同对应的状态
var
arrContactStausItmes
:
[
YHContactMainItemStatusModel
]
=
[]
//信息完善列表
var
arrInfoFillStep
:
[
YHInformationPerfectModel
]
=
[]
var
myInfoFillStep
:
Int
=
0
var
informationFillStepModel
:
YHPersonInfoFillStepModel
?
}
//请求接口
...
...
@@ -35,12 +40,12 @@ extension YHServiceCenterMainViewModel {
printLog
(
"model 是 ==>
\(
model
)
"
)
let
dic
=
model
.
data
?
.
peel
guard
let
resultModel
=
YHContactItemHoldModel
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
self
.
arrContactList
=
[]
arrContactList
=
[]
callBackBlock
(
false
,
nil
)
return
}
self
.
arrContactList
=
resultModel
.
orders
arrContactList
=
resultModel
.
orders
callBackBlock
(
true
,
nil
)
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
...
...
@@ -102,6 +107,85 @@ extension YHServiceCenterMainViewModel {
callBackBlock
(
false
,
err
)
}
}
//请求 信息表的填写状态
func
getPersonInfoFillStep
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Order
.
informationStepApi
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
guard
let
model
=
NetBaseModel
.
deserialize
(
dict
:
json
)
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
self
.
arrInfoFillStep
=
[]
informationFillStepModel
=
nil
callBackBlock
(
false
,
error
)
return
}
printLog
(
"model 是 ==>
\(
model
)
"
)
let
dic
=
model
.
data
?
.
peel
guard
let
resultModel
=
YHPersonInfoFillStepModel
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
self
.
arrInfoFillStep
=
[]
informationFillStepModel
=
nil
callBackBlock
(
false
,
nil
)
return
}
informationFillStepModel
=
resultModel
myInfoFillStep
=
resultModel
.
step
let
arr
=
[
1
,
2
,
3
,
4
,
5
,
6
]
let
target
=
myInfoFillStep
//for test hjl 待填写的项目
for
item
in
arr
{
let
model
=
YHInformationPerfectModel
()
model
.
type
=
item
arrInfoFillStep
.
append
(
model
)
if
item
<
target
{
model
.
isFinished
=
true
}
else
{
model
.
isFinished
=
false
}
if
item
==
target
{
model
.
isDoing
=
true
}
if
item
==
target
+
1
{
model
.
isNextDoingCell
=
true
}
else
{
model
.
isNextDoingCell
=
false
}
}
callBackBlock
(
true
,
nil
)
}
failBlock
:
{
err
in
self
.
arrInfoFillStep
=
[]
self
.
informationFillStepModel
=
nil
callBackBlock
(
false
,
err
)
}
}
//提交 温馨提示弹窗
func
submitSweetNotifyOp
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Users
.
submitSweetNotifyApi
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
code
in
//1. json字符串 转 对象
guard
let
model
=
NetBaseModel
.
deserialize
(
dict
:
json
)
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callBackBlock
(
false
,
error
)
return
}
printLog
(
"model 是 ==>
\(
model
)
"
)
callBackBlock
(
true
,
nil
)
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
//其他方法
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
054eb999
...
...
@@ -20,13 +20,21 @@ class YHAllApiName {
struct
Order
{
//合同列表
static
let
contractListApi
=
"frontend/order/list"
//合同填写进度
static
let
contractStatusApi
=
"frontend/order/progress"
//信息表的填写进度
static
let
informationStepApi
=
"frontend/order/information/step"
// 获取家庭成员信息 添加家庭成员也用这个
static
let
familyInfoApi
=
"frontend/order/information/family"
// 删除家庭成员信息
static
let
familyMemberDeleteApi
=
"frontend/order/information/family/delete"
}
//Users
struct
Users
{
//提交 温馨提示信息
static
let
submitSweetNotifyApi
=
"frontend/users/sweet-notify/submit"
}
}
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