winning-list.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <view>
  3. <navbar :config="config" backColor="#999999"></navbar>
  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="!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. config: {
  35. back: true,
  36. title: '中奖记录',
  37. color: 'black',
  38. backgroundColor: [1, '#fff'],
  39. statusBarFontColor: 'black'
  40. },
  41. winningList: [],
  42. loadingStatus: ''
  43. }
  44. },
  45. onLoad() {
  46. this.getMyWinningVal()
  47. // this.gooooooo()
  48. },
  49. methods: {
  50. getMyWinningVal() {
  51. this.loadingStatus = ''
  52. getMyWinning().then(res => {
  53. // console.log(';getMyWinning = ', res)
  54. this.winningList = res.data || []
  55. }).finally(() => {
  56. this.loadingStatus = 'wancheng'
  57. })
  58. },
  59. getLevel(num) {
  60. console.log('123', )
  61. return setPrizeLevel(num)
  62. },
  63. gooooooo() {
  64. uni.navigateTo({
  65. url: `/pages/game/award-information`
  66. })
  67. uni.navig
  68. },
  69. setAwardInformation(item) {
  70. uni.navigateTo({
  71. url: `/pages/game/award-information?activityJoinRecordId=${item.activityJoinRecordId}&prizeType=${item.prizeType}`
  72. })
  73. }
  74. }
  75. }
  76. </script>
  77. <style>
  78. page {
  79. background: #f5f5f5;
  80. }
  81. </style>
  82. <style lang="scss" scoped>
  83. .winning-page {
  84. width: 100%;
  85. padding: 25rpx 30rpx;
  86. .winning-item {
  87. width: 100%;
  88. padding: 0 28rpx;
  89. background-color: #fff;
  90. margin-bottom: 20rpx;
  91. border-radius: 20rpx;
  92. .winning-title {
  93. width: 100%;
  94. height: 88rpx;
  95. border-bottom: 1rpx solid #e6e6e6;
  96. display: flex;
  97. justify-content: space-between;
  98. align-items: center;
  99. .title-time {
  100. font-size: 28rpx;
  101. // font-weight: 300;
  102. color: #666666;
  103. }
  104. .title-level {
  105. padding: 4rpx 16rpx;
  106. background: #edfdfd;
  107. border-radius: 20rpx 0px;
  108. font-size: 24rpx;
  109. font-family: PingFang SC, PingFang SC-Regular;
  110. font-weight: 400;
  111. text-align: center;
  112. color: #3fb9d4;
  113. }
  114. }
  115. .winning-info {
  116. width: 100%;
  117. // height: 182rpx;
  118. display: flex;
  119. justify-content: space-between;
  120. align-items: center;
  121. padding: 20rpx 0;
  122. .winning-img {
  123. flex-shrink: 0;
  124. width: 132rpx;
  125. height: 132rpx;
  126. border-radius: 20rpx;
  127. }
  128. .winning-name {
  129. flex: 1;
  130. padding: 0 20rpx;
  131. font-size: 28rpx;
  132. // font-family: PingFang SC, PingFang SC-Light;
  133. // font-family: PingFang SC, PingFang SC-Regular;
  134. font-weight: 300;
  135. text-align: left;
  136. color: #1a1a1a;
  137. }
  138. .winning-btn {
  139. flex-shrink: 0;
  140. width: 180rpx;
  141. height: 54rpx;
  142. background: linear-gradient(75deg, #3cb7d2 10%, #46c8d5 89%);
  143. border-radius: 20rpx;
  144. text-align: center;
  145. line-height: 54rpx;
  146. font-size: 24rpx;
  147. font-family: PingFang SC, PingFang SC-Regular;
  148. font-weight: 400;
  149. color: #ffffff;
  150. }
  151. }
  152. }
  153. }
  154. // .winning-item {
  155. // border-radius: 10rpx;
  156. // background-color: rgba(255, 255, 255, 1);
  157. // box-shadow: 0px 0px 3rpx 2rpx rgba(0, 0, 0, 0.11);
  158. // margin-bottom: 20rpx;
  159. // .winning-title {
  160. // padding: 20rpx;
  161. // display: flex;
  162. // justify-content: space-between;
  163. // align-items: center;
  164. // }
  165. // .winning-info {
  166. // width: 100%;
  167. // display: flex;
  168. // justify-content: space-between;
  169. // align-items: center;
  170. // padding: 20rpx;
  171. // .winning-img {
  172. // flex-shrink: 0;
  173. // width: 80rpx;
  174. // height: 80rpx;
  175. // }
  176. // .winning-name{
  177. // flex: 1;
  178. // padding: 0 20rpx;
  179. // }
  180. // .winning-btn {
  181. // flex-shrink: 0;
  182. // width: 200rpx;
  183. // height: 60rpx;
  184. // background-color: yellowgreen;
  185. // text-align: center;
  186. // line-height: 60rpx;
  187. // }
  188. // }
  189. // }
  190. </style>