Commit b56a3902 authored by Alex朱枝文's avatar Alex朱枝文

优化问卷选择体验

parent c8395c5c
...@@ -377,6 +377,7 @@ extension YHCustomerInformationQuestionnaireVC: UITableViewDelegate, UITableView ...@@ -377,6 +377,7 @@ extension YHCustomerInformationQuestionnaireVC: UITableViewDelegate, UITableView
} }
} else { } else {
if let nextQuestion = self.findNextQuestion(allQuestions: self.allQuestions, displayedQuestions: self.displayedQuestions, answerDic: self.answerDic, currentIndex: currentIndex, currentOptionId: model.id) { if let nextQuestion = self.findNextQuestion(allQuestions: self.allQuestions, displayedQuestions: self.displayedQuestions, answerDic: self.answerDic, currentIndex: currentIndex, currentOptionId: model.id) {
self.tableView.reloadSections(IndexSet(integer: currentIndex), with: .automatic)
self.tableView.performBatchUpdates { [weak self] in self.tableView.performBatchUpdates { [weak self] in
guard let self = self else { guard let self = self else {
return return
...@@ -384,7 +385,6 @@ extension YHCustomerInformationQuestionnaireVC: UITableViewDelegate, UITableView ...@@ -384,7 +385,6 @@ extension YHCustomerInformationQuestionnaireVC: UITableViewDelegate, UITableView
self.displayedQuestions.append(nextQuestion) self.displayedQuestions.append(nextQuestion)
self.tableView.insertSections(IndexSet(integer: currentIndex + 1), with: .bottom) self.tableView.insertSections(IndexSet(integer: currentIndex + 1), with: .bottom)
} completion: { [weak self] _ in } completion: { [weak self] _ in
self?.tableView.reloadSections(IndexSet(integer: currentIndex), with: .automatic)
self?.scrollToBottom() self?.scrollToBottom()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment