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
e536777d
Commit
e536777d
authored
Apr 03, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口调整
parent
2647e66b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
21 deletions
+18
-21
YHCustomerInformationQuestionnaireVC.swift
...les/Plan(方案)/C/YHCustomerInformationQuestionnaireVC.swift
+8
-8
YHSurveyContentModel.swift
...axy/Classes/Modules/Plan(方案)/M/YHSurveyContentModel.swift
+10
-5
YHSurveySubmitRequestModel.swift
...asses/Modules/Plan(方案)/M/YHSurveySubmitRequestModel.swift
+0
-8
No files found.
galaxy/galaxy/Classes/Modules/Plan(方案)/C/YHCustomerInformationQuestionnaireVC.swift
View file @
e536777d
...
@@ -252,18 +252,18 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
...
@@ -252,18 +252,18 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
}
else
{
}
else
{
topImageView
.
image
=
UIImage
(
named
:
"plan_question_top_old"
)
topImageView
.
image
=
UIImage
(
named
:
"plan_question_top_old"
)
if
let
first
=
questions
.
first
,
surveyContainerModel
.
defaultAnswers
.
contains
(
where
:
{
answer
in
if
let
first
=
questions
.
first
,
surveyContainerModel
.
defaultAnswers
.
contains
(
where
:
{
answer
in
answer
.
question
Id
==
first
.
id
answer
.
question
Key
==
first
.
businessKey
})
{
})
{
for
answer
in
surveyContainerModel
.
defaultAnswers
{
for
answer
in
surveyContainerModel
.
defaultAnswers
{
if
let
question
=
questions
.
first
(
where
:
{
item
in
if
let
question
=
questions
.
first
(
where
:
{
item
in
item
.
id
==
answer
.
questionId
item
.
businessKey
==
answer
.
questionKey
})
{
})
{
displayedQuestions
.
append
(
question
)
displayedQuestions
.
append
(
question
)
let
options
=
answer
.
option
Id
.
compactMap
{
optionId
in
let
options
=
answer
.
option
Key
.
compactMap
{
optionKey
in
let
title
=
question
.
options
.
first
{
optionItem
in
let
option
=
question
.
options
.
first
{
optionItem
in
optionItem
.
id
==
optionId
optionItem
.
businessKey
==
optionKey
}
?
.
title
??
""
}
return
YHSurveyConditionOptionExtra
(
extra
:
""
,
optionId
:
option
Id
,
title
:
title
)
return
YHSurveyConditionOptionExtra
(
extra
:
""
,
optionId
:
option
?
.
id
??
""
,
title
:
option
?
.
title
??
""
,
optionKey
:
answer
.
questionKey
)
}
}
self
.
answerDic
[
question
.
id
]
=
options
self
.
answerDic
[
question
.
id
]
=
options
}
}
...
@@ -328,7 +328,7 @@ extension YHCustomerInformationQuestionnaireVC: UITableViewDelegate, UITableView
...
@@ -328,7 +328,7 @@ extension YHCustomerInformationQuestionnaireVC: UITableViewDelegate, UITableView
}
}
let
option
=
model
.
options
.
count
>
index
?
model
.
options
[
index
]
:
nil
let
option
=
model
.
options
.
count
>
index
?
model
.
options
[
index
]
:
nil
if
let
option
=
option
{
if
let
option
=
option
{
self
.
answerDic
[
model
.
id
]
=
[
YHSurveyConditionOptionExtra
(
extra
:
""
,
optionId
:
option
.
id
,
title
:
option
.
title
)]
self
.
answerDic
[
model
.
id
]
=
[
YHSurveyConditionOptionExtra
(
extra
:
""
,
optionId
:
option
.
id
,
title
:
option
.
title
,
optionKey
:
option
.
businessKey
)]
if
let
currentIndex
=
self
.
displayedQuestions
.
firstIndex
(
where
:
{
$0
.
id
==
model
.
id
})
{
if
let
currentIndex
=
self
.
displayedQuestions
.
firstIndex
(
where
:
{
$0
.
id
==
model
.
id
})
{
if
self
.
displayedQuestions
.
count
>
currentIndex
+
1
{
if
self
.
displayedQuestions
.
count
>
currentIndex
+
1
{
let
nextQuestion
=
self
.
displayedQuestions
[
currentIndex
+
1
]
let
nextQuestion
=
self
.
displayedQuestions
[
currentIndex
+
1
]
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/M/YHSurveyContentModel.swift
View file @
e536777d
...
@@ -34,12 +34,12 @@ class YHSurveyContainerModel: SmartCodable {
...
@@ -34,12 +34,12 @@ class YHSurveyContainerModel: SmartCodable {
// MARK: - YHSurveyDefaultAnswers
// MARK: - YHSurveyDefaultAnswers
class
YHSurveyDefaultAnswers
:
SmartCodable
{
class
YHSurveyDefaultAnswers
:
SmartCodable
{
var
question
Id
:
String
=
""
var
question
Key
:
String
=
""
var
option
Id
:
[
String
]
=
[]
var
option
Key
:
[
String
]
=
[]
enum
CodingKeys
:
String
,
CodingKey
{
enum
CodingKeys
:
String
,
CodingKey
{
case
question
Id
=
"question_id
"
case
question
Key
=
"question_key
"
case
option
Id
=
"option_id
"
case
option
Key
=
"option_key
"
}
}
required
init
()
{
required
init
()
{
...
@@ -225,16 +225,21 @@ class YHSurveyConditionOptionExtra: SmartCodable {
...
@@ -225,16 +225,21 @@ class YHSurveyConditionOptionExtra: SmartCodable {
/// 选项标题 可选 提交答案时,建议设置该字段,会作为提交记录留底;show_when场景下,忽略该字段
/// 选项标题 可选 提交答案时,建议设置该字段,会作为提交记录留底;show_when场景下,忽略该字段
var
title
:
String
=
""
var
title
:
String
=
""
init
(
extra
:
String
,
optionId
:
String
,
title
:
String
)
{
/// 选项key 必需
var
optionKey
:
String
=
""
init
(
extra
:
String
,
optionId
:
String
,
title
:
String
,
optionKey
:
String
)
{
self
.
extra
=
extra
self
.
extra
=
extra
self
.
optionId
=
optionId
self
.
optionId
=
optionId
self
.
title
=
title
self
.
title
=
title
self
.
optionKey
=
optionKey
}
}
enum
CodingKeys
:
String
,
CodingKey
{
enum
CodingKeys
:
String
,
CodingKey
{
case
extra
case
extra
case
title
case
title
case
optionId
=
"option_id"
case
optionId
=
"option_id"
case
optionKey
=
"option_key"
}
}
required
init
()
{
required
init
()
{
...
...
galaxy/galaxy/Classes/Modules/Plan(方案)/M/YHSurveySubmitRequestModel.swift
View file @
e536777d
...
@@ -8,8 +8,6 @@
...
@@ -8,8 +8,6 @@
import
Foundation
import
Foundation
/// RenewalAdviceSubmitSurveyAnswerRequest 续期建议-提交问卷答案-请求
// MARK: - YHSurveySubmitRequestModel
// MARK: - YHSurveySubmitRequestModel
class
YHSurveySubmitRequestModel
{
class
YHSurveySubmitRequestModel
{
...
@@ -24,8 +22,6 @@ class YHSurveySubmitRequestModel {
...
@@ -24,8 +22,6 @@ class YHSurveySubmitRequestModel {
}
}
}
}
/// AnswerItem 单个问题答案项
// MARK: - YHSurveyArticleAnswerItem
// MARK: - YHSurveyArticleAnswerItem
class
YHSurveyArticleAnswerItem
{
class
YHSurveyArticleAnswerItem
{
...
@@ -55,8 +51,6 @@ class YHSurveyArticleAnswerItem {
...
@@ -55,8 +51,6 @@ class YHSurveyArticleAnswerItem {
}
}
}
}
/// AnswerItemFileItem
// MARK: - YHSurveyAnswerItemFileItem
// MARK: - YHSurveyAnswerItemFileItem
class
YHSurveyAnswerItemFileItem
{
class
YHSurveyAnswerItemFileItem
{
...
@@ -80,8 +74,6 @@ class YHSurveyAnswerItemFileItem {
...
@@ -80,8 +74,6 @@ class YHSurveyAnswerItemFileItem {
}
}
}
}
/// AnswerItemOptionExtra
// MARK: - YHSurveyAnswerItemOptionExtra
// MARK: - YHSurveyAnswerItemOptionExtra
class
YHSurveyAnswerItemOptionExtra
{
class
YHSurveyAnswerItemOptionExtra
{
...
...
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