dyquan.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view :class="['qn-page-' + theme]" style="height: 100vh">
  3. <view class="content">
  4. <view class="dyquan-wrap" v-for="(item,index) in list" :key="index">
  5. <view class="showtime">
  6. <text class="float_left order-no-text">{{ $_utils.formatDate(item.createTime) }}</text>
  7. </view>
  8. <view class="item-info">
  9. <image :src="item.image" mode=""></image>
  10. <view class="info-info">
  11. <view class="clamp2">
  12. {{item.name}}
  13. </view>
  14. <view class="info-cs">
  15. 剩余使用次数:{{item.number}}
  16. </view>
  17. </view>
  18. </view>
  19. <!-- <view class="btm">
  20. <view class="primary-btn btn" @click="goPage('/pagesT/unit/itemdetail?id=' + item.project_id)">
  21. 立即使用
  22. </view>
  23. </view> -->
  24. </view>
  25. <u-loadmore :status="loadingType" />
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. page: 1,
  34. pageSize: 10,
  35. loaded: false,
  36. loadingType: 'loadmore',
  37. list: []
  38. }
  39. },
  40. onLoad(opt) {
  41. },
  42. onShow() {
  43. this.getList()
  44. },
  45. onReachBottom() {
  46. this.getList()
  47. },
  48. onReady() {
  49. },
  50. methods: {
  51. tabClick(item, index) {
  52. this.tabCurrentIndex = index;
  53. },
  54. getList(type) {
  55. let that = this
  56. if (type == 'reload') {
  57. // item.list
  58. return
  59. }
  60. if (type == 'tab' && that.loaded) {
  61. return
  62. }
  63. if (that.loadingType == 'loading' || that.loadingType == 'nomore') {
  64. return
  65. }
  66. that.loadingType = 'loading'
  67. that.$u.api.getDyquanList({
  68. page: that.page,
  69. pageSize: that.pageSize,
  70. name: ''
  71. }).then(({
  72. data
  73. }) => {
  74. that.list = that.list.concat(data)
  75. that.page++
  76. if (data.length == that.pageSize) {
  77. that.loadingType = 'loadmore'
  78. } else {
  79. that.loadingType = 'nomore'
  80. }
  81. })
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="scss">
  87. .content {
  88. background-color:#f8f6f6 ;
  89. height: auto;
  90. min-height: 100%;
  91. }
  92. .dyquan-wrap {
  93. padding: 20rpx;
  94. background-color: #fff;
  95. margin-bottom: 15rpx;
  96. .showtime {
  97. height: 50rpx;
  98. }
  99. .item-info {
  100. width: 750rpx;
  101. height: 205rpx;
  102. background: #F7F7F7;
  103. display: flex;
  104. justify-content: flex-start;
  105. align-items: center;
  106. image {
  107. width: 160rpx;
  108. height: 160rpx;
  109. margin-right: 30rpx;
  110. }
  111. .info-info {
  112. height: 160rpx;
  113. padding: 15rpx 0;
  114. padding-right: 50rpx;
  115. font-size: 30rpx;
  116. font-weight: 500;
  117. color: #666666;
  118. display: flex;
  119. flex-direction: column;
  120. justify-content: space-between;
  121. align-items: flex-start;
  122. .info-cs {
  123. font-size: 26rpx;
  124. font-weight: 500;
  125. color: #999999;
  126. }
  127. }
  128. }
  129. .btm {
  130. width: 100%;
  131. height: 95rpx;
  132. background-color: #fff;
  133. display: flex;
  134. justify-content: flex-end;
  135. align-items: center;
  136. .btn {
  137. width: 144rpx;
  138. height: 55rpx;
  139. border-radius: 28rpx;
  140. font-size: 26rpx;
  141. font-weight: 500;
  142. color: #FFFFFF;
  143. line-height: 55rpx;
  144. text-align: center;
  145. }
  146. }
  147. }
  148. </style>