PointsDetail.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view :class="['qn-page-' + theme]">
  3. <view class="detail-ul">
  4. <view class="detail-li" v-for="(item, index) in detail_list" :key="index">
  5. <!-- 摘要 -->
  6. <view class="ellipsis title">{{ item.title }}</view>
  7. <!-- 创建时间 -->
  8. <view class="time">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
  9. <!-- 剩余股权 -->
  10. <view class="money"><span>{{ parseInt(item.type) === 4 ? "-" : "+" }}</span>{{ item.amount }}</view>
  11. </view>
  12. <!-- 空白页 -->
  13. <Aempty text="暂无数据" src="https://onlineimg.qianniao.vip/list.png" v-if="detail_list.length === 0"></Aempty>
  14. <u-loadmore v-else :status="loading_status" />
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. loading_status: 'nomore',
  23. page: 1,
  24. pageSize: 10,
  25. total: 0,
  26. detail_list: []
  27. };
  28. },
  29. computed: {
  30. userId() {
  31. return this.$store.state.userStatus.id;
  32. }
  33. },
  34. onLoad() {
  35. this.getAllCustomerIntegralDesc();
  36. },
  37. onPullDownRefresh() {
  38. this.page = 1;
  39. this.getAllCustomerIntegralDesc();
  40. },
  41. onReachBottom() {
  42. if (this.total / this.pageSize > this.page) {
  43. this.page += 1;
  44. this.getAllCustomerIntegralDesc();
  45. }
  46. },
  47. methods: {
  48. // 股权流水
  49. getAllCustomerIntegralDesc() {
  50. this.loading_status = 'loading';
  51. this.$u.api.getAllCustomerIntegralDesc({
  52. // star:'',
  53. // end:'',
  54. customerId: this.userId,
  55. page: this.page,
  56. pageSize: this.pageSize,
  57. }).then(res => {
  58. uni.stopPullDownRefresh();
  59. this.detail_list = res.data.lists
  60. if (this.page === 1) {
  61. this.detail_list = res.data.lists;
  62. } else {
  63. this.detail_list = this.detail_list.concat(res.data.lists);
  64. }
  65. this.total = res.pageTotal;
  66. this.loading_status = this.$_utils.loadStatus(this.page, this.pageSize, this.total);
  67. }).catch(res=>{
  68. this.loading_status = 'nomore';
  69. uni.stopPullDownRefresh();
  70. });
  71. },
  72. }
  73. };
  74. </script>
  75. <style lang="scss" scoped>
  76. .detail-ul {
  77. .detail-li {
  78. width: 710rpx;
  79. margin: 20rpx auto;
  80. background-color: #ffffff;
  81. border-radius: 16rpx;
  82. padding: 24rpx;
  83. position: relative;
  84. .title {
  85. font-weight: bold;
  86. padding-bottom: 12rpx;
  87. -webkit-line-clamp: 2;
  88. }
  89. .time {
  90. font-size: 24rpx;
  91. color: #6c6c6c;
  92. }
  93. .money {
  94. position: absolute;
  95. font-family: DIN-Medium;
  96. right: 24rpx;
  97. top: 50%;
  98. font-weight: bold;
  99. transform: translateY(-50%);
  100. color: $price-color;
  101. }
  102. }
  103. }
  104. </style>