You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
3.1 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <!-- 流水页面 -->
  2. <template>
  3. <view class="running-water bx">
  4. <view class="type">
  5. <view
  6. :class="{select : index == select}"
  7. :key="index"
  8. @click="selectType(index)"
  9. v-for="(item, index) in type">
  10. <text>{{ item.name }}</text>
  11. </view>
  12. </view>
  13. <u-list @scrolltolower="scrolltolower" height="calc(100vh - 90rpx)">
  14. <!-- 流水列表 -->
  15. <view class="running-water-list content">
  16. <view v-for="item in runningWaterList" :key="item.id" class="running-water-item">
  17. <image src="@/static/runningWater/money.png" mode="aspectFit"></image>
  18. <view class="descript">[balance]</view>
  19. <view class="time">{{ item.createTime }}</view>
  20. <view class="money-detail">
  21. <text>{{ item.type == '0' ? '+' : '-' }}</text>
  22. {{ item.money }}
  23. </view>
  24. </view>
  25. </view>
  26. </u-list>
  27. <sTabbar/>
  28. </view>
  29. </template>
  30. <script>
  31. import index from '../../uni_modules/uview-ui'
  32. import navbar from '@/components/base/m-navbar.vue'
  33. export default {
  34. components: {
  35. navbar
  36. },
  37. data() {
  38. return {
  39. queryparams: {
  40. pageNo: 1,
  41. pageSize: 10
  42. },
  43. runningWaterList: [],
  44. select : 0,
  45. type : [
  46. {
  47. name : 'All'
  48. },
  49. {
  50. name : 'Income'
  51. },
  52. {
  53. name : 'Expenditure'
  54. },
  55. ]
  56. }
  57. },
  58. onShow() {
  59. this.getRunningWater()
  60. },
  61. methods: {
  62. leftClick() {
  63. uni.navigateTo({
  64. url: '/pages/center/center'
  65. })
  66. },
  67. selectType(index){
  68. this.select = index
  69. },
  70. //获取流水
  71. getRunningWater() {
  72. this.request('WaterPage', {}, this.queryparams).then(res => {
  73. if (res.code == 200) {
  74. this.runningWaterList = res.result.records
  75. }
  76. })
  77. },
  78. //滑动到页面底部
  79. scrolltolower(){
  80. this.queryparams.pageSize += 10
  81. this.getRunningWater()
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. .running-water {
  88. width: 750rpx;
  89. min-height: 100vh;
  90. background-color: #f7f7f7;
  91. margin: 0 auto;
  92. background-size: 100%;
  93. background-repeat: no-repeat;
  94. padding-top: 90rpx;
  95. .type{
  96. display: flex;
  97. background-color: #fff;
  98. position: fixed;
  99. width: 100%;
  100. top: 0;
  101. left: 0;
  102. height: 90rpx;
  103. justify-content: center;
  104. align-items: center;
  105. color: #989898;
  106. font-size: 28rpx;
  107. &>view{
  108. flex: 1;
  109. display: flex;
  110. justify-content: center;
  111. align-items: center;
  112. }
  113. .select{
  114. color: #000;
  115. text{
  116. padding-bottom: 10rpx;
  117. border-bottom: 3px solid #000;
  118. }
  119. }
  120. }
  121. .content {
  122. width: 96%;
  123. margin: 0 auto;
  124. }
  125. .running-water-list {
  126. display: flex;
  127. justify-content: space-between;
  128. flex-wrap: wrap;
  129. margin-top: 20rpx;
  130. .running-water-item {
  131. display: flex;
  132. flex-direction: column;
  133. align-items: center;
  134. box-sizing: border-box;
  135. padding: 15rpx;
  136. width: calc(50% - 15rpx);
  137. border: 1px solid #00000080;
  138. margin-bottom: 25rpx;
  139. image {
  140. width: 100rpx;
  141. height: 100rpx;
  142. }
  143. .descript {
  144. // color: #AEC43C;
  145. font-size: 36rpx;
  146. }
  147. .time {
  148. color: #989898;
  149. margin: 15rpx 0rpx;
  150. }
  151. .money-detail {
  152. // color: #3AA56B;
  153. font-size: 36rpx;
  154. }
  155. }
  156. }
  157. }
  158. </style>