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


@IonicPage()
@Component({
  selector: 'page-duty-sign-up',
  templateUrl: 'duty-sign-up.html',
})
export class DutySignUpPage {

  id;
  signState;
  constructor(public navCtrl: NavController, public navParams: NavParams,
              public appService: AppService) {
  }

  ionViewDidLoad() {
    this.id = this.navParams.get('id');
    const data = {
      'id':this.id
    };
   this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/hasSignIn',data)
       .subscribe((res)=>{
         this.signState = res.json();
       })
  }

  check(){
      const data = {
        id:this.id,  //值班记录id,
          address:'组织部'   //签到地址
      };
      this.appService.ObserverHttpGet('/wisdomgroup/schedule/signIn',data)
          .subscribe((res)=>{
            console.log(res);
          })

  }

}
