BuyRecordList.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div>
  3. <div class="list-header">
  4. <div class="header-text haeder-account">被邀请账号</div>
  5. <div class="header-text haeder-pay">付费金额</div>
  6. <div class="header-text header-time">购买时间</div>
  7. <div class="header-text header-back">佣金</div>
  8. </div>
  9. <div class="record-list">
  10. <div class="record-item" v-for="(item, index) in data" :key="index">
  11. <div class="body-text record-account">{{ item.newPhone | phone }}</div>
  12. <div class="body-text record-pay">¥{{ item.totalAmount }}</div>
  13. <div class="body-text record-time">{{ item.finishTime }}</div>
  14. <div class="body-text record-back">¥{{ item.rakeBackAmount }}</div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. export default {
  21. name: 'BuyRecordList',
  22. props: {
  23. data: {
  24. type: Array,
  25. default: () => []
  26. }
  27. },
  28. filters: {
  29. phone(val) {
  30. if (!val) return ''
  31. return val.slice(0, 3) + '****' + val.slice(7)
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss" scoped>
  37. .list-header{
  38. background-color: #FFEED7;
  39. display: flex;
  40. flex-wrap: nowrap;
  41. justify-content: space-around;
  42. .header-text{
  43. text-align: center;
  44. font-weight: 400;
  45. font-size: 12px;
  46. color: #333;
  47. line-height: 24px;
  48. }
  49. }
  50. .haeder-account,.record-account{
  51. flex: 0 0 75px;
  52. }
  53. .haeder-pay.record-pay{
  54. flex: 0 0 48px;
  55. }
  56. .header-time,.record-time{
  57. flex: 0 0 130px;
  58. }
  59. .header-back,.record-back{
  60. flex: 0 0 48px;
  61. }
  62. .record-list{
  63. min-height: 165px;
  64. }
  65. .record-item{
  66. display: flex;
  67. flex-wrap: nowrap;
  68. justify-content: space-around;
  69. .body-text{
  70. text-align: center;
  71. line-height: 33px;
  72. }
  73. }
  74. </style>