open-box.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <div class="open-box">
  3. <div class="background"></div>
  4. <!-- 开奖页 -->
  5. <div class="content">
  6. <img :src="require('@/assets/img/icon-silver-open-box.png')" alt="" class="popIn" />
  7. <div class="mark">
  8. <p>You Win</p>
  9. <div class="money">{{ state.open_box.data.usdAmountValue }}</div>
  10. <div class="mark2">
  11. <img :src="state.open_box.data.currencyIcon" alt="" />
  12. <div>{{ state.open_box.data.amountValue }} {{ state.open_box.data.currencySymbol }} stored in your
  13. DeNet
  14. account
  15. </div>
  16. </div>
  17. </div>
  18. <v-btn :txt="'OK'" :font-size="'16px'" class="btn" :icon="false" @onClick="clickBtn"></v-btn>
  19. </div>
  20. </div>
  21. </template>
  22. <script setup>
  23. import { inject } from 'vue'
  24. import VBtn from '@/view/iframe/treasure-hunt/components/btn.vue'
  25. let state = inject('state')
  26. const clickBtn = () => {
  27. state.open_box.show = false
  28. }
  29. </script>
  30. <style lang="scss" scoped>
  31. .open-box {
  32. position: fixed;
  33. left: 0;
  34. top: 0;
  35. z-index: 999;
  36. .background {
  37. background: #000000;
  38. opacity: .9;
  39. position: fixed;
  40. width: 100%;
  41. height: 100%;
  42. }
  43. .content {
  44. z-index: 2;
  45. width: 375px;
  46. height: 500px;
  47. text-align: center;
  48. position: relative;
  49. .popIn {
  50. -webkit-animation: fadeleftIn .4s;
  51. animation: fadeleftIn .4s;
  52. -webkit-animation-name: popIn;
  53. animation-name: popIn;
  54. }
  55. img {
  56. margin-top: 15px;
  57. width: 250px;
  58. height: 250px;
  59. animation: show 0.5s;
  60. }
  61. .mark {
  62. position: absolute;
  63. top: 246px;
  64. width: 375px;
  65. p {
  66. margin: 0;
  67. padding: 0;
  68. text-align: center;
  69. }
  70. p:nth-child(1) {
  71. margin-bottom: 10px;
  72. color: #FFFFFF;
  73. font-weight: 800;
  74. font-size: 18px;
  75. }
  76. .txt {
  77. color: #FFC83A;
  78. font-weight: 800;
  79. font-size: 24px;
  80. }
  81. .money {
  82. color: #FFC83A;
  83. font-weight: 800;
  84. font-size: 34px;
  85. }
  86. .mark2 {
  87. margin-top: 10px;
  88. display: flex;
  89. justify-content: center;
  90. align-items: center;
  91. img {
  92. width: 17px;
  93. height: 17px;
  94. margin-right: 5px;
  95. }
  96. div {
  97. color: #A9A49F;
  98. font-weight: 400;
  99. font-size: 12px;
  100. }
  101. }
  102. }
  103. .btn {
  104. position: absolute;
  105. bottom: 25px;
  106. left: 15px;
  107. }
  108. }
  109. }
  110. @keyframes popIn {
  111. 0% {
  112. -webkit-transform: scale3d(0, 0, 0);
  113. transform: scale3d(0.5, 0.5, 0.5);
  114. opacity: 0;
  115. }
  116. 50% {
  117. -webkit-animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
  118. animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
  119. }
  120. 100% {
  121. -webkit-transform: scale3d(1, 1, 1);
  122. transform: scale3d(1, 1, 1);
  123. -webkit-animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  124. animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  125. opacity: 1;
  126. }
  127. }
  128. </style>