luckList.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <view class="content">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'中奖记录'" :cj="4"></homenav>
  4. <!-- <view class="tabToptyh">
  5. <view class="tabToplieyh" @click="getList(0)" :class="{'tablineActyh':chooseTab==0}">未兑奖</view>
  6. <view class="tabToplieyh" @click="getList(1)" :class="{'tablineActyh':chooseTab==1}">已兑奖</view>
  7. </view> -->
  8. <view class="tab">
  9. <view class="tabLine" :class="{tabActive:chooseTab==0}" @click="getList(0)">未兑奖</view>
  10. <view class="tabLine" :class="{tabActive:chooseTab==1}" @click="getList(1)">已兑奖</view>
  11. </view>
  12. <view class="newluckLinebox">
  13. <view class="coupon-item newluckLine" style="flex-direction: column;padding: 15px 10px;box-sizing: border-box;height: auto"
  14. v-for="item in list">
  15. <view class=" newluckLineActName">{{item.ActName}}</view>
  16. <view class="luckDrawBpttom">
  17. <view class="luckDrawBtime">抽奖时间: {{item.DrawTime}}</view>
  18. <view class="luckDrawBdengji">{{item.PrizeName}}/{{item.PrizeValue}}</view>
  19. </view>
  20. <view class="luckDrawBtimedj" v-if="item.TakeTime">
  21. 兑奖时间: {{item.TakeTime}}
  22. </view>
  23. </view>
  24. </view>
  25. <nodata v-show="list.length==0&&loading"></nodata>
  26. </view>
  27. </template>
  28. <script>
  29. import nodata from '@/components/nodata/nodata.vue'
  30. import homenav from "@/components/homenav/nav.vue"
  31. export default {
  32. components: {
  33. nodata,homenav
  34. },
  35. data() {
  36. return {
  37. list:[],
  38. chooseTab: 0,
  39. page: 1,
  40. limit: 10,
  41. loading:false,
  42. iStatusBarHeight:'',
  43. }
  44. },
  45. onLoad(opt) {
  46. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  47. this.getList(0);
  48. },
  49. onShow() {
  50. },
  51. methods: {
  52. getList(num) {
  53. this.chooseTab=num;
  54. uni.showLoading({
  55. title: '加载中'
  56. });
  57. this.loading=false
  58. this.$http('open/miniapp/marketingLuckDraw/listLuckyDrawCustomerDetailPage', {
  59. page: this.page,
  60. limit: this.limit,
  61. prizeState: 1,
  62. takeState: num
  63. }, 'POST').then(res => {
  64. uni.hideLoading();
  65. this.loading = true;
  66. var list = res.data.records;
  67. if (this.page == 1) {
  68. this.list = list
  69. } else {
  70. this.list = this.items.concat(list)
  71. }
  72. })
  73. },
  74. },
  75. // 下拉刷新
  76. onPullDownRefresh() {
  77. this.page = 1
  78. this.getList(this.chooseTab)
  79. setTimeout(function() {
  80. uni.stopPullDownRefresh();
  81. }, 1000);
  82. },
  83. // 上拉加载更多
  84. onReachBottom() {
  85. this.page++;
  86. this.getList(this.chooseTab)
  87. },
  88. }
  89. </script>
  90. <style scoped>
  91. .content{
  92. min-height: 100vh;
  93. background: rgb(247, 247, 247);
  94. }
  95. .coupon-item{
  96. position: relative;
  97. margin: 24rpx 0;
  98. background:rgba(255,255,255,1);
  99. border-radius:10rpx;
  100. display: flex;
  101. }
  102. .tabToptyh{
  103. display: flex;
  104. justify-content: space-around;
  105. height: 93rpx;
  106. background: #ffffff;
  107. border-bottom: 1px solid #EEEEEE;
  108. }
  109. .tabToplieyh{
  110. line-height: 90rpx;
  111. color: #3C3C3C;
  112. font-size: 30rpx;
  113. font-weight: 400;
  114. }
  115. .newluckLineActName{
  116. text-overflow: -o-ellipsis-lastline;
  117. overflow: hidden;
  118. text-overflow: ellipsis;
  119. display: -webkit-box;
  120. -webkit-line-clamp: 2;
  121. line-clamp: 2;
  122. -webkit-box-orient: vertical;
  123. font-size: 28rpx !important;
  124. font-weight: 500 !important;
  125. }
  126. .luckDrawBpttom{
  127. display: flex;
  128. justify-content: space-between;
  129. }
  130. .luckDrawBtime{
  131. color: #666666;
  132. font-size: 24rpx;
  133. }
  134. .luckDrawBdengji{
  135. color: #FF7D30;
  136. font-size: 24rpx;
  137. }
  138. .luckDrawBtimedj{
  139. color: #666666;
  140. font-size: 24rpx;
  141. padding-top: 16rpx;
  142. }
  143. .luckDrawBpttom{
  144. padding-top: 22rpx;
  145. }
  146. .newluckLinebox{
  147. flex: 1;
  148. overflow-y: auto;
  149. padding: 12rpx 24rpx;
  150. padding-top: 92rpx;
  151. }
  152. .tablineActyh{
  153. color: #FF7D30;
  154. border-bottom: 5rpx solid #FF7D30;
  155. }
  156. .tab {
  157. background: #FFFFFF;
  158. display: flex;
  159. justify-content: space-around;
  160. line-height: 92rpx;
  161. position: fixed;
  162. width: calc(100vw - 100rpx);
  163. padding-left: 50rpx;
  164. padding-right: 50rpx;
  165. height: 92rpx;
  166. z-index: 11;
  167. }
  168. .tabLine {
  169. font-size: 28rpx;
  170. color: #333333;
  171. text-align: center;
  172. }
  173. .tabActive {
  174. color: #FF0000;
  175. font-weight: bold;
  176. border-bottom: 4rpx solid #FF0000;
  177. }
  178. </style>