WithdrawList.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  2. <seller-base :show="false"><view style="position: absolute;top:0;right:0;left:0;bottom:0" class="scroll-view-wrapper div container">
  3. <view class="div common-header-wrap">
  4. <view class="status-holder"></view>
  5. <view :style="'height:'+navHeight+'px'"></view>
  6. <view class="common-header-holder"></view>
  7. <view class="common-header-fixed">
  8. <title-header />
  9. <uni-nav-bar title="提现记录" class="common-header" left-icon="back" @clickLeft="goBack()">
  10. </uni-nav-bar>
  11. </view>
  12. </view>
  13. <view class="scroll-view div" style="position:relative">
  14. <scroll-view style="position: absolute;top:0;right:0;left:0;bottom:0" class="div mt-5" @scrolltolower="loadMore" scroll-y="true">
  15. <view class="div item mb-5" v-for="item in logList" :key="item.log_id">
  16. <view class="div mt-wrapper">
  17. <view class="div mt">
  18. <text class="h2">可用资金:{{item.store_avaliable_money}}</text>
  19. </view>
  20. <view class="div mt">
  21. <text class="h2">冻结资金:{{item.store_freeze_money}}</text>
  22. </view>
  23. </view>
  24. <view class="div mc">
  25. {{item.storemoneylog_desc}}
  26. </view>
  27. <view class="div time"> {{ $moment.unix(item.storemoneylog_add_time).format('YYYY-MM-DD h:mm:ss') }}</view>
  28. </view>
  29. <empty-record v-if="logList && !logList.length"></empty-record>
  30. </scroll-view>
  31. </view>
  32. </view>
  33. </seller-base>
  34. </template>
  35. <script>
  36. import {getFontSize} from '@/util/common'
  37. import TitleHeader from '../../TitleHeader'
  38. import SellerBase from '../SellerBase'
  39. import EmptyRecord from '../../EmptyRecord'
  40. import { getSellerMoneyWithdrawList } from '../../../api/sellerMoney'
  41. export default {
  42. name: 'LogList',
  43. components:{
  44. TitleHeader,
  45. SellerBase,
  46. EmptyRecord
  47. },
  48. computed:{
  49. fontSize(){
  50. return getFontSize()
  51. },
  52. },
  53. data(){
  54. return {
  55. navHeight: 0,
  56. params: { 'page': 0, 'per_page': 10 },
  57. loading: false, // 是否加载更多
  58. isMore: true, // 是否有更多
  59. logList: false // 记录列表
  60. }
  61. },
  62. created () {
  63. this.loadMore()
  64. },
  65. mounted(){
  66. // #ifdef MP-WEIXIN
  67. this.navHeight = uni.getMenuButtonBoundingClientRect().height
  68. // #endif
  69. },
  70. methods:{
  71. goBack(){uni.navigateBack({delta:1})},
  72. getLogList (ispush) {
  73. uni.showLoading({ title: '加载中' })
  74. let params = this.params
  75. getSellerMoneyWithdrawList(params).then(res => {
  76. uni.hideLoading()
  77. if (ispush && this.logList) {
  78. this.logList = this.logList.concat(res.result.log_list)
  79. } else {
  80. this.logList = res.result.log_list
  81. }
  82. if (res.result.hasmore) {
  83. this.isMore = true
  84. } else {
  85. this.isMore = false
  86. }
  87. })
  88. },
  89. loadMore () {
  90. this.loading = true
  91. this.params.page = ++this.params.page
  92. if (this.isMore) {
  93. this.loading = false
  94. this.getLogList(true)
  95. }
  96. }
  97. }
  98. }
  99. </script>
  100. <style scoped lang="scss">
  101. .scroll-view-wrapper{display: flex;flex-direction: column;}
  102. .scroll-view{flex:1}
  103. .item{padding:.5rem;background:#fff;}
  104. .item .mt-wrapper{display: flex}
  105. .item .mt{height:2rem;line-height:2rem;flex:1}
  106. .item .mt .h2{font-weight:bold;font-size:$subFontSize}
  107. .item .time{font-size:$fontSize;color:gray}
  108. .item .mc{padding-top:.5rem;line-height:1rem;font-size:$subFontSize;}
  109. </style>