<template>
  <div class="coontent">

  </div>
</template>

<script>
import { getDailyData,getPayAmtList, getPayUserCntList, getTicketBoxTop, getTicketSiteTop} from "@/api/admin/index";
import echarts from "echarts"
import moment from 'moment'
import { mapGetters } from 'vuex'
import { numberFormat, getTimeResult } from "@/utils/util";
export default {
  data() {
    return {

    };
  },
  mounted: function () {
    this.$nextTick(function () {

    });
  },

  computed: {
    ...mapGetters(['userInfo']),
  },

  created() {
    this.getDailyData()
    //this.getPayAmtList()
   //this.getPayUserCntList()
    this.getTicketBoxTop()
    this.getTicketSiteTop()
  },
  methods: {

    // 统计今日实时交易金额、交易用户、盲票销售张数、新增经销商数量
    getDailyData() {
      getDailyData({}).then(res => {
          console.log("getDailyData == "+JSON.stringify(res));
      }).catch(() => {
        this.loading = false
      })
    },

    // 统计交易金额（带粒度）
    getPayAmtList() {
      getPayAmtList({level:"days",days:30}).then(res => {
          console.log("getPayAmtList == "+JSON.stringify(res));
      }).catch(() => {
        this.loading = false
      })
    },

    //统计交易用户数（带粒度）
    getPayUserCntList() {
      getPayUserCntList({level:"week",days:30}).then(res => {
          console.log("getPayUserCntList == "+JSON.stringify(res));
      }).catch(() => {
        this.loading = false
      })
    },

    // 统计票组销售TOP10
    getTicketBoxTop() {
      getTicketBoxTop({days:30}).then(res => {
          console.log("getTicketBoxTop == "+JSON.stringify(res));
      }).catch(() => {
        this.loading = false
      })
    },

    // 统计经销商交易额TOP10
    getTicketSiteTop() {
      getTicketSiteTop({days:30}).then(res => {
          console.log("getTicketSiteTop == "+JSON.stringify(res));
      }).catch(() => {
        this.loading = false
      })
    },

  },
};
</script>
<style lang="scss" scoped>

</style>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>
