Commit aa5efb33 by Chao Sun

年龄宽度修改

parent 1508051f
$(function () { $(function () {
// var api = 'https://' + window.location.host; // var api = 'https://' + window.location.host;
var api = 'https://m.zuihuibi.cn'; var api = 'https://mdev.zuihuibi.cn';
var gitUrlParam = window.location.search; var gitUrlParam = window.location.search;
const param = { const param = {
phone: '', phone: '',
......
$(function () { $(function () {
// var api = 'https://' + window.location.host; // var api = 'https://' + window.location.host;
var api = 'https://m.zuihuibi.cn'; var api = 'https://mdev.zuihuibi.cn';
var gitUrlParam = window.location.search; var gitUrlParam = window.location.search;
const param = { const param = {
phone: '', phone: '',
......
...@@ -16,8 +16,10 @@ export class Page11Component implements OnInit { ...@@ -16,8 +16,10 @@ export class Page11Component implements OnInit {
// this.allOption = {} // this.allOption = {}
this.allOptions = [] this.allOptions = []
// console.log(this.curPageData) // console.log(this.curPageData)
this.getAlloptions()
} }
getAnswer(options) { getAnswer(options) {
console.log(options)
options['selected'] = !options['selected'] options['selected'] = !options['selected']
for (let i = 0; i < this.allOptions.length; i++) { for (let i = 0; i < this.allOptions.length; i++) {
// 更改问题状态,防止重复往数组push // 更改问题状态,防止重复往数组push
...@@ -97,4 +99,17 @@ export class Page11Component implements OnInit { ...@@ -97,4 +99,17 @@ export class Page11Component implements OnInit {
return item['selected']==true; return item['selected']==true;
}) })
} }
getAlloptions(){
// const questions = this.curPageData['questions']
// if(!questions){
// return
// }
// questions[0]['options'].forEach(option => {
// if(option['selected']){
// // this.allOptions[questions] = option
// console.log(this.allOptions)
// }
// });
}
} }
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
<ul class="ageContent"> <ul class="ageContent">
<li *ngFor="let optionsList of this.curPageData['questions']; index as i"> <li *ngFor="let optionsList of this.curPageData['questions']; index as i">
<div>{{ optionsList.questionName }}</div> <div>{{ optionsList.questionName }}</div>
<b (click)="showToast(optionsList, i)"> <b (click)="showToast(optionsList, i)" style="width:35%;text-align: center;float: right">
<span>{{ optionsList.name }}</span <span style="width:20%;text-align: center;">{{ optionsList.name }}</span
>&gt; >
<span style="width:10%;text-align: center;float: right">&gt;</span>
</b> </b>
</li> </li>
</ul> </ul>
......
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