import { Component, OnInit } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { AjaxService } from '../../../../../core/service/ajax.service';
import { MsgService } from '../../../../../core/service/msg.service';
import { FrameDetailComponent } from '../../../../frame/core/detail/frame.detail';

@Component({
  selector: 'app-exam-interview-room-bind',
  templateUrl: './exam-interview-room-bind.component.html',
  styleUrls: ['./exam-interview-room-bind.component.scss']
})
export class ExamInterviewRoomBindComponent extends FrameDetailComponent implements OnInit {

  constructor(bsModalRef: BsModalRef,  fb: FormBuilder) { 
    super(bsModalRef);
    this.detailForm = fb.group({
      'tencent_meeting_url' : [null, null]
    });
  }

  ngOnInit() {
  }

  //链接绑定
  binding() {
    AjaxService.request('exam/interview/room/meeting/bind.htm', {
      room_id : this.ResponseEntity.ly_room_id,
      tencent_meeting_url: this.currentEntity.tencent_meeting_url
    }, () => {
      MsgService.successToastr('绑定成功');
      this.closeWindow();
    });
  }

}
