import links from './links';
export default {
  components: {
    links
  },
  data() {
    return {
      linkShow: false,
      linksObj: {},
      gameTypeName: ''
    };
  },
  methods: {
    setLinks(row, index) {
      switch (index) {
        case 1:
          this.gameTypeName = '大转盘';
          break;
        case 2:
          this.gameTypeName = '刮刮卡';
          break;
        case 3:
          this.gameTypeName = '拼图游戏';
          break;
        case 4:
          this.gameTypeName = '找你马';
          break;
        case 5:
          this.gameTypeName = '口令福利';
          break;
        case 6:
          this.gameTypeName = '拆盲盒';
          break;
      }
      this.linksObj = row;
      this.linkShow = true;
    }
  },
  mounted() {
    // 防止闪动
    this.$store.commit(
      'mutations_layoutTips',
      `<div class="layout--tips">
        <i class="el-icon-info"></i>
        统计数据每隔3小时更新一次
      </div>
    `
    );
  },
  beforeDestroy() {
    this.$store.commit('mutations_layoutTips', '');
  }
};
