import {Component, OnInit} from '@angular/core';
import {MyService} from "../my.service";

@Component({
  selector: 'ydlife-important-announcement',
  templateUrl: './important-announcement.component.html',
  styleUrls: ['./important-announcement.component.scss']
})
export class ImportantAnnouncementComponent implements OnInit {
  announcementLists: Array<any>;

  constructor(private myService: MyService) {
  }

  ngOnInit() {
    this.announcementQuery();
  }

  announcementQuery() {
    this.myService.announcementQuery(null, null).subscribe(res => {
      if (res['success']) {
        this.announcementLists = res['data']['announcementInfoList'];
      }
    });
  }

}
