hxjl.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view class="content">
  3. <view class="" style="height: 20rpx;"></view>
  4. <empty v-if="list.length === 0"></empty>
  5. <view class="hx-wrap" v-for="item in list">
  6. <view class="hx-tit flex">
  7. <view class="hx-time">核销时间:{{ item.add_time }}</view>
  8. <view class="hx-status">已核销</view>
  9. </view>
  10. <view class="hx-info flex">
  11. <view class="user-logo"><image src="../../static/error/missing-face.png" mode=""></image></view>
  12. <view class="user-info">
  13. <view class="info-name clamp">{{ item.nickname }}</view>
  14. <!-- <view class="info-phone">137****5213</view> -->
  15. <view class="info-info">实付:¥{{ item.coupon_price }} 数量:1</view>
  16. </view>
  17. </view>
  18. </view>
  19. <uni-load-more :status="loadingType"></uni-load-more>
  20. <view class="" style="height: 3rpx;"></view>
  21. </view>
  22. </template>
  23. <script>
  24. import empty from '@/components/empty';
  25. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  26. import { write_off } from '@/api/user.js';
  27. export default {
  28. components: {
  29. empty,
  30. uniLoadMore
  31. },
  32. data() {
  33. return {
  34. loadingType: 'more',
  35. list: [],
  36. page: 1,
  37. limit: 10
  38. };
  39. },
  40. onShow() {
  41. this.getList();
  42. },
  43. onReachBottom() {
  44. this.getList();
  45. },
  46. methods: {
  47. getList() {
  48. let obj = this;
  49. if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
  50. return;
  51. }
  52. obj.loadingType = 'loading';
  53. write_off({
  54. page: obj.page,
  55. limit: obj.limit
  56. }).then(data => {
  57. console.log(data, '123456789');
  58. obj.list = obj.list.concat(data.data);
  59. if (obj.limit == data.data.length) {
  60. obj.page++;
  61. obj.loadingType = 'more';
  62. } else {
  63. obj.loadingType = 'nomore';
  64. }
  65. });
  66. }
  67. }
  68. };
  69. </script>
  70. <style lang="scss">
  71. .hx-wrap {
  72. width: 702rpx;
  73. height: 194rpx;
  74. background: #ffffff;
  75. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  76. border-radius: 10rpx;
  77. margin: 0 auto 17rpx;
  78. padding: 30rpx 30rpx 0;
  79. .hx-tit {
  80. font-size: 26rpx;
  81. font-weight: 500;
  82. color: #999999;
  83. }
  84. .hx-info {
  85. justify-content: flex-start;
  86. padding-top: 20rpx;
  87. .user-logo {
  88. flex-shrink: 0;
  89. image {
  90. width: 64rpx;
  91. height: 64rpx;
  92. }
  93. }
  94. .user-info {
  95. padding-left: 26rpx;
  96. max-width: 500rpx;
  97. .info-name {
  98. font-size: 30rpx;
  99. font-weight: bold;
  100. color: #333333;
  101. }
  102. .info-phone {
  103. font-size: 30rpx;
  104. font-weight: 500;
  105. color: #666666;
  106. }
  107. .info-info {
  108. font-size: 22rpx;
  109. font-weight: 400;
  110. color: #999999;
  111. }
  112. }
  113. }
  114. }
  115. </style>