<template>
  <div style="padding: 0 20px">
    <div ref="lxHeader">
      <lx-header icon="md-apps" text="会员订单统计" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
        <div slot="content"></div>

      </lx-header>
    </div>

    <xy-table :total="total" :isPage='false' :list="list"
      :table-item="table">
      <template slot="btns">
        <div></div>
      </template>

      </xy-table>

  </div>
</template>

<script>
  import {
    reporttotal
  } from '@/api/type'
  import {
    Message
  } from 'element-ui'
  export default {
    components: {
    },
    data() {
      return {
        select: {

        },
        total: 0,
        list: [],
        table: [{
            prop: 'name',
            label: '产品类型',
          },
          {
            prop: 'total_order',
            label: '累计下单数'
          },
          {
            prop: 'max_order',
            label: '多次下单数'
          },
          ]
        }
      },
      methods: {
          async getTotal() {
            const res = await reporttotal({

            })
            this.total = res.total
            this.list = res
          }
        },
        mounted() {
          this.getTotal()
        }

    }
</script>

<style scoped lang="scss">
  .selector {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;

    &-item {
      display: flex;
      align-items: center;
      align-content: center;

      margin-top: 6px;
      margin-right: 10px;

      &__label {
        word-break: keep-all;
      }
    }
  }
</style>
