<template>
  <div class="app-container home">
    <h1>{{$t('index.welcome')}}</h1>
    <el-row :gutter="20">
      <el-col :span="6">
        <div class="grid-content dise">
          <div>{{$t('index.用户数量')}}</div>
          <div class="tjshu">{{sssum.userSum}}</div>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="grid-content sjdis">
          <div>{{$t('index.商家数量')}}</div>
          <div class="tjshu">{{sssum.sjiaSum}}</div>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="grid-content mddis">
          <div>{{$t('index.门店数量')}}</div>
          <div class="tjshu">{{sssum.storeSum}}</div>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="grid-content qsdis">
          <div>{{$t('index.骑手数量')}}</div>
          <div class="tjshu">{{sssum.qisSum}}</div>
        </div>
      </el-col>
    </el-row>
    <div class="ddqxtu">
      <div class="btil">
        <div>订单数量：21231</div>
        <div>订单总金额：857332</div>
      </div>
      <div class="echart" id="mychart" :style="myChartStyle"></div>
    </div>
  </div>
</template>

<script>
  import { getusersl } from "@/api/index/index";

  export default {
    name: "Index",
    data() {
      return {
        sssum:{
          qisSum:0,
          sjiaSum:0,
          storeSum:0,
          userSum:0
        },
      };
    },
    created() {
      this.getSum();
    },
    methods: {
      getSum() {
        getusersl().then(res => {
          console.log("数据",res)
          this.sssum = res.data;
        });
      },
      goTarget(href) {
        window.open(href, "_blank");
      }
    }
  };
</script>

<style scoped lang="scss">

.home {
  .ddqxtu{
    background-color: #ffffff;
    margin-top: 20px;
    padding: 20px;
    box-shadow: 2px 2px 10px #acacac;
    border-radius: 10px;
    .btil{
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 300px;
    }
  }
  .grid-content{
    width: 250px;
    height: 100px;
    border-radius: 10px;
    padding: 15px 10px 10px 20px;
    box-shadow: 0px 2px 10px #acacac;
    color: #f8f8f8;
    .tjshu{
      font-size: 40px;
      font-weight: bold;
      margin-top: 10px;
      color: #ffffff;
    }
  }
  .dise{
    background-color: #60b8f7;
  }
  .sjdis{
    background-color: #ce83de;
  }
  .mddis{
    background-color: #56da8e;
  }
  .qsdis{
    background-color: #d3a619;
  }
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>

