get-more.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <div class="get-more-btns" v-if="props.style_type == 3">
  3. <div class="get-more-btn" @click="jumpMore">
  4. <img width="22" :src="require('@/assets/svg/icon-wallet-success.svg')" />
  5. <font>View wallet</font>
  6. </div>
  7. <div class="get-more-btn" @click="jumpMore">
  8. <img width="22" :src="require('@/assets/svg/icon-big-give.svg')" />
  9. <font>Get More Giveaway</font>
  10. </div>
  11. </div>
  12. <div class="getMore" @click="jumpMore" v-if="props.style_type == 1">
  13. <img width="20" :src="require('@/assets/svg/icon-big-give.svg')" />
  14. <font>Get More Giveaway</font>
  15. <img height="20" :src="require('@/assets/svg/icon-cell-arrow-right.svg')" />
  16. </div>
  17. <div class="get_more" v-if="props.style_type == 2" @click="jumpMore">
  18. <img width="18" :src="require('@/assets/svg/icon-big-give.svg')" />
  19. <span>Get More Giveaway</span>
  20. </div>
  21. </template>
  22. <script setup>
  23. import { getFrontConfig } from "@/http/account";
  24. import { number } from "mathjs";
  25. import { onBeforeMount, ref, defineProps } from "vue";
  26. import Report from "@/log-center/log"
  27. const props = defineProps({
  28. style_type: {
  29. type: Number,
  30. default: 1,
  31. },
  32. reportData: {
  33. type: Object,
  34. }
  35. })
  36. // const
  37. const moreUrl = ref('');
  38. onBeforeMount(() => {
  39. getFrontConfig({
  40. params: {},
  41. }).then(res => {
  42. moreUrl.value = res.data.moreLuckdropsUrl;
  43. })
  44. })
  45. const jumpMore = () => {
  46. Report.reportLog({
  47. pageSource: props.reportData.pageSource,
  48. businessType: Report.businessType.buttonClick,
  49. objectType: Report.objectType.getMoreGiveaway,
  50. postId: props.reportData.postId,
  51. redPacketType: props.reportData.redPacketType
  52. });
  53. if (moreUrl.value) {
  54. window.open(moreUrl.value)
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .getMore {
  60. display: flex;
  61. height: 50px;
  62. cursor: pointer;
  63. user-select: none;
  64. align-items: center;
  65. justify-content: center;
  66. box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.06);
  67. img {
  68. margin: 0 5px;
  69. }
  70. font {
  71. color: #000;
  72. font-size: 15px;
  73. font-weight: 500;
  74. line-height: 18px;
  75. }
  76. }
  77. .get_more {
  78. margin-top: 58px;
  79. width: 240px;
  80. height: 54px;
  81. background: #FFFFFF;
  82. border: 1px solid #E8E8E8;
  83. border-radius: 100px;
  84. display: flex;
  85. justify-content: center;
  86. align-items: center;
  87. cursor: pointer;
  88. img {
  89. margin-right: 8px;
  90. }
  91. }
  92. .get-more-btns {
  93. display: flex;
  94. cursor: pointer;
  95. user-select: none;
  96. align-items: center;
  97. justify-content: center;
  98. padding: 13px 0;
  99. box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.06);
  100. position: relative;
  101. .get-more-btn {
  102. flex: 1;
  103. display: flex;
  104. cursor: pointer;
  105. user-select: none;
  106. flex-direction: column;
  107. align-items: center;
  108. justify-content: center;
  109. height: 44px;
  110. font {
  111. font-weight: 600;
  112. font-size: 14px;
  113. line-height: 17px;
  114. text-align: center;
  115. letter-spacing: 0.3px;
  116. color: #000000;
  117. }
  118. }
  119. &::after {
  120. content: "";
  121. width: 1px;
  122. height: 88px;
  123. position: absolute;
  124. left: 50%;
  125. top: 13px;
  126. background-color: rgba(0,0,0,.2);
  127. transform: scale(0.5);
  128. transform-origin: 0 0;
  129. }
  130. }
  131. </style>