result.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <!-- 开奖页 -->
  3. <div class="content" v-show-log="state.log_result_show">
  4. <img :src="require('@/assets/img/icon-silver-open-box-big.png')" alt="" />
  5. <div class="mark">
  6. <!-- 新粉 -->
  7. <template v-if="Number(state.start_task.amountValue) > 0">
  8. <p>You are now fillowing
  9. <template v-for="item, i in state.follows">
  10. <span v-if="i == 0">@{{ item.name }}</span>
  11. <span v-else>, @{{ item.name }}</span>
  12. </template>
  13. </p>
  14. <p>You Win</p>
  15. <component-zoom width="335" fontSize="34" style="margin:0 auto;">
  16. <div class="money">${{ state.start_task.usdAmountValue }}</div>
  17. </component-zoom>
  18. <div class="mark2">
  19. <img :src="state.start_task.currencyIcon" alt="" />
  20. <div>{{ state.start_task.amountValue }} {{ state.start_task.currencySymbol }} stored in your DeNet
  21. account</div>
  22. </div>
  23. </template>
  24. <!-- 老粉不给钱 -->
  25. <template v-else>
  26. <p>You already followed
  27. <template v-for="item, i in state.follows">
  28. <span v-if="i == 0">@{{ item.name }}</span>
  29. <span v-else>, @{{ item.name }}</span>
  30. </template>
  31. </p>
  32. <p>Only new followers open silver chest</p>
  33. <p class="txt">Invite people to</p>
  34. <p class="txt">open golden chest!</p>
  35. </template>
  36. </div>
  37. <v-btn :txt="'Invite friends for more treasures'" :font-size="'16px'" class="btn"
  38. v-if="Number(state.start_task.amountValue) > 0" v-click-log="state.log_result_click" @onClick="clickBtn"
  39. :disabled="false"></v-btn>
  40. <v-btn :txt="'Invite'" :font-size="'16px'" class="btn" v-else @onClick="clickBtn" :disabled="false"
  41. v-click-log="state.log_result_click"></v-btn>
  42. </div>
  43. </template>
  44. <script setup>
  45. import { inject, onMounted } from 'vue'
  46. import VBtn from '@/view/iframe/treasure-hunt/components/btn.vue'
  47. import Report from "@/log-center/log"
  48. let state = inject('state')
  49. state.log_result_show = {
  50. businessType: Report.businessType.pageView,
  51. pageSource: Report.pageSource.newFansRewardPage,
  52. redPacketType: Report.redPacketType.treasure,
  53. shareLinkId: state.invite_code,
  54. postId: state.postId,
  55. extParams: {
  56. isNewFans: Number(state.start_task.amountValue) > 0 ? true : false
  57. }
  58. }
  59. state.log_result_click = {
  60. businessType: Report.businessType.buttonClick,
  61. pageSource: Report.pageSource.newFansRewardPage,
  62. objectType: Report.objectType.nextButton,
  63. redPacketType: Report.redPacketType.treasure,
  64. shareLinkId: state.invite_code,
  65. postId: state.postId,
  66. extParams: {
  67. isNewFans: Number(state.start_task.amountValue) > 0 ? true : false
  68. }
  69. }
  70. async function clickBtn() {
  71. let _userInfo = await state.checkIsLogin()
  72. if (!_userInfo) {
  73. return
  74. }
  75. state.init(() => {
  76. state.page = '邀请页'
  77. })
  78. }
  79. JSON.parse('[{\"type\":2},{\"type\":10},{\"relatedUsers\":[{\"name\":\"Ice17619765\",\"twitterUserId\":\"1502254505236525056\"},{\"name\":\"IanDuddyUK\",\"twitterUserId\":\"556285604\"},{\"name\":\"ffvc\",\"twitterUserId\":\"285917234\"}],\"type\":1}]')
  80. </script>
  81. <style lang="scss" scoped>
  82. .content {
  83. width: 375px;
  84. height: 500px;
  85. background: linear-gradient(179.96deg, #876635 20.15%, #31251A 44.61%, #24180C 78.18%);
  86. text-align: center;
  87. position: relative;
  88. img {
  89. margin-top: 15px;
  90. width: 250px;
  91. height: 250px;
  92. }
  93. .mark {
  94. position: absolute;
  95. top: 246px;
  96. width: 375px;
  97. p {
  98. margin: 0;
  99. padding: 0 16px;
  100. text-align: center;
  101. }
  102. p:nth-child(1) {
  103. color: #A9A49F;
  104. font-weight: 400;
  105. font-size: 12px;
  106. margin-bottom: 10px;
  107. }
  108. p:nth-child(2) {
  109. margin-bottom: 10px;
  110. color: #FFFFFF;
  111. font-weight: 800;
  112. font-size: 18px;
  113. }
  114. .txt {
  115. color: #FFC83A;
  116. font-weight: 800;
  117. font-size: 24px;
  118. }
  119. .money {
  120. color: #FFC83A;
  121. font-weight: 800;
  122. font-size: 34px;
  123. }
  124. .mark2 {
  125. margin-top: 10px;
  126. display: flex;
  127. justify-content: center;
  128. align-items: center;
  129. img {
  130. width: 17px;
  131. height: 17px;
  132. margin: 0;
  133. margin-right: 5px;
  134. }
  135. div {
  136. color: #A9A49F;
  137. font-weight: 400;
  138. font-size: 12px;
  139. }
  140. }
  141. }
  142. .btn {
  143. position: absolute;
  144. bottom: 25px;
  145. left: 15px;
  146. }
  147. }
  148. </style>