MobileGuidePage.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <div class="guide" v-if="detail">
  3. <div class="header">
  4. <div class="tips">
  5. <img class="icon" :src="postUserInfo.avatarUrl" />
  6. <span>@{{postUserInfo.nickName}}</span>
  7. <span class="special">{{ playType === 3 ? 'Invite You to Hunt the Treasure' : 'Send You Giveaway!' }}</span>
  8. </div>
  9. <div class="gif">
  10. <img :src="gifUrl" />
  11. </div>
  12. </div>
  13. <div class="welcome">
  14. <!-- 普通红包 -->
  15. <template v-if="playType === 1">
  16. <template v-if="postBizData.rewardType === 1">
  17. <div>
  18. <span>You Won</span>
  19. <img class="icon" :src="postBizData.currencyIconPath" />
  20. <span class="special">{{postBizData.amountValue}} {{postBizData.currencySymbol}}</span>
  21. <span class="special">(${{postBizData.usdAmountValue}})</span>
  22. </div>
  23. <div>
  24. <span>in the Giveaway!</span>
  25. </div>
  26. </template>
  27. <template v-else>
  28. <div>
  29. <span>You Won</span>
  30. <span class="special">{{postBizData.customizedReward}}</span>
  31. </div>
  32. <div>
  33. <span>in the Giveaway!</span>
  34. </div>
  35. </template>
  36. </template>
  37. <!-- 抽奖红包 -->
  38. <template v-if="playType === 2">
  39. <div>
  40. <span>You are gifted an entries to earn</span>
  41. </div>
  42. <template v-if="postBizData.rewardType === 1">
  43. <div>
  44. <img class="icon" :src="postBizData.currencyIconPath" />
  45. <span class="special">{{postBizData.amountValue}} {{postBizData.currencySymbol}}</span>
  46. <span class="special">(${{postBizData.usdAmountValue}})</span>
  47. </div>
  48. </template>
  49. <template v-else>
  50. <div>
  51. <span class="special">{{postBizData.customizedReward}}</span>
  52. </div>
  53. </template>
  54. </template>
  55. <!-- 夺宝红包 -->
  56. <template v-if="playType === 3">
  57. <div>
  58. <span>Complete the quest to win up to</span>
  59. </div>
  60. <div>
  61. <span class="special">${{detail.upGainAmountValue}} for you two!</span>
  62. </div>
  63. </template>
  64. </div>
  65. <div class="footer">
  66. <div class="item">
  67. <img class="icon" src="../static/img/icon-item1.svg" />
  68. <span>First, <span class="special">Retweet</span> this tweet.</span>
  69. </div>
  70. <div class="item">
  71. <img class="icon" src="../static/img/icon-item2.svg" />
  72. <span>When you have access to your <span class="special">laptop</span>, open <span class="special">Chrome</span> and go to <span class="special">twitter.com.</span></span>
  73. </div>
  74. <div class="item">
  75. <img class="icon" src="../static/img/icon-item3.svg" />
  76. <span>Go to your profile page by clicking <span class="special">"Profile"</span> on the left column.</span>
  77. </div>
  78. <div class="item">
  79. <img class="icon" src="../static/img/icon-item4.svg" />
  80. <span>Find the tweet you retweeted, and click the giveaway, you can then install the <span class="special">DeNet Chrome Extension</span> to Get Giveaway.</span>
  81. </div>
  82. </div>
  83. <div class="retweet">
  84. <img src="../static/img/icon-retweet.svg" />
  85. <span>Retweet</span>
  86. </div>
  87. </div>
  88. </template>
  89. <script>
  90. export default {
  91. name: 'mobileGuidePage',
  92. props: {
  93. detail: {
  94. type: Object,
  95. },
  96. postBizData: {
  97. type: Object,
  98. },
  99. postUserInfo: {
  100. type: Object,
  101. },
  102. playType: {
  103. type: Number,
  104. },
  105. },
  106. data() {
  107. return {}
  108. },
  109. computed: {
  110. gifUrl() {
  111. let url;
  112. switch(this.playType) {
  113. case 1:
  114. url = require('../static/img/icon-gif-redbag.gif');
  115. break;
  116. case 2:
  117. url = require('../static/img/icon-gif-draw.png');
  118. break;
  119. case 3:
  120. url = require('../static/img/icon-gif-treasure.png');
  121. break;
  122. }
  123. return url;
  124. }
  125. },
  126. methods: {
  127. }
  128. }
  129. </script>
  130. <style lang="scss" scoped>
  131. .guide {
  132. width: 100%;
  133. min-height: 100%;
  134. background: linear-gradient(180deg, #cceaff 0%, #ffffff 70.42%);
  135. .header {
  136. position: relative;
  137. height: 240px;
  138. .tips {
  139. display: inline-block;
  140. height: 32px;
  141. color: #FFFFFF;
  142. line-height: 30px;
  143. margin-top: 8px;
  144. font-size: 12px;
  145. padding: 0 18px 0 10px;
  146. background: #1B5277;
  147. border-radius: 0 32px 32px 0;
  148. .icon {
  149. overflow: hidden;
  150. width: 20px;
  151. height: 20px;
  152. margin-right: 6px;
  153. border-radius: 50%;
  154. vertical-align: middle;
  155. }
  156. .special {
  157. color: #FF9737;
  158. font-weight: 700;
  159. }
  160. }
  161. .gif {
  162. width: 150px;
  163. height: 150px;
  164. margin: 40px auto 0;
  165. img {
  166. width: 100%;
  167. height: 100%;
  168. }
  169. }
  170. }
  171. .welcome {
  172. padding: 14px 0;
  173. font-size: 18px;
  174. font-weight: 700;
  175. line-height: 24px;
  176. text-align: center;
  177. background: rgba($color: #FFFFFF, $alpha: .5);
  178. .icon {
  179. overflow: hidden;
  180. width: 22px;
  181. height: 22px;
  182. border-radius: 50%;
  183. vertical-align: middle;
  184. }
  185. .special {
  186. color: #FF9737;
  187. }
  188. }
  189. .footer {
  190. padding: 40px 15px 100px;
  191. color: #6D6D6D;
  192. font-size: 14px;
  193. font-weight: 400;
  194. line-height: 17px;
  195. .item {
  196. position: relative;
  197. padding-left: 38px;
  198. margin-bottom: 16px;
  199. &:last-child {
  200. margin-bottom: 0;
  201. }
  202. .icon {
  203. position: absolute;
  204. left: 0;
  205. }
  206. .special {
  207. color: #1D9BF0;
  208. }
  209. }
  210. }
  211. .retweet {
  212. position: fixed;
  213. display: flex;
  214. align-items: center;
  215. justify-content: center;
  216. bottom: 26px;
  217. left: 16px;
  218. right: 16px;
  219. height: 52px;
  220. color: #FFFFFF;
  221. font-size: 18px;
  222. font-weight: 600;
  223. border-radius: 52px;
  224. background: #1D9BF0;
  225. img {
  226. width: 24px;
  227. margin-right: 6px;
  228. }
  229. }
  230. }
  231. </style>