<template>
  <div v-if="defaultTips">
    <span style="display：inline-block;text-align:center;color:red">找不到数据或发生错误，请检查后再试</span>
  </div>
  <div v-else>
    <span :id="`imgplayblockjs_${ID}`"></span>
  </div>
</template>

<script>
import util from '@src/common/util.js'
export default {
  data() {
    return {
      ID: 0,
      defaultTips: false
    }
  },
  async created() {
    try {
      this.ID = util.url.getQueryValue(location.href, 'ID')
      util.loadJS(`ui/imageplayer/${this.ID}/preview`)
    } catch (e) {
      this.defaultTips = true
      console.error('imagePlayer preview error', e.toString())
    }
  }
}
</script>
