import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, ModalController } from 'ionic-angular';
import {ContactModalPage} from "../contact-modal/contact-modal";
import {Response} from "@angular/http";
import { AppService } from "../../../service/appHttpService";

@IonicPage()
@Component({
  selector: 'page-select-block',
  templateUrl: 'select-block.html',
})
export class SelectBlockPage {

  constructor(public navCtrl: NavController, public navParams: NavParams,
              public modalCtrl: ModalController, public appService: AppService) {
  }

  ionViewDidLoad() {
    const  data = {
        pageSize:'10',
        pageNumber:'1'
    };
      this.appService.ObserverHttpGet("/wisdomgroup/modules/telpBook", data)
          .subscribe((res: Response) => {

              }, error => {
                  this.appService.alert('网络异常！');
              }
          );
  }

  showPeoModal(){
    let peoModal = this.modalCtrl.create(ContactModalPage);
    peoModal.present();
  }
}
