Newer
Older
VueSharedPrinting / src / views / advertising.vue
hanfei on 16 Jan 2024 1000 bytes han
<template>
<div class="advertising flex-center" :style="advertisement==''?'':'background: #000'">
  <div v-if="advertisement==''">广告位招租</div>
  <img v-else-if="advertisement.fileType=='image/png'" :src="advertisement.previewPath" model="scaleToFill"/>
  <video v-else autoplay loop muted :src="advertisement.outerChainPath" style="width: 100%;height: 100%;"></video>
</div>
</template>

<script>

export default {
  name: "advertising",
  data() {
    return {
      advertisement: ''
    };
  },
  mounted() {
    setInterval(()=>{
      if(this.cite.advertisement != this.advertisement)
      this.advertisement = this.cite.advertisement
    },300)
  },
}
</script>

<style>
#app .top {
  display: none;
}
.advertising {
  background: linear-gradient(359deg, #3dbf51 0%, #47d1a9 100%);
  width: 100%;
  height: 100%;
  position: fixed;
  font-size: 10rem;
  font-weight: bold;
  color: #ffffff;
  line-height: 10rem;
}
.advertising img {
  max-width: 100%;
  max-height: 100%;
}
</style>