import {Component, OnInit, ViewChild} from '@angular/core';
import {UploaderComponent} from '../../../../../../core/uploader/uploader.component';
import {FramePageComponent} from '../../../../../frame/core/FramePageComponent';
import {BsModalService} from 'ngx-bootstrap';

@Component({
  selector: 'app-std-upload',
  templateUrl: './std-upload.component.html'
})
export class StdUploadComponent extends FramePageComponent implements OnInit {

  @ViewChild('uploader', {static: false}) uploader: UploaderComponent;

  // 当前在哪个步骤上
  viewStep = 'page';
  uploadParam: any;

  constructor(private modalService: BsModalService) {
    super(modalService);
    this.uploadParam = {auto_reg: true, auto_enrol: true, auto_pay: true, none_trans: true};
  }

  doUpload() {
    debugger;
    this.uploader.uploadFiles({agent_id: this.uploadParam});
  }

  ngOnInit() {
  }


}
