ZZJ
2022-07-28 edef6ae8f59823258ce610c9074d32e698958b51
src/views/trialCenter/components/commendCard.vue
@@ -19,14 +19,46 @@
</template>
<script>
import { logout } from "@/api/login";
export default {
  props: {
    commendCardData: {
      type: Array,
    },
    total: {},
  },
  data() {
    return {};
    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>