doll_result.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <view class="cu-modal" :class="{ show: visible }">
  3. <view class="rule-mask" @click="close"></view>
  4. <view class="cu-dialog" style="background-color: transparent; width: 100%">
  5. <view class="relative wrapper">
  6. <view class="title">
  7. <image :src="ossurl.welfare.toys.recordTitle" mode="aspectFit" />
  8. </view>
  9. <view v-if="prizeResilt.length === 1" class="prize_one">
  10. <view class="box">
  11. <view class="img">
  12. <image
  13. :src="prizeResilt[0].cover"
  14. class="width100 height100"
  15. mode="aspectFit"
  16. />
  17. </view>
  18. <view class="text line-ellipsis">{{ prizeResilt[0].name }}</view>
  19. </view>
  20. </view>
  21. <view v-else class="prize_five">
  22. <view v-for="item in prizeResilt" :key="item.spuId" class="five_item">
  23. <div class="box">
  24. <view class="five_img">
  25. <image :src="item.cover" mode="aspectFit" />
  26. </view>
  27. <view class="five_text line-ellipsis">{{ item.name }}</view>
  28. </div>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="paddingT30 flex-align-center">
  33. <view class="close cuIcon-close" @click="close"></view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import ossurl from '@/utils/ossurl'
  40. export default {
  41. props: {
  42. luckKing: Object
  43. },
  44. data() {
  45. return {
  46. ossurl,
  47. visible: false,
  48. type: 5,
  49. prizeResilt: [] // 抽到的奖励
  50. }
  51. },
  52. methods: {
  53. show(data) {
  54. this.visible = true
  55. this.$parent.$parent.$parent.lock = true
  56. this.prizeResilt = data
  57. },
  58. close() {
  59. this.visible = false
  60. this.$parent.$parent.$parent.lock = false
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .rule-mask {
  67. position: absolute;
  68. left: 0;
  69. right: 0;
  70. top: 0;
  71. bottom: 0;
  72. }
  73. .wrapper {
  74. z-index: 1001;
  75. width: 750rpx;
  76. height: 705rpx;
  77. margin: 0 auto;
  78. text-align: center;
  79. .rule {
  80. width: 581rpx;
  81. height: 0;
  82. }
  83. .doll_close {
  84. position: absolute;
  85. top: 0;
  86. right: -8rpx;
  87. .x {
  88. width: 64rpx;
  89. height: 64rpx;
  90. }
  91. }
  92. .doll_know {
  93. position: absolute;
  94. bottom: 45rpx;
  95. .k {
  96. width: 252rpx;
  97. height: 88rpx;
  98. }
  99. }
  100. .prize_one {
  101. display: inline-block;
  102. width: 444rpx;
  103. padding: 10rpx;
  104. height: 612rpx;
  105. background: linear-gradient(
  106. 136deg,
  107. rgba(255, 255, 255, 0.28) 0%,
  108. rgba(255, 255, 255, 0.2) 100%
  109. );
  110. overflow: hidden;
  111. opacity: 1;
  112. border: 4rpx solid;
  113. border-image: linear-gradient(
  114. 155deg,
  115. rgba(255, 255, 255, 0.27000001072883606),
  116. rgba(255, 255, 255, 0.07999999821186066)
  117. )
  118. 4 4;
  119. border-radius: 20rpx 20rpx 20rpx 20rpx;
  120. .box {
  121. background: #ffffff;
  122. border-radius: 12rpx 12rpx 12rpx 12rpx;
  123. height: 100%;
  124. }
  125. .img {
  126. height: 480rpx;
  127. }
  128. .text {
  129. color: #b58100;
  130. width: 100%;
  131. margin-top: 31rpx;
  132. text-align: center;
  133. }
  134. }
  135. .prize_five {
  136. display: inline-block;
  137. width: 90%;
  138. .five_item {
  139. width: 200rpx;
  140. height: 276rpx;
  141. display: inline-block;
  142. background: linear-gradient(
  143. 136deg,
  144. rgba(255, 255, 255, 0.28) 0%,
  145. rgba(255, 255, 255, 0.2) 100%
  146. );
  147. border-radius: 15rpx 15rpx 15rpx 15rpx;
  148. opacity: 1;
  149. border: 2rpx solid;
  150. border-image: linear-gradient(
  151. 155deg,
  152. rgba(255, 255, 255, 0.27000001072883606),
  153. rgba(255, 255, 255, 0.07999999821186066)
  154. )
  155. 2 2;
  156. padding: 8rpx;
  157. margin-right: 14rpx;
  158. margin-top: 23rpx;
  159. .box {
  160. background: #ffffff;
  161. border-radius: 10rpx 10rpx 10rpx 10rpx;
  162. height: 100%;
  163. opacity: 1;
  164. }
  165. .five_img {
  166. width: 100%;
  167. height: 200rpx;
  168. image{
  169. height: 200rpx;
  170. }
  171. }
  172. .five_text {
  173. color: #b58100;
  174. text-align: center;
  175. }
  176. }
  177. .five_item:nth-child(3) {
  178. margin-right: 0;
  179. }
  180. }
  181. }
  182. .close {
  183. width: 64rpx;
  184. height: 64rpx;
  185. background: #d8d8d8;
  186. font-size: 32rpx;
  187. text-align: center;
  188. line-height: 64rpx;
  189. color: #444;
  190. border-radius: 50%;
  191. }
  192. .title {
  193. text-align: center;
  194. image {
  195. height: 126rpx;
  196. width: 388rpx;
  197. }
  198. }
  199. </style>