index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="com-ward">
  3. <view class="com-ward-list">
  4. <view
  5. class="com-ward-list-item u-border-bottom"
  6. v-for="item in list"
  7. :key="item.id"
  8. >
  9. <view class="fl_b com-ward-list-item-top">
  10. <image src="../../static/image/icon_com.png" mode="" />
  11. <view class="title u-line-1"
  12. >活动名称一行展示,超出省略活动名称一行展示,超出省略...</view
  13. >
  14. <view class="money">+{{ item.diffNum }}</view>
  15. </view>
  16. <view class="com-ward-list-item-status">
  17. {{ item.createTime | formate("yyyy-mm-dd hh:mm") }}
  18. </view>
  19. </view>
  20. </view>
  21. <view class="nomore" v-if="total && list.length == tota">
  22. "已显示全部"
  23. </view>
  24. <view class="nomore" v-if="!total"> 暂无数据 </view>
  25. </view>
  26. </template>
  27. <script>
  28. import { getCashList } from "@/utils/commission";
  29. export default {
  30. name: "commission",
  31. data() {
  32. return {
  33. list: [],
  34. total: 0,
  35. param: {},
  36. };
  37. },
  38. onShow() {
  39. this.reset();
  40. this.getCashList();
  41. },
  42. onReachBottom() {
  43. if (this.list.length >= this.total) {
  44. return;
  45. }
  46. this.param.pageNum++;
  47. this.getCashList();
  48. },
  49. methods: {
  50. reset() {
  51. this.actList = [];
  52. this.param = {
  53. pageNum: 1,
  54. pageSize: 10,
  55. };
  56. },
  57. getCashList() {
  58. getCashList(this.param).then((res) => {
  59. this.list.push(...res.rows);
  60. this.total = res.total;
  61. });
  62. },
  63. },
  64. };
  65. </script>
  66. <style lang="scss" scoped>
  67. page {
  68. background: #ffffff;
  69. padding: 20rpx 40rpx 0;
  70. }
  71. .com-ward {
  72. .com-ward-list {
  73. .com-ward-list-item {
  74. margin-top: 40rpx;
  75. .com-ward-list-item-top {
  76. image {
  77. width: 32rpx;
  78. height: 32rpx;
  79. margin-right: 14rpx;
  80. padding-top: 4rpx;
  81. }
  82. .title {
  83. flex: 1;
  84. font-weight: bold;
  85. color: #24263d;
  86. font-size: 32rpx;
  87. }
  88. .money {
  89. width: 160rpx;
  90. color: #eb5757;
  91. font-size: 36rpx;
  92. font-weight: 500;
  93. text-align: right;
  94. }
  95. }
  96. .com-ward-list-item-status {
  97. margin: 24rpx 0 40rpx;
  98. color: #7e7d83;
  99. font-size: 28rpx;
  100. padding-left: 44rpx;
  101. }
  102. }
  103. }
  104. }
  105. </style>