<template>
  <div>
    <GoodsList :tags="tags"></GoodsList>
  </div>
</template>

<script>
import GoodsList from './goods/GoodsList'
import { getTicketCategory } from '@/api/ticketSetting/ticketCategory'
import { getGoodsGroupList } from '@/api/ticketSetting/goodsGroup'

export default {
  components: {
    GoodsList
  },
  created () {
    this.getTicketCategory()
    this.getGoodsGroupList()
    this.$store.dispatch('getLimitGroupList')
  },
  data () {
    return {
      tags: [],
      ticketTypeList: []
    }
  },
  methods: {
    getTicketCategory () {
      getTicketCategory({ status: ['active'] }).then(res => {
        this.$store.commit('SET_TICKET_TYPE_LIST', res.extraInfo.list)
      })
    },
    getGoodsGroupList () {
      getGoodsGroupList({ pageNum: 0, pageSize: 0, status: ['active', 'inactive'] }).then(res => {
        this.$store.commit('SET_GOODS_GROUP_LIST', res.extraInfo.list)
      })
    }
  }
}
</script>

<style scoped>

</style>
