winning-list.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <view>
  3. <nav-bar title="中奖记录" goBack />
  4. <view class="winning-page">
  5. <view class="winning-item" v-for="item in winningList">
  6. <view class="winning-title">
  7. <text class="title-time">{{item.createTime}}</text>
  8. <text class="title-level">{{getLevel(item.prizeGrade)}}</text>
  9. </view>
  10. <view class="winning-info">
  11. <image class="winning-img" :src="item.prizeImageUrl" mode="aspectFit"></image>
  12. <text class="winning-name zw-one-row">{{item.prizeName}}</text>
  13. <text v-if="[3,4].includes(item.prizeType) && !item.infoComplete" class="winning-btn"
  14. @click.stop="setAwardInformation(item)">填写领奖信息</text>
  15. <!-- <text v-else class="winning-btn" @click.stop="setAwardInformation(item)">查看领奖信息</text> -->
  16. </view>
  17. </view>
  18. <view class="empty-data" v-if="loadingStatus && (!winningList || winningList.length === 0) ">
  19. <EmptyDate />
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import {
  26. getMyWinning
  27. } from "@/api/Lottery.js"
  28. import {
  29. setPrizeLevel
  30. } from "./common.js"
  31. export default {
  32. data() {
  33. return {
  34. winningList: [],
  35. loadingStatus: ''
  36. }
  37. },
  38. onLoad() {
  39. this.getMyWinningVal()
  40. // this.gooooooo()
  41. },
  42. methods: {
  43. getMyWinningVal() {
  44. this.loadingStatus = ''
  45. getMyWinning().then(res => {
  46. // console.log(';getMyWinning = ', res)
  47. this.winningList = res.data || []
  48. }).finally(() => {
  49. this.loadingStatus = 'wancheng'
  50. })
  51. },
  52. getLevel(num) {
  53. console.log('123', )
  54. return setPrizeLevel(num)
  55. },
  56. gooooooo() {
  57. uni.navigateTo({
  58. url: `/pages/game/award-information`
  59. })
  60. uni.navig
  61. },
  62. setAwardInformation(item) {
  63. uni.navigateTo({
  64. url: `/pages/game/award-information?activityJoinRecordId=${item.activityJoinRecordId}&prizeType=${item.prizeType}`
  65. })
  66. }
  67. }
  68. }
  69. </script>
  70. <style>
  71. page {
  72. background: #f5f5f5;
  73. }
  74. </style>
  75. <style lang="scss" scoped>
  76. .winning-page {
  77. width: 100%;
  78. padding: 25rpx 30rpx;
  79. .winning-item {
  80. width: 100%;
  81. padding: 0 28rpx;
  82. background-color: #fff;
  83. margin-bottom: 20rpx;
  84. border-radius: 20rpx;
  85. .winning-title {
  86. width: 100%;
  87. height: 88rpx;
  88. border-bottom: 1rpx solid #e6e6e6;
  89. display: flex;
  90. justify-content: space-between;
  91. align-items: center;
  92. .title-time {
  93. font-size: 28rpx;
  94. // font-weight: 300;
  95. color: #666666;
  96. }
  97. .title-level {
  98. padding: 4rpx 16rpx;
  99. background: #edfdfd;
  100. border-radius: 20rpx 0px;
  101. font-size: 24rpx;
  102. font-family: PingFang SC, PingFang SC-Regular;
  103. font-weight: 400;
  104. text-align: center;
  105. color: #3fb9d4;
  106. }
  107. }
  108. .winning-info {
  109. width: 100%;
  110. // height: 182rpx;
  111. display: flex;
  112. justify-content: space-between;
  113. align-items: center;
  114. padding: 20rpx 0;
  115. .winning-img {
  116. flex-shrink: 0;
  117. width: 132rpx;
  118. height: 132rpx;
  119. border-radius: 20rpx;
  120. }
  121. .winning-name {
  122. flex: 1;
  123. padding: 0 20rpx;
  124. font-size: 28rpx;
  125. // font-family: PingFang SC, PingFang SC-Light;
  126. // font-family: PingFang SC, PingFang SC-Regular;
  127. font-weight: 300;
  128. text-align: left;
  129. color: #1a1a1a;
  130. }
  131. .winning-btn {
  132. flex-shrink: 0;
  133. width: 180rpx;
  134. height: 54rpx;
  135. background: linear-gradient(75deg, #3cb7d2 10%, #46c8d5 89%);
  136. border-radius: 20rpx;
  137. text-align: center;
  138. line-height: 54rpx;
  139. font-size: 24rpx;
  140. font-family: PingFang SC, PingFang SC-Regular;
  141. font-weight: 400;
  142. color: #ffffff;
  143. }
  144. }
  145. }
  146. }
  147. // .winning-item {
  148. // border-radius: 10rpx;
  149. // background-color: rgba(255, 255, 255, 1);
  150. // box-shadow: 0px 0px 3rpx 2rpx rgba(0, 0, 0, 0.11);
  151. // margin-bottom: 20rpx;
  152. // .winning-title {
  153. // padding: 20rpx;
  154. // display: flex;
  155. // justify-content: space-between;
  156. // align-items: center;
  157. // }
  158. // .winning-info {
  159. // width: 100%;
  160. // display: flex;
  161. // justify-content: space-between;
  162. // align-items: center;
  163. // padding: 20rpx;
  164. // .winning-img {
  165. // flex-shrink: 0;
  166. // width: 80rpx;
  167. // height: 80rpx;
  168. // }
  169. // .winning-name{
  170. // flex: 1;
  171. // padding: 0 20rpx;
  172. // }
  173. // .winning-btn {
  174. // flex-shrink: 0;
  175. // width: 200rpx;
  176. // height: 60rpx;
  177. // background-color: yellowgreen;
  178. // text-align: center;
  179. // line-height: 60rpx;
  180. // }
  181. // }
  182. // }
  183. </style>