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
1ed82272
Commit
1ed82272
authored
Apr 03, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已提交问卷优化
parent
2c22a2cd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+2
-2
YHCustomerInformationQuestionnaireVC.swift
...les/Plan(方案)/C/YHCustomerInformationQuestionnaireVC.swift
+21
-0
No files found.
galaxy/galaxy/AppDelegate.swift
View file @
1ed82272
galaxy/galaxy/Classes/Modules/Plan(方案)/C/YHCustomerInformationQuestionnaireVC.swift
View file @
1ed82272
...
@@ -254,6 +254,7 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
...
@@ -254,6 +254,7 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
if
let
first
=
questions
.
first
,
surveyContainerModel
.
defaultAnswers
.
contains
(
where
:
{
answer
in
if
let
first
=
questions
.
first
,
surveyContainerModel
.
defaultAnswers
.
contains
(
where
:
{
answer
in
answer
.
questionKey
==
first
.
businessKey
answer
.
questionKey
==
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.businessKey == answer.questionKey
item.businessKey == answer.questionKey
...
@@ -268,6 +269,26 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
...
@@ -268,6 +269,26 @@ class YHCustomerInformationQuestionnaireVC: YHBaseViewController {
self.answerDic[question.id] = options
self.answerDic[question.id] = options
}
}
}
}
*/
for
(
index
,
answer
)
in
surveyContainerModel
.
defaultAnswers
.
enumerated
()
{
if
let
question
=
questions
.
first
(
where
:
{
item
in
item
.
businessKey
==
answer
.
questionKey
})
{
displayedQuestions
.
append
(
question
)
let
options
=
answer
.
optionKey
.
compactMap
{
optionKey
in
let
option
=
question
.
options
.
first
{
optionItem
in
optionItem
.
businessKey
==
optionKey
}
return
YHSurveyConditionOptionExtra
(
extra
:
""
,
optionId
:
option
?
.
id
??
""
,
title
:
option
?
.
title
??
""
,
optionKey
:
answer
.
questionKey
)
}
self
.
answerDic
[
question
.
id
]
=
options
}
if
surveyContainerModel
.
defaultAnswers
.
count
>
index
+
1
,
let
lastModel
=
displayedQuestions
.
last
,
let
nextQuestion
=
self
.
findNextQuestion
(
allQuestions
:
self
.
allQuestions
,
displayedQuestions
:
self
.
displayedQuestions
,
answerDic
:
self
.
answerDic
,
currentIndex
:
displayedQuestions
.
count
-
1
,
currentOptionId
:
lastModel
.
id
),
nextQuestion
.
businessKey
!=
surveyContainerModel
.
defaultAnswers
[
index
+
1
]
.
questionKey
{
self
.
displayedQuestions
.
append
(
nextQuestion
)
break
}
}
if
let
lastModel
=
displayedQuestions
.
last
,
let
nextQuestion
=
self
.
findNextQuestion
(
allQuestions
:
self
.
allQuestions
,
displayedQuestions
:
self
.
displayedQuestions
,
answerDic
:
self
.
answerDic
,
currentIndex
:
displayedQuestions
.
count
-
1
,
currentOptionId
:
lastModel
.
id
)
{
if
let
lastModel
=
displayedQuestions
.
last
,
let
nextQuestion
=
self
.
findNextQuestion
(
allQuestions
:
self
.
allQuestions
,
displayedQuestions
:
self
.
displayedQuestions
,
answerDic
:
self
.
answerDic
,
currentIndex
:
displayedQuestions
.
count
-
1
,
currentOptionId
:
lastModel
.
id
)
{
self
.
displayedQuestions
.
append
(
nextQuestion
)
self
.
displayedQuestions
.
append
(
nextQuestion
)
...
...
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