Adsense.vue 633 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <AdSingle
  3. :ad="getContentAdID"
  4. :showTag="false"
  5. :showCloseIcon="false"
  6. class="adsense-container" />
  7. </template>
  8. <script>
  9. import AdSingle from '@/components/ad/Ad'
  10. export default {
  11. name: 'Adsense',
  12. components: {
  13. AdSingle
  14. },
  15. computed: {
  16. getContentAdID () {
  17. return `equity_mobile_vip_${this.type}_code`
  18. }
  19. },
  20. data () {
  21. return {
  22. type: 'buy'
  23. }
  24. },
  25. created () {
  26. this.getQuery()
  27. },
  28. methods: {
  29. getQuery () {
  30. this.type = this.$route.query.type || 'buy'
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss">
  36. .adsense-container {
  37. margin-bottom: 8px;
  38. }
  39. </style>