earn_records.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <view class="container">
  3. <view v-if="emptyType==0" >
  4. <view v-for="item in dataList" class="item" @tap="handleClick(item.id)">
  5. <view class="item-left">
  6. <image :src="item.buyUserAvatar?item.buyUserAvatar:''" mode="aspectFit"></image>
  7. <view>
  8. <view class="item-name">{{item.buyUserName}}</view>
  9. <view class="item-date">交易日期:{{item.createdDate}}</view>
  10. </view>
  11. </view>
  12. <view class="sum">+{{item.commission}}</view>
  13. </view>
  14. </view>
  15. <DtNoMore v-if="isNoMore" />
  16. <DtEmpty :type="emptyType" />
  17. </view>
  18. </template>
  19. <script>
  20. import DtNoMore from "../comps/dt_no_more.vue";
  21. import DtEmpty from '../comps/dt_empty.vue'
  22. export default {
  23. components: {
  24. DtEmpty
  25. },
  26. data() {
  27. return {
  28. memberId:'',
  29. dataList:[]
  30. };
  31. },
  32. methods:{
  33. onLoadPage() {
  34. this.memberId = this.$auth.getMemberId();
  35. this.getData()
  36. },
  37. async getData(){
  38. let resp = await this.$api.getMyDistributionCommissionRecords({
  39. _isShowLoading: true,
  40. // memberId:this.memberId,
  41. pageNo:this.pageIndex,
  42. pageSize:this.pageSize,
  43. })
  44. let list = this.getDataList(resp)
  45. this.dataList = this.dataList.concat(list)
  46. },
  47. handleClick(id){
  48. uni.navigateTo({
  49. url:"/pagesM/pages/earn_details?id="+id
  50. })
  51. }
  52. },
  53. onReachBottom() {
  54. this.onReachBottomPage()
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .container{
  60. height: 100vh;
  61. border-top: 2upx solid rgba(238,238,238,1);
  62. .item{
  63. display: flex;
  64. align-items: center;
  65. justify-content: space-between;
  66. margin-left: 16upx;
  67. padding-left: 24upx;
  68. padding-right: 40upx;
  69. height: 108upx;
  70. background-color: #fff;
  71. border-bottom: 2upx solid rgba(238,238,238,1);
  72. .item-left{
  73. display: flex;
  74. image{
  75. width:66upx;
  76. height:66upx;
  77. border-radius:50%;
  78. background-color: #f7f7f7;
  79. margin-right: 21upx;
  80. display: block;
  81. }
  82. .item-name{
  83. height:28upx;
  84. font-size:30upx;
  85. font-family:PingFang SC;
  86. font-weight:400;
  87. color:rgba(51,51,51,1);
  88. margin-bottom: 13upx;
  89. }
  90. .item-date{
  91. height:23upx;
  92. font-size:24upx;
  93. font-family:PingFang SC;
  94. font-weight:400;
  95. color:rgba(153,153,153,1);
  96. }
  97. }
  98. .sum{
  99. font-size:36upx;
  100. font-family:PingFang SC;
  101. font-weight:500;
  102. color:rgba(51,51,51,1);
  103. }
  104. .line{
  105. width:100%;
  106. height:2upx;
  107. background:rgba(238,238,238,1);
  108. }
  109. }
  110. }
  111. </style>