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
42aa1e64
Commit
42aa1e64
authored
Feb 29, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
信息提交入口
parent
ac91ed79
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
103 additions
and
18 deletions
+103
-18
YHInformationPerfectListVC.swift
...telligentService(服务中心)/C/YHInformationPerfectListVC.swift
+46
-12
YHContactMainItemStatusModel.swift
...lligentService(服务中心)/M/YHContactMainItemStatusModel.swift
+7
-0
YHScoreDetailViewController.swift
...ess(流程)/MyScore(我的评分)/C/YHScoreDetailViewController.swift
+5
-0
YHSubmintAllInfoSuccessTipView.swift
...igentService(服务中心)/V/YHSubmintAllInfoSuccessTipView.swift
+14
-2
YHServiceCenterMainViewModel.swift
...ligentService(服务中心)/VM/YHServiceCenterMainViewModel.swift
+28
-3
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+2
-0
YHNetRequest.swift
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHInformationPerfectListVC.swift
View file @
42aa1e64
...
@@ -14,7 +14,7 @@ import UIKit
...
@@ -14,7 +14,7 @@ import UIKit
class
YHInformationPerfectListVC
:
YHBaseViewController
{
class
YHInformationPerfectListVC
:
YHBaseViewController
{
var
orderId
:
Int
?
var
orderId
:
Int
?
private
let
serviceCenterMainReqVM
:
YHServiceCenterMainViewModel
=
YHServiceCenterMainViewModel
()
private
let
serviceCenterMainReqVM
:
YHServiceCenterMainViewModel
=
YHServiceCenterMainViewModel
()
private
var
hasSubmitFlag
:
Bool
=
false
{
private
var
hasSubmitFlag
:
Bool
=
false
{
didSet
{
didSet
{
submitBtn
.
isHidden
=
hasSubmitFlag
submitBtn
.
isHidden
=
hasSubmitFlag
...
@@ -123,6 +123,14 @@ extension YHInformationPerfectListVC {
...
@@ -123,6 +123,14 @@ extension YHInformationPerfectListVC {
self
.
hasSubmitFlag
=
true
self
.
hasSubmitFlag
=
true
}
else
{
}
else
{
self
.
hasSubmitFlag
=
false
self
.
hasSubmitFlag
=
false
if
self
.
serviceCenterMainReqVM
.
informationFillStepModel
?
.
step
==
6
{
self
.
submitBtn
.
layer
.
opacity
=
1
self
.
submitBtn
.
isEnabled
=
true
}
else
{
self
.
submitBtn
.
layer
.
opacity
=
0.4
self
.
submitBtn
.
isEnabled
=
false
}
}
}
}
}
self
.
homeTableView
.
reloadData
()
self
.
homeTableView
.
reloadData
()
...
@@ -133,6 +141,7 @@ extension YHInformationPerfectListVC {
...
@@ -133,6 +141,7 @@ extension YHInformationPerfectListVC {
//我的评分
//我的评分
let
vc
=
YHScoreDetailViewController
()
let
vc
=
YHScoreDetailViewController
()
vc
.
orderId
=
orderId
vc
.
orderId
=
orderId
vc
.
model
=
serviceCenterMainReqVM
.
allInfoScoreModel
navigationController
?
.
pushViewController
(
vc
)
navigationController
?
.
pushViewController
(
vc
)
}
}
...
@@ -145,26 +154,50 @@ extension YHInformationPerfectListVC {
...
@@ -145,26 +154,50 @@ extension YHInformationPerfectListVC {
}
}
@objc
func
clickSubmitBtn
()
{
@objc
func
clickSubmitBtn
()
{
YHSubmitAllInfoCheckView
.
showCheckView
(
tipMsg
:
"确定是否提交信息?提交后将不能修改"
)
{
agree
in
YHSubmitAllInfoCheckView
.
showCheckView
(
tipMsg
:
"确定是否提交信息?提交后将不能修改"
)
{
agree
in
if
agree
==
true
{
if
agree
==
true
{
printLog
(
"点击了 确认 按钮"
)
printLog
(
"点击了 确认 按钮"
)
YHSubmintAllInfoSuccessTipView
.
showCheckView
{
agree
in
self
.
submitAllInfo
()
self
.
hasSubmitFlag
=
true
if
agree
==
true
{
self
.
goScoreVC
()
}
else
{
}
}
}
else
{
}
else
{
printLog
(
"点击了 取消 按钮"
)
printLog
(
"点击了 取消 按钮"
)
}
}
}
}
}
func
submitAllInfo
()
{
// self.hasSubmitFlag = true
//
// YHSubmintAllInfoSuccessTipView.showCheckView { agree in
// if agree == true {
// self.submitAllInfo()
// }
// }
guard
let
orderId
=
orderId
else
{
printLog
(
"error: orderId 为空"
)
return
}
serviceCenterMainReqVM
.
submitAllInfoOp
(
params
:
[
"orderId"
:
orderId
])
{
[
weak
self
]
success
,
error
in
if
success
==
true
{
let
model
=
self
?
.
serviceCenterMainReqVM
.
allInfoScoreModel
YHSubmintAllInfoSuccessTipView
.
showCheckView
(
model
:
model
)
{
agree
in
if
agree
==
true
{
self
?
.
goScoreVC
()
}
}
}
else
{
let
msg
=
error
?
.
errorMsg
??
"操作失败"
YHHUD
.
flash
(
message
:
msg
)
}
}
}
}
func
setupUI
()
{
func
setupUI
()
{
...
@@ -191,7 +224,8 @@ extension YHInformationPerfectListVC {
...
@@ -191,7 +224,8 @@ extension YHInformationPerfectListVC {
submitBtn
.
layer
.
opacity
=
0.4
submitBtn
.
layer
.
opacity
=
0.4
submitBtn
.
setTitle
(
"提交信息"
,
for
:
.
normal
)
submitBtn
.
setTitle
(
"提交信息"
,
for
:
.
normal
)
submitBtn
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
submitBtn
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
submitBtn
.
isEnabled
=
false
submitBtn
.
layer
.
cornerRadius
=
kCornerRadius6
submitBtn
.
layer
.
cornerRadius
=
kCornerRadius6
submitBtn
.
clipsToBounds
=
true
submitBtn
.
clipsToBounds
=
true
myBottomView
.
addSubview
(
submitBtn
)
myBottomView
.
addSubview
(
submitBtn
)
...
@@ -351,7 +385,7 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
...
@@ -351,7 +385,7 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
let
vc
=
YHEducationInfoListVC
()
let
vc
=
YHEducationInfoListVC
()
vc
.
orderId
=
orderId
??
0
vc
.
orderId
=
orderId
??
0
navigationController
?
.
pushViewController
(
vc
)
navigationController
?
.
pushViewController
(
vc
)
}
else
if
indexPath
.
row
==
4
{
}
else
if
indexPath
.
row
==
4
{
//工作经历
//工作经历
let
vc
=
YHWorkExperienceListViewController
()
let
vc
=
YHWorkExperienceListViewController
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/M/YHContactMainItemStatusModel.swift
View file @
42aa1e64
...
@@ -34,3 +34,10 @@ class YHContactMainItemStatusModel {
...
@@ -34,3 +34,10 @@ class YHContactMainItemStatusModel {
struct
YHContactMainItemStatusModel2
:
SmartCodable
{
struct
YHContactMainItemStatusModel2
:
SmartCodable
{
var
fill_info_step
:
Int
=
0
var
fill_info_step
:
Int
=
0
}
}
struct
YHContactInfoScoreModel
:
SmartCodable
{
var
sum_score
:
String
=
""
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MyScore(我的评分)/C/YHScoreDetailViewController.swift
View file @
42aa1e64
...
@@ -14,6 +14,11 @@ import GKNavigationBarSwift
...
@@ -14,6 +14,11 @@ import GKNavigationBarSwift
class
YHScoreDetailViewController
:
YHBaseViewController
{
class
YHScoreDetailViewController
:
YHBaseViewController
{
var
orderId
:
Int
?
var
orderId
:
Int
?
var
model
:
YHContactInfoScoreModel
?
{
didSet
{
}
}
private
let
serviceCenterMainReqVM
:
YHServiceCenterMainViewModel
=
YHServiceCenterMainViewModel
()
private
let
serviceCenterMainReqVM
:
YHServiceCenterMainViewModel
=
YHServiceCenterMainViewModel
()
//头部背景图片
//头部背景图片
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHSubmintAllInfoSuccessTipView.swift
View file @
42aa1e64
...
@@ -18,6 +18,17 @@ class YHSubmintAllInfoSuccessTipView: UIView {
...
@@ -18,6 +18,17 @@ class YHSubmintAllInfoSuccessTipView: UIView {
var
agreeButton
:
UIButton
!
var
agreeButton
:
UIButton
!
var
disAgressButton
:
UIButton
!
var
disAgressButton
:
UIButton
!
var
model
:
YHContactInfoScoreModel
?
{
didSet
{
guard
let
model
=
model
else
{
return
}
let
a
:
ASAttributedString
=
.
init
(
NSAttributedString
(
string
:
model
.
sum_score
),
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
43
)),
.
foreground
(
UIColor
.
warnColor
))
let
b
:
ASAttributedString
=
.
init
(
"分"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
labelTextColor2
))
messageLabel
.
attributed
.
text
=
a
+
b
}
}
//头部背景图片
//头部背景图片
lazy
var
headBkgImagV
:
UIImageView
=
{
lazy
var
headBkgImagV
:
UIImageView
=
{
let
imagV
=
UIImageView
()
let
imagV
=
UIImageView
()
...
@@ -35,9 +46,10 @@ class YHSubmintAllInfoSuccessTipView: UIView {
...
@@ -35,9 +46,10 @@ class YHSubmintAllInfoSuccessTipView: UIView {
}()
}()
static
func
showCheckView
(
callBack
:
@escaping
Block
)
{
static
func
showCheckView
(
model
:
YHContactInfoScoreModel
?,
callBack
:
@escaping
Block
)
{
let
view
=
YHSubmintAllInfoSuccessTipView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
KScreenHeight
))
let
view
=
YHSubmintAllInfoSuccessTipView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
KScreenHeight
))
view
.
block
=
callBack
view
.
block
=
callBack
view
.
model
=
model
let
window
=
UIApplication
.
shared
.
yhKeyWindow
()
let
window
=
UIApplication
.
shared
.
yhKeyWindow
()
window
?
.
addSubview
(
view
)
window
?
.
addSubview
(
view
)
}
}
...
@@ -114,7 +126,7 @@ class YHSubmintAllInfoSuccessTipView: UIView {
...
@@ -114,7 +126,7 @@ class YHSubmintAllInfoSuccessTipView: UIView {
messageLabel
=
{
messageLabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
text
=
"
90
分"
label
.
text
=
"
--
分"
label
.
textAlignment
=
.
center
label
.
textAlignment
=
.
center
label
.
numberOfLines
=
1
label
.
numberOfLines
=
1
return
label
return
label
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/VM/YHServiceCenterMainViewModel.swift
View file @
42aa1e64
...
@@ -24,6 +24,7 @@ class YHServiceCenterMainViewModel: YHBaseViewModel {
...
@@ -24,6 +24,7 @@ class YHServiceCenterMainViewModel: YHBaseViewModel {
var
myScoreResultData
:
YHScoreResultModel
?
//网络请求的结果数据
var
myScoreResultData
:
YHScoreResultModel
?
//网络请求的结果数据
var
localScoreData
:
YHScoreDataModel
?
//本地缓存的数据
var
localScoreData
:
YHScoreDataModel
?
//本地缓存的数据
var
allInfoScoreModel
:
YHContactInfoScoreModel
?
//提交信息获取 得分
}
}
//请求接口
//请求接口
...
@@ -109,7 +110,7 @@ extension YHServiceCenterMainViewModel {
...
@@ -109,7 +110,7 @@ extension YHServiceCenterMainViewModel {
return
return
}
}
if
resultModel
.
fill_info_step
>
6
{
if
resultModel
.
fill_info_step
>
=
6
{
let
model
=
YHContactMainItemStatusModel
()
let
model
=
YHContactMainItemStatusModel
()
model
.
type
=
1
model
.
type
=
1
model
.
isFinished
=
true
model
.
isFinished
=
true
...
@@ -199,10 +200,10 @@ extension YHServiceCenterMainViewModel {
...
@@ -199,10 +200,10 @@ extension YHServiceCenterMainViewModel {
callBackBlock
(
true
,
nil
)
callBackBlock
(
true
,
nil
)
}
else
{
}
else
{
let
err
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
self
.
arrInfoFillStep
=
[]
self
.
arrInfoFillStep
=
[]
informationFillStepModel
=
nil
informationFillStepModel
=
nil
callBackBlock
(
false
,
err
)
}
}
}
failBlock
:
{
err
in
}
failBlock
:
{
err
in
...
@@ -212,6 +213,30 @@ extension YHServiceCenterMainViewModel {
...
@@ -212,6 +213,30 @@ extension YHServiceCenterMainViewModel {
}
}
}
}
//提交订单信息
func
submitAllInfoOp
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Order
.
submitAllInfoApi
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
printLog
(
"model 是 ==>
\(
json
)
"
)
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
let
dic
=
json
.
data
guard
let
resultModel
=
YHContactInfoScoreModel
.
deserialize
(
dict
:
dic
as?
[
AnyHashable
:
Any
])
else
{
callBackBlock
(
false
,
nil
)
return
}
self
.
allInfoScoreModel
=
resultModel
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
count
>
0
?
json
.
msg
:
"数据错误"
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
//提交 温馨提示弹窗
//提交 温馨提示弹窗
func
submitSweetNotifyOp
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
submitSweetNotifyOp
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
42aa1e64
...
@@ -31,6 +31,8 @@ class YHAllApiName {
...
@@ -31,6 +31,8 @@ class YHAllApiName {
// static let informationStepApi = "frontend/order/information/step"
// static let informationStepApi = "frontend/order/information/step"
static
let
informationStepApi
=
"infoflow/order/information/step"
static
let
informationStepApi
=
"infoflow/order/information/step"
//提交订单信息
static
let
submitAllInfoApi
=
"infoflow/order/information/submit"
//我的评分结果
//我的评分结果
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
View file @
42aa1e64
...
@@ -95,7 +95,7 @@ class YHNetRequest: NSObject {
...
@@ -95,7 +95,7 @@ class YHNetRequest: NSObject {
requestHeader
.
add
(
name
:
"sign"
,
value
:
sign
)
requestHeader
.
add
(
name
:
"sign"
,
value
:
sign
)
requestHeader
.
add
(
name
:
"token"
,
value
:
YHLoginManager
.
shared
.
userModel
?
.
token
??
"-"
)
requestHeader
.
add
(
name
:
"token"
,
value
:
YHLoginManager
.
shared
.
userModel
?
.
token
??
"-"
)
//
testToken(&requestHeader) //for test hjl 使用固定token
testToken
(
&
requestHeader
)
//for test hjl 使用固定token
headers
=
requestHeader
headers
=
requestHeader
}
}
...
...
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