<template>
  <div class="">
    <toolbar @on-filter="filterData" @on-reset="filterData" />

    <base-table
      class="m-10 bg-w p-20 br-10"
      :columns="columns"
      :items="items"
      :pagination="pagination"
      :page-change="pageChange"
    />
  </div>
</template>

<script>
import toolbar from './toolbar';
import mxFilterList from '@/mixins/filterList';
import { getCashPage } from '@/api/integral-cash';

export default {
  name: 'CashDetail',

  components: { toolbar },

  mixins: [
    mxFilterList({
      fetchList: getCashPage // 在下方data再声明一个 fetchList: iGetList 同等效果
    })
  ],

  data() {
    return {
      columns: [
        {
          key: 'accountId',
          name: '用户ID',
          width: this.$col.b
        },
        {
          key: 'nickname',
          name: '账号昵称'
        },
        {
          key: 'phonenumber',
          name: '账号手机号码',
          width: this.$col.b
        },
        {
          key: 'scene',
          name: '场景',
          width: this.$col.b
        },
        {
          key: 'displayText',
          name: '展示文案',
          minWidth: this.$col.b
        },
        {
          key: 'type',
          name: '类型',
          minWidth: this.$col.b
        },
        {
          key: 'value',
          name: '数值',
          minWidth: this.$col.b
        },
        {
          key: 'createAt',
          name: '时间',
          width: this.$col.b
        }
      ]
    };
  }
};
</script>

<style type="scss" scoped></style>
