balance_info.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="main">
  3. <view class="opinionList flex align-center justify-between padding-lr-sm" v-for="(item,index) in balanceList">
  4. <view class="">
  5. <view class="flex align-center justify-between">
  6. <view class="flex align-center justify-between">
  7. <view class="margin-top-sm text-lg">
  8. {{item.remark}}
  9. </view>
  10. </view>
  11. </view>
  12. <view class="flex align-center margin-top-sm">
  13. <view class="margin-right-xs" style="color: #999999;">
  14. {{item.created_at}}
  15. </view>
  16. </view>
  17. </view>
  18. <view class="text-lg" style="color: #333333;">
  19. {{item.change_balance/100}}
  20. </view>
  21. </view>
  22. <u-empty text="暂无数据" :show="show" mode="order" margin-top="250"></u-empty>
  23. <view class="cu-tabbar-height"></view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. balanceList: [],
  31. pageindex: 1,
  32. show: false
  33. };
  34. },
  35. onReachBottom() {
  36. this.getbalanceinfo()
  37. },
  38. methods: {
  39. getbalanceinfo: async function() {
  40. let res = await this.$request.post("/api/v1/user/userBalanceLog", {
  41. page: this.pageindex
  42. })
  43. if (res.status == 0) {
  44. if (this.pageindex > res.data.last_page) {
  45. uni.showToast({
  46. title: "没有更多了",
  47. icon: "none"
  48. })
  49. } else {
  50. this.balanceList = this.balanceList.concat(res.data.data)
  51. this.pageindex++
  52. }
  53. }
  54. if (this.balanceList.length == 0) {
  55. this.show = true
  56. } else {
  57. this.show = false
  58. }
  59. }
  60. },
  61. onShow() {
  62. this.getbalanceinfo()
  63. }
  64. };
  65. </script>
  66. <style scoped lang="scss">
  67. .opinionList {
  68. padding-top: 40rpx;
  69. padding-bottom: 40rpx;
  70. border-radius: 16rpx;
  71. box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
  72. margin-left: 20rpx;
  73. margin-right: 20rpx;
  74. margin-top: 15rpx;
  75. }
  76. .title_yijian {
  77. font-size: 20rpx;
  78. padding: 8rpx;
  79. border-radius: 20rpx;
  80. background-color: #0B73B9;
  81. color: #fff;
  82. width: 90rpx;
  83. text-align: center;
  84. margin-left: 20rpx;
  85. margin-right: 10rpx;
  86. }
  87. </style>