Commit 9fc8d2ae by Sweet Zhang

Merge branch 'master' of 139.224.139.2:Sweet/allCampaign

parents daeaf70b e7ca62de
...@@ -90,6 +90,7 @@ export class AgeComponent implements OnInit { ...@@ -90,6 +90,7 @@ export class AgeComponent implements OnInit {
// console.log(this.curPageData); // console.log(this.curPageData);
this.commonService.addAnswer(this.pageAnswers); this.commonService.addAnswer(this.pageAnswers);
this.closeToast(); this.closeToast();
console.log(this.pageAnswers)
} }
showToast(question, idx) { showToast(question, idx) {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
max-width: 55%; max-width: 55%;
} }
.option_item li img.selected { .option_item li img.selected {
border: 1px solid #ff0000; border: 2px solid #ff0000;
border-radius: 50%; border-radius: 50%;
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="questionTitle">{{ this.curPageData?.pageName }}</div> <div class="questionTitle">{{ this.curPageData?.pageName }}</div>
<ul class="jobContent"> <ul class="jobContent">
<li <li
[ngClass]="{ selected: selectedOptionId == options.optionId }" [ngClass]="{ selected: options['selected'] }"
*ngFor="let options of this.curPageData?.questions[0].options" *ngFor="let options of this.curPageData?.questions[0].options"
(click)="selectedJob(options)" (click)="selectedJob(options)"
> >
......
...@@ -58,9 +58,14 @@ export class JobComponent implements OnInit { ...@@ -58,9 +58,14 @@ export class JobComponent implements OnInit {
} }
selectedJob(option) { selectedJob(option) {
console.log(this.curPageData['pageId']) const options = this.curPageData['questions'][0]['options']
this.selectedOptionId = option.optionId; for (let i = 0; i < options.length; i++) {
option.selected = true; if (option['optionId'] == options[i]['optionId']) {
options[i]['selected'] = true;
} else {
options[i]['selected'] = false;
}
}
this.pageAnswers = { this.pageAnswers = {
pageId: this.curPageData['pageId'], pageId: this.curPageData['pageId'],
questions: [{ questions: [{
......
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