Blame view

apps/pages/single/gain/components/banner.vue 871 Bytes
TaoHuang authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<template>
  <div class="banner">
    <img :src="resource" alt="">
    <div class="link" @click="onClick"></div>
  </div>
</template>

<script>
import {createNamespacedHelpers} from 'vuex';

const {mapState} = createNamespacedHelpers('gain');

export default {
  computed: {
    ...mapState(['resource'])
  },
  methods: {
    onClick() {
      this.$yoho.goNewPage({
TaoHuang authored
20
        url: 'https://activity.yoho.cn/feature/5729.html?title=活动规则&openby:yohobuy={"action":"go.h5","params":{"title":"活动规则","url":"https://activity.yoho.cn/feature/5729.html"}}'
TaoHuang authored
21 22 23 24 25 26 27 28
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.banner {
TaoHuang authored
29 30 31 32
  font-size: 0;
  padding-bottom: 20px;
  background-color: #f0f0f0;
TaoHuang authored
33 34 35 36 37 38 39 40 41 42 43 44 45 46
  img {
    position: relative;
    width: 100%;
  }

  .link {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 0;
    right: 0;
  }
}
</style>