<template>
  <div style="text-align:center">
    <a :href="url" target="_blank"><img :src="url" class="notice-pic"/></a>
  </div>
</template>

<script>
import { getAdmissionNotice } from '@/api/my.js'

export default {
  data() {
    return {
      url: ''
    }
  },
  beforeMount() {
    this.getAdmissionNotice()
  },
  methods: {
    getAdmissionNotice() {
      getAdmissionNotice()
        .then(res => {
          this.url = res.url
        })
        .catch(error => {
          this.$message.error(error.message)
        })
    }
  }
}
</script>

<style scoped>
.notice-pic {
  max-width: 970px;
}
</style>
