const { createApp } = Vue;

createApp({
  data() {
    return {
      statistics: {
        itemNum: 0,
        awardNum: 0,
        compNum: 0
      },
      matchStudentNun: [
        {
          year: '2021年',
          percent: 9,
          studentNum: 1730
        }
      ]
    }
  },
  methods: {
    getStatistics() {
      fetchReq.get('/system/bigScreen/getValueByKey', { key: 'match_statistics' }).then(res => {
        if (res.success) {
          this.statistics = res.result
        }
      })
    },
    getMatchStudentNun() {
      fetchReq.get('/system/bigScreen/getValueByKey', { key: 'match_student_num' }).then(res => {
        if (res.success) {
          this.matchStudentNun = res.result
        }
      })
    }
  },
  created() {
    this.getStatistics()
    this.getMatchStudentNun()
  }
}).mount('#app')
