import { Component, OnInit } from '@angular/core';
import { BsModalService } from 'ngx-bootstrap/modal';
import { FramePageComponent } from '../../../../frame/core/page/frame.page';
import { CfEnrolParamDetailComponent } from '../cf-enrol-param-detail/cf-enrol-param-detail.component';

@Component({
  selector: 'app-cf-enrol-param',
  templateUrl: './cf-enrol-param.component.html',
  styleUrls: ['./cf-enrol-param.component.scss']
})
export class CfEnrolParamComponent extends FramePageComponent implements OnInit {

  constructor(private modalService: BsModalService) {
    super(modalService);
    this.modalComponent = CfEnrolParamDetailComponent;
   }

  ngOnInit(): void {
  }

  reload() {
    this.AjaxService.requestEntity('conf/enrol/param/reload.htm', {}, (entity) => {
      if(entity) {
        this.MsgService.successAlert("缓存加载成功！");
      } else {
        this.MsgService.errorAlert('管理端缓存加载成功，如需要刷新微信端缓存，请在该模块配置参数名为【WeixinUrl】的微信端访问地址！');
      }
    });
  }

}
