historical-cumulative-bonus.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div v-loading="loading" class="app-container">
  3. <el-row :gutter="20">
  4. <el-col :xs="24" :sm="12" :lg="8" :span="6" v-for="(item,index) in tableData" :key="index">
  5. <el-card shadow="hover" style="margin: 10px auto;" >
  6. <el-result :title="$t(`bonus.${item.name}`)" :sub-title="item.bonus | toThousandFilter">
  7. <template slot="icon">
  8. <i class="el-icon-money" />
  9. </template>
  10. </el-result>
  11. </el-card>
  12. </el-col>
  13. </el-row>
  14. </div>
  15. </template>
  16. <script>
  17. import { fetchHistoricalCumulativeBonus } from '@/api/bonus'
  18. export default {
  19. name: 'HistoricalCumulativeBonus',
  20. data() {
  21. return {
  22. tableData: [],
  23. total: 0,
  24. loading: true,
  25. }
  26. },
  27. created() {
  28. this.getList()
  29. },
  30. methods: {
  31. getList() {
  32. this.loading = true
  33. fetchHistoricalCumulativeBonus().then(response => {
  34. const { tableData, bonusSwitch } = response.data
  35. this.tableData = tableData
  36. this.loading = false
  37. })
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .app-container{
  44. i{
  45. display: block;
  46. font-size: 60px;
  47. /* margin-bottom: 15px; */
  48. transition: color .15s linear;
  49. // color: #13ce66;
  50. }
  51. }
  52. ::v-deep .el-result__subtitle{
  53. font-weight: bold;
  54. p{
  55. font-size: 1.5em!important;
  56. color: #000;
  57. }
  58. }
  59. </style>