open-box.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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="" />
  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. img {
  50. margin-top: 15px;
  51. width: 250px;
  52. height: 250px;
  53. }
  54. .mark {
  55. position: absolute;
  56. top: 246px;
  57. width: 375px;
  58. p {
  59. margin: 0;
  60. padding: 0;
  61. text-align: center;
  62. }
  63. p:nth-child(1) {
  64. margin-bottom: 10px;
  65. color: #FFFFFF;
  66. font-weight: 800;
  67. font-size: 18px;
  68. }
  69. .txt {
  70. color: #FFC83A;
  71. font-weight: 800;
  72. font-size: 24px;
  73. }
  74. .money {
  75. color: #FFC83A;
  76. font-weight: 800;
  77. font-size: 34px;
  78. }
  79. .mark2 {
  80. margin-top: 10px;
  81. display: flex;
  82. justify-content: center;
  83. align-items: center;
  84. img {
  85. width: 17px;
  86. height: 17px;
  87. margin-right: 5px;
  88. }
  89. div {
  90. color: #A9A49F;
  91. font-weight: 400;
  92. font-size: 12px;
  93. }
  94. }
  95. }
  96. .btn {
  97. position: absolute;
  98. bottom: 25px;
  99. left: 15px;
  100. }
  101. }
  102. }
  103. </style>