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


@IonicPage()
@Component({
  selector: 'page-my-block',
  templateUrl: 'my-block.html',
})
export class MyBlockPage {
    ownerList;
  constructor(public navCtrl: NavController, public navParams: NavParams,
              public appService:AppService) {
  }

  ionViewDidLoad() {
    this.initOwnerList();
  }

    initOwnerList(){
        const data = {
            pageSize:'10',
            pageNumber:'1'
        };
        this.appService.ObserverHttpGetData("/wisdomgroup/modules/telpBook",data)
            .subscribe((res: Response) => {
                    let data = res.json();
                    this.ownerList = data.data.list;
                }, error => {
                    this.appService.alert('网络异常！');
                }
            );
    }
}
