ZZJ
2022-07-11 6ef2ac92c0d3f79b59b8698274918df830b58b29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<template>
  <div class="commendCard">
    <div
      class="commendCardItem"
      v-for="(item, index) in commendCardData"
      :key="index"
    >
      <img :src="item.img" alt="" />
      <div class="info">
        <span class="count">
          {{ item.count }}
        </span>
        <div class="des">
          {{ item.des }}
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
import { logout } from "@/api/login";
export default {
  props: {
    total: {},
  },
  data() {
    return {
      commendCardData: [
        {
          img: "/images/trialCenter/user.png",
          count: "",
          des: "累计注册用户",
        },
        {
          img: "/images/trialCenter/product.png",
          count: "",
          des: "限时试用产品",
        },
        {
          img: "/images/trialCenter/company.png",
          count: "",
          des: "累计服务企业",
        },
        {
          img: "/images/trialCenter/time.png",
          count: "",
          des: "免费试用时长",
        },
      ],
    };
  },
  methods: {
    getCount() {
      this.commendCardData[0].count = this.total.totalUser;
      this.commendCardData[1].count = this.total.totalFreeProd;
      this.commendCardData[2].count = this.total.totalCompany;
      this.commendCardData[3].count = this.total.totalFreeDay;
      console.log(this.commendCardData);
      this.$forceUpdate();
    },
  },
};
</script>
 
<style lang="scss" scoped>
.commendCard {
  display: flex;
  position: absolute;
 
  top: 526px;
  left: 50%;
  margin-left: -640px;
  width: 1280px;
  height: 118px;
  background: #ffffff;
  border: 1px solid #e9ebee;
  box-sizing: border-box;
  box-shadow: 0px 2px 8px rgba(0, 43, 106, 0.12);
 
  .commendCardItem {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    box-sizing: border-box;
    padding: 20px;
 
    img {
      margin-right: 20px;
      height: 60px;
      width: 60px;
      margin-right: 10px;
      vertical-align: middle;
    }
 
    .count {
      font-weight: bold;
      font-size: 28px;
      line-height: 40px;
      color: #0065ff;
    }
 
    .des {
      color: #999999;
      margin-top: 10px;
      font-size: 14px;
    }
 
    &:hover {
      box-shadow: 0px 2px 8px rgba(0, 43, 106, 0.25);
    }
  }
}
</style>