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
ebdd487b
Commit
ebdd487b
authored
Apr 02, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
续签方案接口调整
parent
199c626f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
YHHomeBannerView.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHHomeBannerView.swift
+8
-2
YHSurveyViewModel.swift
...alaxy/Classes/Modules/Plan(方案)/VM/YHSurveyViewModel.swift
+28
-0
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+1
-0
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeBannerView.swift
View file @
ebdd487b
...
...
@@ -116,8 +116,14 @@ private extension YHHomeBannerView {
}
else
if
tabBarName
.
contains
(
"renewal_plan"
,
caseSensitive
:
false
)
{
if
YHLoginManager
.
shared
.
isLogin
()
{
surveyViewModel
.
getRenewalPlanState
{
state
,
_
in
if
state
?
.
isGeneratePlan
==
true
{
surveyViewModel
.
getRenewalPlanGenerated
{
state
,
error
in
guard
let
state
=
state
else
{
if
let
msg
=
error
?
.
errorMsg
,
!
msg
.
isEmpty
{
YHHUD
.
flash
(
message
:
msg
)
}
return
}
if
state
.
isGeneratePlan
==
true
{
let
vc
=
YHPlanViewController
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/VM/YHSurveyViewModel.swift
View file @
ebdd487b
...
...
@@ -104,4 +104,32 @@ extension YHSurveyViewModel {
callback
(
nil
,
err
)
}
}
/*
问卷首页是否生成方案
*/
func
getRenewalPlanGenerated
(
callback
:
@escaping
(
_
planState
:
YHSurveyRenewalPlanState
?,
_
error
:
YHErrorModel
?)
->
Void
)
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Survey
.
getRenewalPlanGenerated
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
[:])
{
[
weak
self
]
json
,
_
in
// 1. json字符串 转 对象
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
resultModel
=
YHSurveyRenewalPlanState
.
deserialize
(
from
:
dic
)
else
{
let
err
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callback
(
nil
,
err
)
return
}
self
?
.
planState
=
resultModel
callback
(
resultModel
,
nil
)
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
callback
(
nil
,
err
)
}
}
failBlock
:
{
err
in
callback
(
nil
,
err
)
}
}
}
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
ebdd487b
...
...
@@ -763,6 +763,7 @@ class YHAllApiName {
static
let
surveyContent
=
"super-app/renewal/advice/survey-content"
static
let
submitSurveyAnswer
=
"super-app/renewal/advice/submit-survey-answer"
static
let
getRenewalPlanState
=
"super-app/renewal/advice/get-renewal-plan-is-generate"
static
let
getRenewalPlanGenerated
=
"super-app/renewal/advice/get-renewal-plan-is-generated"
}
}
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