Advertising.vue 1009 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div class="adversing" v-if="imgurl">
  3. <div class="inner">
  4. <a href="http://nzgxw.org.cn/" v-if="imgurl.image_url==null" target="_blank" :title="imgurl.introduce">
  5. <img :src="imgurl.thumb" :alt="imgurl.introduce" :id="imgurl.ad_tag" data-tag="imgurl.ad_tag">
  6. </a>
  7. <a :href="imgurl.image_url" v-else :title="imgurl.introduce">
  8. <img :src="imgurl.image_src" :alt="imgurl.introduce" :id="imgurl.ad_tag" data-tag="imgurl.ad_tag">
  9. </a>
  10. </div>
  11. </div>
  12. </template>
  13. <script setup>
  14. //import {onMounted } from 'vue';
  15. const props = defineProps({
  16. imgurl: Array
  17. });
  18. //广告移动至客户端获取,并且按照标识单独获取
  19. </script>
  20. <style lang="less">
  21. // 广告位logo
  22. .adversing {
  23. width: 1200px;
  24. height: 90px;
  25. margin:0 auto;
  26. margin-top: 20px;
  27. margin-bottom: 20px;
  28. overflow: hidden;
  29. a {
  30. display: block;
  31. }
  32. img {
  33. width: 100%;
  34. }
  35. }
  36. </style>