import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from "@angular/router";
import { Router } from '@angular/router';
import { debug } from 'console';
import { MyService } from '../my.service';

@Component({
  selector: 'ydlife-e-notice',
  templateUrl: './e-notice.component.html',
  styleUrls: ['./e-notice.component.scss']
})
export class ENoticeComponent implements OnInit {
  pageType:any
  constructor(private activatedRoute: ActivatedRoute,private router:Router,private myService:MyService) {

   }

  ngOnInit() {
    this.pageType = this.activatedRoute.url['value'][0]['path'];
  }

  agree(){
    this.myService.customerBehaviorTrackSave(`保单继续率承诺书 - ${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.insurerBranchName}、${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.subordinateName}体系下，经纪人${JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerBasicInfo.name}点击了【同意并签署】`).subscribe(res=>{
      this.router.navigate(['/eNoticeSignature'],{ queryParams: { type:'continuationRate'} })
    })
  }
}
