logList.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="log-list">
  3. <zs-list class="store-box" mt="0" @load="loadMore" :status="status">
  4. <view class="item" v-for="(item,index) in list" :key="index">
  5. <image class="icon" :src="JSON.parse(item.equityContent).icon" mode=""></image>
  6. <view class="info">
  7. <view class="title">
  8. {{JSON.parse(item.equityContent).equityName}}
  9. </view>
  10. <view class="time">
  11. 领取时间:{{item.createTime}}
  12. </view>
  13. </view>
  14. <view class="status" :class="[item.status == 1?'':'used']">
  15. {{item.status == 1?'待充值':'已充值'}}
  16. </view>
  17. </view>
  18. </zs-list>
  19. </view>
  20. </template>
  21. <script>
  22. import {getLogList} from '@/api/combo.js'
  23. export default {
  24. data() {
  25. return {
  26. list:[],
  27. status:'more',
  28. query:{
  29. currentPage:1,
  30. pageSize:10,
  31. }
  32. }
  33. },
  34. methods: {
  35. loadMore(){
  36. this.getLogList()
  37. },
  38. getLogList(){
  39. if(this.status == 'noMore' || this.status == 'loading') return
  40. this.status = 'loading'
  41. getLogList(this.query).then(res=>{
  42. if(res.state == 'Success'){
  43. this.list = this.list.concat(res.content.records)
  44. if(this.list.length >= res.content.total){
  45. this.status = 'noMore'
  46. }else{
  47. this.status = 'more'
  48. }
  49. }
  50. })
  51. }
  52. },
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. .log-list{
  57. background: #F9F9F9;
  58. padding: 20rpx 24rpx;
  59. min-height: 100vh;
  60. .zs-list {
  61. .item {
  62. padding: 24rpx 0;
  63. border-bottom: 2rpx solid #F0F0F0;
  64. display: flex;
  65. align-items: center;
  66. .icon{
  67. width: 160rpx;
  68. height: 160rpx;
  69. border-radius: 16rpx;
  70. }
  71. .info{
  72. flex: 1;
  73. margin-left: 20rpx;
  74. .title{
  75. font-weight: 600;
  76. font-size: 32rpx;
  77. color: #222222;
  78. }
  79. .time{
  80. font-size: 24rpx;
  81. color: #AAAAAA;
  82. margin-top: 20rpx;
  83. }
  84. }
  85. .status{
  86. width: 120rpx;
  87. height: 52rpx;
  88. line-height: 52rpx;
  89. text-align: center;
  90. background: #EE4320;
  91. border-radius: 26rpx 26rpx 26rpx 26rpx;
  92. font-size: 28rpx;
  93. color: #FFFFFF;
  94. }
  95. .status.used{
  96. background: rgba(238,67,32,0.1);
  97. color: #EE4320;
  98. }
  99. }
  100. }
  101. }
  102. </style>