Commit b0496b94 by Chao Sun

返回孩子数增加

parent cddbf171
...@@ -95,7 +95,10 @@ export class AskComponent implements OnInit { ...@@ -95,7 +95,10 @@ export class AskComponent implements OnInit {
if(this.nextBtn===false){ if(this.nextBtn===false){
return; return;
} }
this.allAnswers[this.curPage] = this.questionInfo; if(this.questionInfo){
this.allAnswers[this.curPage] = this.questionInfo;
this.questionInfo = null;
}
if (this.curPage < 16) { if (this.curPage < 16) {
//判断当前页是否有答案 //判断当前页是否有答案
if ( if (
...@@ -106,6 +109,7 @@ export class AskComponent implements OnInit { ...@@ -106,6 +109,7 @@ export class AskComponent implements OnInit {
) { ) {
this.curPage++ this.curPage++
this.setCurPageData() this.setCurPageData()
} }
} else { } else {
this.curPage = 0 this.curPage = 0
...@@ -119,6 +123,7 @@ export class AskComponent implements OnInit { ...@@ -119,6 +123,7 @@ export class AskComponent implements OnInit {
pages: this.filterItems() pages: this.filterItems()
} }
} }
console.log(answerParam)
if (this.curPage == 16) { if (this.curPage == 16) {
this.commonService.saveCustomerAnwers(answerParam).then(res => { this.commonService.saveCustomerAnwers(answerParam).then(res => {
// console.log(res) // console.log(res)
...@@ -127,6 +132,7 @@ export class AskComponent implements OnInit { ...@@ -127,6 +132,7 @@ export class AskComponent implements OnInit {
} }
getAllAnswer(e) { getAllAnswer(e) {
this.questionInfo = e; this.questionInfo = e;
console.log(e)
if(this.curPage == 6 || this.curPage == 8){ if(this.curPage == 6 || this.curPage == 8){
const page2Answer = this.allAnswers[1] const page2Answer = this.allAnswers[1]
const optionId = page2Answer.questions[0].options[0].optionId const optionId = page2Answer.questions[0].options[0].optionId
......
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