<template>
  <div class="ad-text">
    <a v-if="advertText.link" :href="advertText.link">
      <marquee>{{ advertText.words }}</marquee>
    </a>
    <a v-else href="javascript:;">
      <marquee>{{ advertText.words }}</marquee>
    </a>
  </div>
</template>
<script>
import { mapGetters } from 'vuex';

export default {
  name: 'advert-text',
  computed: {
    ...mapGetters({
      advertText: 'advertText'
    })
  },
  methods: {}
};
</script>

<style lang="less" scoped>
.ad-text {
  width: 100%;
  height: 0.3rem;
  line-height: 0.3rem;
  background: #ffe9bd;
  font-size: 0.14rem;
  a {
    display: block;
    height: 100%;
    color: #7c400c;
  }
}
</style>
