other.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <view :class="[AppTheme]">
  3. <view class="content">
  4. <view class="jl">
  5. <view class="h69" v-for="(item, index) in fundsLIst" :key="index">
  6. <view class="jl-c">
  7. <view class="flex">
  8. <view class="sr">{{ item.oid }}</view>
  9. <view class="sr-p text-neutral">{{ item.money }}</view>
  10. </view>
  11. <view class="pt16">{{ item.remark }}</view>
  12. </view>
  13. <view class="time">{{ item.ctime }}</view>
  14. </view>
  15. </view>
  16. </view>
  17. <u-loadmore :status="more" />
  18. </view>
  19. </template>
  20. <script>
  21. import fundsApi from '@/api/wall/index.js';
  22. export default {
  23. name: 'Other',
  24. data() {
  25. return {
  26. primary: this.$theme.primary,
  27. settingFile: getApp().globalData.siteinfo,
  28. nodata: '',
  29. more: 'more', //@value more loading前 @value loading loading中 @value 'noMore' 没有更多了
  30. tabTitle: ['全部', '项目', '收益', '本金'],
  31. cur: 0, //默认选中第一个tab
  32. p: 1,
  33. fundsLIst: []
  34. };
  35. },
  36. onReachBottom() {
  37. this.p++;
  38. this.more = 'loading';
  39. setTimeout(() => {
  40. this.getFundsLIst();
  41. }, 500);
  42. },
  43. onLoad() {
  44. this.getFundsLIst();
  45. },
  46. methods: {
  47. getFundsLIst() {
  48. fundsApi.record({
  49. p: this.p,
  50. pagesize: 10,
  51. type: 5
  52. }).then(res => {
  53. if (res.status == 200) {
  54. this.fundsLIst = this.fundsLIst.concat(res.data);
  55. if (res.data.length === 0) {
  56. this.more = 'noMore';
  57. }
  58. } else {
  59. this.more = 'noMore';
  60. }
  61. });
  62. }
  63. },
  64. onPullDownRefresh() {
  65. this.p = 1;
  66. this.fundsLIst = [];
  67. this.getFundsLIst();
  68. setTimeout(() => {
  69. uni.stopPullDownRefresh();
  70. }, 600);
  71. },
  72. };
  73. </script>
  74. <style lang="scss">
  75. .content {
  76. padding: 5rpx 15rpx 0rpx 15rpx;
  77. .h69 {
  78. background-color: #ffffff;
  79. padding: 21rpx 0;
  80. margin-bottom: 20rpx;
  81. overflow: hidden;
  82. border-radius: 15rpx;
  83. }
  84. .jl {
  85. width: 100%;
  86. margin-top: 20rpx
  87. }
  88. .jl .jl-c {
  89. width: calc(100% - 80rpx);
  90. margin: 0 auto;
  91. justify-content: space-between;
  92. align-items: center;
  93. overflow: hidden;
  94. .flex {
  95. display: flex;
  96. justify-content: space-between;
  97. border-bottom: 1px solid #eeeeee;
  98. padding-bottom: 12rpx;
  99. .sr {
  100. font-size: 26rpx;
  101. font-family: PingFang SC;
  102. font-weight: 500;
  103. color: rgba(51, 51, 51, 1);
  104. line-height: 36rpx;
  105. }
  106. .sr-p {
  107. font-size: 30rpx;
  108. font-family: PingFang SC;
  109. font-weight: bold;
  110. }
  111. }
  112. }
  113. .jl .pt16 {
  114. font-size: 26rpx;
  115. font-family: PingFang SC;
  116. font-weight: 500;
  117. color: rgba(51, 51, 51, 1);
  118. line-height: 36rpx;
  119. padding-top: 16rpx;
  120. }
  121. .jl .time {
  122. font-size: 24rpx;
  123. font-family: PingFang SC;
  124. font-weight: 500;
  125. color: rgba(153, 153, 153, 1);
  126. margin-left: 40rpx;
  127. margin-top: 10rpx;
  128. }
  129. }
  130. </style>