Overview.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import React from "react";
  2. import { Spin } from "antd";
  3. import { connect } from "dva";
  4. import CountUp from "./CountUp";
  5. import styles from "../styles/overview.less";
  6. const OverView = ({ overviewData }) => {
  7. return (
  8. // <Spin spinning={overviewData.loading}>
  9. <div className={styles.overview}>
  10. <img
  11. className={styles.overview_bg}
  12. src={require("../../../../assets/bigscreen/overview-bg.png")}
  13. />
  14. <span className={styles.overview_title}>平台数据汇总</span>
  15. <div className={styles.overview_content}>
  16. <div className={styles.overview_content_item}>
  17. <img
  18. className={styles.item_img}
  19. src={require("../../../../assets/bigscreen/member.png")}
  20. />
  21. <CountUp
  22. className={styles.item_value}
  23. end={overviewData.data.memberNum}
  24. />
  25. <div className={styles.item_label}>会员</div>
  26. </div>
  27. <div className={styles.overview_content_item}>
  28. <img
  29. className={styles.item_img}
  30. src={require("../../../../assets/bigscreen/dis.png")}
  31. />
  32. <CountUp
  33. className={styles.item_value}
  34. end={overviewData.data.distributorNum}
  35. />
  36. <div className={styles.item_label}>分销商</div>
  37. </div>
  38. <div className={styles.overview_content_item}>
  39. <img
  40. className={styles.item_img}
  41. src={require("../../../../assets/bigscreen/store.png")}
  42. />
  43. <CountUp
  44. className={styles.item_value}
  45. end={overviewData.data.storeNum}
  46. />
  47. <div className={styles.item_label}>店铺</div>
  48. </div>
  49. <div className={styles.overview_content_item}>
  50. <img
  51. className={styles.item_img}
  52. src={require("../../../../assets/bigscreen/dis.png")}
  53. />
  54. <CountUp
  55. className={styles.item_value}
  56. end={overviewData.data.serviceProviderNum}
  57. />
  58. <div className={styles.item_label}>服务商</div>
  59. </div>
  60. <div className={styles.overview_content_item}>
  61. <img
  62. className={styles.item_img}
  63. src={require("../../../../assets/bigscreen/member.png")}
  64. />
  65. <CountUp
  66. className={styles.item_value}
  67. end={overviewData.data.productNum}
  68. />
  69. <div className={styles.item_label}>商品总数</div>
  70. </div>
  71. </div>
  72. <div className={styles.overview_member}>
  73. <img
  74. className={styles.overview_member_img}
  75. src={require("../../../../assets/bigscreen/overview-bg.png")}
  76. />
  77. <span className={styles.overview_member_title}>会员地域分布</span>
  78. </div>
  79. </div>
  80. // </Spin>
  81. );
  82. };
  83. export default connect(({ bigscreen }) => ({
  84. overviewData: bigscreen.overviewData,
  85. }))(OverView);