import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {CommonService} from "../../../core/common.service";


@Component({
    selector: 'page-contact-detail',
    templateUrl: 'contact-detail.html',
})
export class ContactDetailPage {

    personInfo;

    constructor(public navCtrl: NavController, public navParams: NavParams,
                private commonSer: CommonService) {
        this.personInfo = this.navParams.get('person');
    }

    ionViewDidLoad() {
        console.log('ionViewDidLoad ContactDetailPage');
    }

    call(phone) {
        if (!phone) {
            this.commonSer.toast('暂无号码');
            return
        }
        window.location.href = "tel:" + phone;
    }

}
