<template>
  <div>
    <div class="store-banner">
      <store-banner @kindAction="kindAction" @kindsAction="kindsAction"></store-banner>
    </div>
    <enterprise-info :kindIds="ids" :kindItem="item"></enterprise-info>
  </div>
</template>
<script>
  import { EnterpriseInfo, StoreBanner } from '~components/pcb'
  export default {
    layout: 'pcb',
    data () {
      return {
        ids: '',
        item: {}
      }
    },
    fetch ({ store }) {
      return Promise.all([
        store.dispatch('pcb/getPcbKinds', {parentId: 3825}),
        store.dispatch('shop/findStoreInfoFromUuid', {uuid: process.env.pcbId}),
        store.dispatch('shop/findRecommendProducts', {uuid: process.env.pcbId}),
        store.dispatch('shop/pageCommoditiesOfStore', process.env.pcbId, { page: 1, count: 10 }),
        store.dispatch('loadStoreStatus', { op: 'check' })
      ])
    },
    components: {
      EnterpriseInfo,
      StoreBanner
    },
    methods: {
      kindAction (ids) {
        this.ids = ids || null
      },
      kindsAction(item) {
        this.item = item || {}
      }
    }
  }
</script>
<style>
  #nav_fragment .el-dialog__wrapper .el-dialog--tiny{
    width: 320px !important;
  }
  #nav_fragment .el-dialog__wrapper .el-dialog__body{
    padding: 14px !important;
  }
  .store-banner{
    min-width: 1190px;
    background: #ece9ec;
    padding-top: 20px;
  }
</style>
