import { Component, OnInit } from '@angular/core';
import {Router} from '@angular/router';
import {CommonService} from '../common.service';

@Component({
  selector: 'app-ask',
  templateUrl: './ask.component.html',
  styleUrls: ['./ask.component.css']
})
export class AskComponent implements OnInit {
  questionList:Array<any>;
  picNum:number;
  constructor(private router: Router,
    private commonService:CommonService
    ) {

   }

  ngOnInit() {
    this.surveyInfo()
  }

  surveyInfo(){
    this.commonService.surveyInfo().then(res=>{
      if(res['success']){
        this.questionList = res['data']['survey'].pages
      }
      console.log(this.questionList)
    })
  }

  
}
