result.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <div class="content">
  3. <!-- 结果页 -->
  4. <div class="header">
  5. <img :src="require('@/assets/subject/004-back-head-top.svg')" alt class="back" />
  6. <!-- 领到钱了 -->
  7. <template v-if="Number(state.detail.amountUsdValue) > 0">
  8. <div class="tip1">This Giveaway Expired on {{ moment(state.detail.endTimestamp).format('MM-DD') }}</div>
  9. <div class="tip2">🎉 Awesome! You are the Winner!</div>
  10. <div class="tip3">+${{ state.detail.amountUsdValue }}</div>
  11. <div class="tip3-back"></div>
  12. </template>
  13. <!-- 没有领到钱 -->
  14. <template v-else>
  15. <div class="rabbit">
  16. <img :src="require('@/assets/subject/001-icon-rabbit.svg')" alt />
  17. <p>Sorry, you missed this treasure</p>
  18. </div>
  19. </template>
  20. </div>
  21. <div class="list">
  22. <receive-list></receive-list>
  23. </div>
  24. <div class="footer">
  25. <!-- 领取到钱了 -->
  26. <template v-if="Number(state.detail.amountUsdValue) > 0">
  27. <div class="btn btn1" @click="clickDone">
  28. <img :src="require('@/assets/svg/icon-wallet-success.svg')" alt />
  29. <span>Wallet</span>
  30. </div>
  31. <get-more :style_type="4">
  32. <div class="btn btn2">
  33. <img :src="require('@/assets/svg/icon-gold-box-close.svg')" alt />
  34. <span>Get More</span>
  35. </div>
  36. </get-more>
  37. </template>
  38. <!-- 没有领到钱 -->
  39. <template v-else>
  40. <div class="btn btn2 btn3" @click="clickBtn">
  41. <img :src="require('@/assets/svg/icon-gold-box-close.svg')" alt />
  42. <span>Look for more treasures</span>
  43. </div>
  44. </template>
  45. </div>
  46. </div>
  47. </template>
  48. <script setup>
  49. import { inject, onMounted } from 'vue'
  50. import ReceiveList from '@/view/iframe/treasure-hunt/components/receive-list.vue'
  51. import { chromeExtensionUrl } from '@/uilts/chromeExtension.js'
  52. import GetMore from '@/view/iframe/publish/components/get-more.vue'
  53. import Report from "@/log-center/log"
  54. let state = inject('state')
  55. var moment = require('moment')
  56. function clickDone() {
  57. window.open(`${chromeExtensionUrl + ('iframe/home.html')}`)
  58. }
  59. const clickBtn = () => {
  60. // Report.reportLog({
  61. // pageSource: Report.pageSource.pending_page,
  62. // businessType: Report.businessType.buttonClick,
  63. // objectType: Report.objectType.getMoreGiveaway,
  64. // postId: state.postId
  65. // });
  66. window.open('https://twitter.com/search?q=%23denet');
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .content {
  71. width: 375px;
  72. .header {
  73. width: 100%;
  74. min-height: 150px;
  75. position: relative;
  76. .back {
  77. position: absolute;
  78. top: 0;
  79. left: 0;
  80. z-index: -1;
  81. }
  82. .tip1 {
  83. color: #FFFFFF;
  84. opacity: 0.5;
  85. text-align: center;
  86. padding-top: 16px;
  87. font-weight: 700;
  88. font-size: 13px;
  89. width: 100%;
  90. }
  91. .tip2 {
  92. color: #FFFFFF;
  93. text-align: center;
  94. font-weight: 800;
  95. font-size: 16px;
  96. margin-top: 11px;
  97. }
  98. .tip3-back {
  99. width: 100%;
  100. height: 43px;
  101. position: absolute;
  102. top: 74px;
  103. left: 0;
  104. background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.826667) 26.4%, #FFFFFF 71.47%, rgba(255, 255, 255, 0) 100%);
  105. opacity: 0.15;
  106. z-index: 1;
  107. }
  108. .tip3 {
  109. position: absolute;
  110. top: 74px;
  111. z-index: 2;
  112. left: 0;
  113. width: 100%;
  114. line-height: 43px;
  115. height: 43px;
  116. color: #F5C03F;
  117. text-align: center;
  118. font-size: 26px;
  119. font-weight: 800;
  120. }
  121. .rabbit {
  122. width: 100%;
  123. height: 100%;
  124. display: flex;
  125. align-items: center;
  126. align-content: center;
  127. flex-wrap: wrap;
  128. justify-content: center;
  129. img {
  130. width: 150px;
  131. height: 80px;
  132. margin-top: 14px;
  133. margin-bottom: 4px;
  134. }
  135. .flower {
  136. width: 62px;
  137. height: 62px;
  138. }
  139. p {
  140. width: 100%;
  141. margin: 0;
  142. padding: 0;
  143. font-weight: 800;
  144. font-size: 16px;
  145. color: #fff;
  146. text-align: center;
  147. letter-spacing: 0.3px;
  148. }
  149. }
  150. }
  151. .list {
  152. height: 336px;
  153. margin-top: 10px;
  154. }
  155. .footer {
  156. height: 84px;
  157. display: flex;
  158. padding: 16px;
  159. justify-content: space-between;
  160. .btn {
  161. width: 166.5px;
  162. height: 52px;
  163. border-radius: 100px;
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. font-weight: 800;
  168. font-size: 18px;
  169. user-select: none;
  170. cursor: pointer;
  171. img {
  172. width: 24px;
  173. height: 24px;
  174. margin-right: 7px;
  175. }
  176. }
  177. .btn1 {
  178. background: #FFFFFF;
  179. border: 1px solid #DEDEDE;
  180. color: #585858;
  181. }
  182. .btn2 {
  183. color: #FFFFFF;
  184. background: #1D9BF0;
  185. }
  186. .btn3 {
  187. width: 100%;
  188. }
  189. }
  190. }
  191. </style>