balance_info.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. <view class="cu-tabbar-height"></view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. balanceList: [],
  30. pageindex: 1
  31. };
  32. },
  33. onReachBottom() {
  34. this.getbalanceinfo()
  35. },
  36. methods: {
  37. getbalanceinfo: async function() {
  38. let res = await this.$request.post("/api/v1/user/userBalanceLog", {
  39. page: this.pageindex
  40. })
  41. console.log(res)
  42. if (res.status == 0) {
  43. if (this.pageindex > res.data.last_page) {
  44. console.log("sssss")
  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. }
  55. },
  56. onShow() {
  57. this.getbalanceinfo()
  58. }
  59. };
  60. </script>
  61. <style scoped lang="scss">
  62. .opinionList {
  63. padding-top: 40rpx;
  64. padding-bottom: 40rpx;
  65. border-radius: 16rpx;
  66. box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
  67. margin-left: 20rpx;
  68. margin-right: 20rpx;
  69. margin-top: 15rpx;
  70. }
  71. .title_yijian {
  72. font-size: 20rpx;
  73. padding: 8rpx;
  74. border-radius: 20rpx;
  75. background-color: #0B73B9;
  76. color: #fff;
  77. width: 90rpx;
  78. text-align: center;
  79. margin-left: 20rpx;
  80. margin-right: 10rpx;
  81. }
  82. </style>