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

@Component({
  selector: 'app-smoking',
  templateUrl: './smoking.component.html',
  styleUrls: ['./smoking.component.css']
})
export class SmokingComponent implements OnInit {
  curPageData:Array<any>;
  constructor(
    private commonService: CommonService

  ) { }

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