nodeDetail.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="container">
  3. <view class="centerBox ">
  4. <view class="itemList border-linear-gradient">
  5. <view class="list">
  6. <view class="item flex" v-for="(item,index) in listAll">
  7. <view class="leftItem">
  8. <view class="itemName">
  9. {{item.title}}
  10. </view>
  11. <view class="itemTime margin-t-20">
  12. {{item.createtime|dateFormat}}
  13. </view>
  14. </view>
  15. <view class="rightItem">
  16. <view class="on text-linear-gradient">
  17. +{{item.money}}
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <u-loadmore :status="loading" line :loadmoreText="$t('base.加载更多')" :loadingText="$t('base.正在加载')"
  24. :nomoreText="$t('base.没有更多了')" />
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import {
  30. mapMutations
  31. } from "vuex";
  32. import {
  33. moneyLog
  34. } from '@/api/index.js';
  35. import dayjs from '@/libs/dayjs/dayjs.min.js';
  36. export default {
  37. data() {
  38. return {
  39. listAll: [],
  40. loading: 'loadmore', //'上拉加載更多','加載中','沒有更多'
  41. page: 1,
  42. limit: 10,
  43. shareNum: 0,
  44. itemNum: 0,
  45. }
  46. },
  47. filters: {
  48. dateFormat: function(value) {
  49. return dayjs(value * 1000).format('YYYY/MM/DD hh:mm:ss');
  50. },
  51. },
  52. onLoad(option) {
  53. this.getList();
  54. },
  55. onReachBottom() {
  56. this.getList()
  57. },
  58. methods: {
  59. ...mapMutations('user', ['setUserInfo']),
  60. // 获取列表
  61. getList() {
  62. const that = this;
  63. if (that.loading == 'nomore' || that.loding == "loading") {
  64. return
  65. }
  66. that.loading = 'loading';
  67. moneyLog({
  68. page: that.page,
  69. limit: that.limit,
  70. type:"point_day_send"
  71. }).then((res) => {
  72. const list = res.data.list.map((rs) => {
  73. rs.money = +rs.money;
  74. return rs
  75. })
  76. that.listAll = that.listAll.concat(list);
  77. if (list.length != that.limit) {
  78. that.loading = 'nomore'
  79. } else {
  80. that.page++
  81. that.loading = 'loadmore'
  82. }
  83. }).catch((res) => {
  84. console.log(res);
  85. })
  86. },
  87. },
  88. }
  89. </script>
  90. <style lang="scss">
  91. .container {
  92. width: 100%;
  93. line-height: 1;
  94. background-color: rgb(12, 8, 21);
  95. min-height: 100vh;
  96. }
  97. .centerBox {
  98. padding: 30rpx;
  99. color: #FFF;
  100. .itemList {
  101. border-radius: 20rpx;
  102. padding: 20rpx 30rpx 40rpx;
  103. .list {
  104. min-height: 700rpx;
  105. .item {
  106. border-bottom: 1px solid rgba(240, 240, 240, .3);
  107. padding: 20rpx 0;
  108. }
  109. .leftItem {
  110. .itemName {
  111. font-weight: bold;
  112. font-size: 29rpx;
  113. }
  114. .itemTime {
  115. font-weight: 500;
  116. font-size: 22rpx;
  117. color: #FFFFFF;
  118. opacity: 0.5;
  119. }
  120. }
  121. .rightItem {
  122. font-weight: 500;
  123. font-size: 30rpx;
  124. }
  125. }
  126. }
  127. }
  128. </style>