luckdraw.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078
  1. <template>
  2. <div class="content">
  3. <template v-if="isLoading">
  4. <img
  5. class="loading"
  6. src="../static/svg/icon-loading.svg" />
  7. </template>
  8. <template v-else>
  9. <template v-if="isMobile">
  10. <!-- 手机端 -->
  11. <div class="small" :class="{ bg: status === 'not-open' }">
  12. <template v-if="status === 'not-open'">
  13. <img class="lottery" :src=" require('../static/svg/icon-luck-mark.svg') " />
  14. <div class="head">
  15. <img :src="detail.postBizData.postUserInfo.avatarUrl" />
  16. <span>{{ detail.postBizData.postUserInfo.nickName }}</span>
  17. </div>
  18. <div class="price">
  19. <div class="usdt">{{ detail.postBizData.currencySymbol }} GIVEAWAY</div>
  20. <div class="money">
  21. <img :src="detail.postBizData.currencyIconPath" />
  22. <font-amount :fontSize="60" :amount="detail.postBizData.amountValue"></font-amount>
  23. </div>
  24. </div>
  25. <div class="time">
  26. <span class="t">🕒 {{ validity }}</span>
  27. <span class="w">🏆 {{ detail.postBizData.totalCount }} WINNERS</span>
  28. </div>
  29. <div class="box">
  30. <img src="../static/subject/icon-box.png" />
  31. </div>
  32. </template>
  33. <template v-else>
  34. <div class="succTop">
  35. <template v-if="status === 'opened'">
  36. <img class="img" :src=" require('../static/svg/icon-luck-rabbit.svg') " />
  37. <p class="tips">Good Luck Next Time!</p>
  38. </template>
  39. <template v-else-if="status === 'expire'">
  40. <!-- <img class="img" :src=" require('../static/svg/icon-luck-complete.svg') " />
  41. <p class="tips">This Draw is Complete</p> -->
  42. <p class="expire">This Giveaways<br/>expired on {{ formatTime(detail.postBizData.endTimestamp, 'MM-DD') }}</p>
  43. </template>
  44. <template v-else>
  45. <p class="win">🎉 Awesome! You are Winner!</p>
  46. <div class="win-money">
  47. <img :src="detail.postBizData.currencyIconPath" />
  48. <font-amount :fontSize="46" :amount="receiveAmount"></font-amount>
  49. </div>
  50. </template>
  51. </div>
  52. <div class="succTitle">
  53. <span>{{ detail.postBizData.receiveCount || 0 }}/{{ detail.postBizData.totalCount || 0 }} Winners</span>
  54. <span>{{ detail.postBizData.receiveAmountValue }} / {{ detail.postBizData.amountValue || '' }} {{ detail.postBizData.currencySymbol || '' }}</span>
  55. </div>
  56. <div class="luck-list" @scroll="handleScroll($event)">
  57. <div class="luck-item" v-for="item, i in luck_list" v-bind:key="i">
  58. <div class="userLogo">
  59. <img class="medal" v-if="i < 2" :src=" require('../static/svg/icon-medal-' + i + '.svg') " />
  60. <img class="header" v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
  61. <img class="header" v-else src="/svg/icon-twitter.svg" alt />
  62. </div>
  63. <div class="luck-content">
  64. <div class="luck-title">{{ item.simpleUserInfoVO.nickName || 'Twitter User' }}</div>
  65. <div class="luck-time">{{ formatTime(item.receiveTimestamp, 'MM-DD HH:mm') }}</div>
  66. </div>
  67. <div class="luck-money">
  68. <img :src="item.currencyIconPath" alt />
  69. <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
  70. </div>
  71. <div class="luck-king" v-if="item.maxAmount">
  72. <img src="/svg/icon-king-hat.svg" alt />
  73. <span>Luckiest Draw</span>
  74. </div>
  75. </div>
  76. </div>
  77. </template>
  78. <div class="area-cp-link">
  79. <div class="area-list">
  80. <div class="item">
  81. <div class="icon"><img :src=" require('../static/subject/01.svg') " /></div>
  82. <div class="font">Complete the tasks on tweet</div>
  83. </div>
  84. <div class="item">
  85. <div class="icon"><img :src=" require('../static/subject/02.svg') " /></div>
  86. <div class="font">Open link on PC to draw</div>
  87. <div class="pc"><img :src=" require('../static/subject/pc.svg') " /></div>
  88. </div>
  89. </div>
  90. <div class="area-content">
  91. {{ linkHref }}
  92. </div>
  93. <div class="area-btn">
  94. <div class="btn" :data-clipboard-text="linkHref">Copy Link</div>
  95. </div>
  96. </div>
  97. <div class="layer" v-show="layer_show">
  98. <div class="layer-box">
  99. <div class="layer-txt">Unable to copy, please enter the link manually</div>
  100. <div class="layer-btn" @click="layer_show = false">Done</div>
  101. </div>
  102. </div>
  103. </div>
  104. <!-- 手机端 -->
  105. </template>
  106. <template v-else>
  107. <div class="logo">
  108. <img src="/img/icon-logo.png" />
  109. </div>
  110. <div class="show">
  111. <div class="center">
  112. <div class="giveaway" :class="{ bg: status === 'not-open' }">
  113. <template v-if="status === 'not-open'">
  114. <img class="lottery" :src=" require('../static/svg/icon-luck-mark.svg') " />
  115. <div class="head">
  116. <img :src="detail.postBizData.postUserInfo.avatarUrl" />
  117. <span>{{ detail.postBizData.postUserInfo.nickName }}</span>
  118. </div>
  119. <div class="price">
  120. <div class="usdt">{{ detail.postBizData.currencySymbol }} GIVEAWAY</div>
  121. <div class="money">
  122. <img :src="detail.postBizData.currencyIconPath" />
  123. <font-amount :fontSize="60" :amount="detail.postBizData.amountValue"></font-amount>
  124. </div>
  125. </div>
  126. <div class="time">
  127. <span class="t">🕒 {{ validity }}</span>
  128. <span class="w">🏆 {{ detail.postBizData.totalCount }} WINNERS</span>
  129. </div>
  130. <div class="box">
  131. <img src="../static/subject/icon-box.png" />
  132. </div>
  133. </template>
  134. <template v-else>
  135. <div class="succTop">
  136. <template v-if="status === 'opened'">
  137. <img class="img" :src=" require('../static/svg/icon-luck-rabbit.svg') " />
  138. <p class="tips">Good Luck Next Time!</p>
  139. </template>
  140. <template v-else-if="status === 'expire'">
  141. <!-- <img class="img" :src=" require('../static/svg/icon-luck-complete.svg') " />
  142. <p class="tips">This Draw is Complete</p> -->
  143. <p class="expire">This Giveaways<br/>expired on {{ formatTime(detail.postBizData.endTimestamp, 'MM-DD') }}</p>
  144. </template>
  145. <template v-else>
  146. <p class="win">🎉 Awesome! You are Winner!</p>
  147. <div class="win-money">
  148. <img :src="detail.postBizData.currencyIconPath" />
  149. <font-amount :fontSize="46" :amount="receiveAmount"></font-amount>
  150. </div>
  151. </template>
  152. </div>
  153. <div class="succTitle">
  154. <span>{{ detail.postBizData.receiveCount || 0 }}/{{ detail.postBizData.totalCount || 0 }} Winners</span>
  155. <span>{{ detail.postBizData.receiveAmountValue }} / {{ detail.postBizData.amountValue || '' }} {{ detail.postBizData.currencySymbol || '' }}</span>
  156. </div>
  157. <div class="luck-list" @scroll="handleScroll($event)">
  158. <div class="luck-item" v-for="item, i in luck_list" v-bind:key="i">
  159. <div class="userLogo">
  160. <img class="medal" v-if="i < 2" :src=" require('../static/svg/icon-medal-' + i + '.svg') " />
  161. <img class="header" v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
  162. <img class="header" v-else src="/svg/icon-twitter.svg" alt />
  163. </div>
  164. <div class="luck-content">
  165. <div class="luck-title">{{ item.simpleUserInfoVO.nickName || 'Twitter User' }}</div>
  166. <div class="luck-time">{{ formatTime(item.receiveTimestamp, 'MM-DD HH:mm') }}</div>
  167. </div>
  168. <div class="luck-money">
  169. <img :src="item.currencyIconPath" alt />
  170. <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
  171. </div>
  172. <div class="luck-king" v-if="item.maxAmount">
  173. <img src="/svg/icon-king-hat.svg" alt />
  174. <span>Luckiest Draw</span>
  175. </div>
  176. </div>
  177. </div>
  178. </template>
  179. </div>
  180. <div class="desc">
  181. <template v-if="isChrome">
  182. <template v-if="status === 'not-open'">
  183. <div class="title">Install DeNet Plugin<br/>to Draw Prizes</div>
  184. <div class="issue">DeNet will detect task situation to issue Giveaway</div>
  185. </template>
  186. <template v-else>
  187. <div class="title">Install the Denet plugin<br/>to not miss the next draw</div>
  188. </template>
  189. <img class="button" @click="installExtension" src="../static/svg/icon-install-nft-plugin.svg" />
  190. </template>
  191. <template v-else>
  192. <div class="title">Get Giveaway<br />with chrome</div>
  193. <div class="issue">Only supports getting Giveaways through chrome</div>
  194. <img class="button" @click="clickOpenChrome" src="../static/svg/icon-install-nft-chrome.svg" />
  195. </template>
  196. </div>
  197. </div>
  198. </div>
  199. </template>
  200. </template>
  201. </div>
  202. </template>
  203. <script>
  204. import axios from 'axios'
  205. import Cookies from 'js-cookie'
  206. import { Toast } from 'vant';
  207. import { isBrowser, appType, appVersionCode } from '../utils/help.js'
  208. import FontAmount from '../components/FontAmount.vue'
  209. var moment = require('moment');
  210. var ClipboardJS = require('clipboard')
  211. const api = {
  212. prod: 'https://api.denetme.net',
  213. pre: 'https://preapi.denetme.net',
  214. test: 'https://testapi.denetme.net'
  215. }
  216. const page = {
  217. prod: "https://h5.denetme.net",
  218. pre: "https://preh5.denetme.net",
  219. test: 'https://testh5.denetme.net'
  220. }
  221. const jumpUrl = page[process.env.NUXT_ENV.MODE] + '/'
  222. const baseURL = api[process.env.NUXT_ENV.MODE]
  223. export default {
  224. name: 'luckdraw',
  225. components: {
  226. FontAmount,
  227. },
  228. head() {
  229. return {
  230. type: '',
  231. title: this.title,
  232. appVersionCode: 3,
  233. meta: [
  234. // facebook
  235. {
  236. name: 'og:url',
  237. content: this.jumpUrl + 'luckdraw/' + this.detail.postId
  238. },
  239. {
  240. name: 'og:title',
  241. content: this.metaTitle
  242. },
  243. {
  244. name: 'og:image',
  245. content: this.detail.postBizData.imagePath || ''
  246. },
  247. // twitter
  248. {
  249. name: 'twitter:card',
  250. content: 'summary_large_image'
  251. },
  252. {
  253. name: 'twitter:url',
  254. content: this.jumpUrl + 'luckdraw/' + this.detail.postId
  255. },
  256. {
  257. name: 'twitter:title',
  258. content: this.metaTitle
  259. },
  260. {
  261. name: 'twitter:image',
  262. content: this.detail.postBizData.imagePath || ''
  263. }
  264. ]
  265. }
  266. },
  267. data() {
  268. return {
  269. detail: {
  270. postId: '',
  271. postBizData: {
  272. imagePath: '',
  273. postUserInfo: {},
  274. amountValue: '0',
  275. }
  276. },
  277. luck_list: [],
  278. luck_list_end: false,
  279. layer_show: false,
  280. isLoading: true,
  281. isMobile: false,
  282. isChrome: false,
  283. config: {},
  284. mid: '',
  285. status: '', // not-open->未打开 opened->没有抽中 success->抽中了 expire->过期
  286. page_index: 1,
  287. page_size: 20,
  288. validity: '',
  289. receiveAmount: '0',
  290. title: 'DeNet Giveaway',
  291. metaTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
  292. }
  293. },
  294. mounted() {
  295. this.getConfig()
  296. this.setCookieMid()
  297. this.checkBrowser()
  298. this.handleStatusPage()
  299. this.isLoading = false;
  300. // 复制链接
  301. var clipboard = new ClipboardJS('.btn');
  302. clipboard.on('success', function (e) {
  303. Toast('copy success');
  304. e.clearSelection();
  305. });
  306. clipboard.on('error', function (e) {
  307. this.layer_show = true
  308. });
  309. },
  310. async asyncData(params) {
  311. let { route } = params;
  312. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  313. baseInfo: {
  314. appVersionCode: appVersionCode,
  315. mid: function () {
  316. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  317. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  318. return v.toString(16);
  319. });
  320. }()
  321. },
  322. params: {
  323. postId: route.params.id || ''
  324. }
  325. })
  326. if (data.code == 0) {
  327. if (data.data && data.data.postBizData && typeof data.data.postBizData == 'string') {
  328. data.data.postBizData = JSON.parse(data.data.postBizData)
  329. }
  330. if(data.data.postBizData === null) {
  331. data.data.postBizData = {
  332. postUserInfo: {}
  333. }
  334. }
  335. console.log('detail', data.data)
  336. return {
  337. detail: data.data,
  338. }
  339. }
  340. },
  341. methods: {
  342. checkBrowser() {
  343. this.linkHref = window.location.href;
  344. this.isChrome = isBrowser() == 'chrome';
  345. this.isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
  346. if (!this.isChrome) {
  347. this.status = 'no-chrome'
  348. } else {
  349. this.setPickupInfo()
  350. }
  351. },
  352. async getConfig() {
  353. let { data } = await axios.post(`${baseURL}/denet/base/config/getFrontConfig`, {
  354. baseInfo: {
  355. appVersionCode: appVersionCode,
  356. mid: this.mid
  357. },
  358. params: {}
  359. })
  360. if (data.code == 0) {
  361. this.config = data.data;
  362. }
  363. },
  364. setCookieMid() {
  365. let _cookie_mid_arr = Cookies.get('mid') || []
  366. if (_cookie_mid_arr.length > 0) {
  367. this.mid = JSON.parse(_cookie_mid_arr)[0].mid
  368. } else {
  369. this.mid = this.guid()
  370. Cookies.set('mid', JSON.stringify([{ mid: this.mid }]), { expires: 1000 })
  371. }
  372. },
  373. guid() {
  374. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  375. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  376. return v.toString(16);
  377. });
  378. },
  379. clickOpenChrome() {
  380. window.open('https://www.google.com/chrome')
  381. },
  382. installExtension() {
  383. let { extensionsInstallChannel, extensionsInstallUrl } = this.config;
  384. switch (extensionsInstallChannel) {
  385. case "officeDownload":
  386. location.href = url;
  387. this.$router.push({
  388. path: '/install'
  389. })
  390. break;
  391. case "chromeAppStore":
  392. window.open(extensionsInstallUrl)
  393. break;
  394. }
  395. },
  396. setPickupInfo() {
  397. let pickupInfo = {
  398. srcContentId: this.detail.srcContentId,
  399. postNickName: this.detail.postBizData.postUserInfo.nickName,
  400. createTime: Date.now(),
  401. };
  402. Cookies.set('pickup_info', JSON.stringify(pickupInfo), { expires: 100 });
  403. },
  404. formatTime(time, _type = 'MM-DD HH:mm:ss') {
  405. return moment(time).format(_type)
  406. },
  407. getValidity(end_time) {
  408. end_time += 3000;
  409. let _d1, _d2, _d3, _h, _m, _s
  410. let timer = setInterval(() => {
  411. let _time = new Date().getTime()
  412. _d3 = end_time - _time
  413. if (_d3 > 0) {
  414. _d1 = moment(end_time)
  415. _d2 = moment(_time)
  416. _h = moment.duration(_d1.diff(_d2)).hours()
  417. _m = moment.duration(_d1.diff(_d2)).minutes()
  418. _s = moment.duration(_d1.diff(_d2)).seconds()
  419. if (_h < 10) {
  420. _h = '0' + _h
  421. }
  422. if (_m < 10) {
  423. _m = '0' + _m
  424. }
  425. if (_s < 10) {
  426. _s = '0' + _s
  427. }
  428. this.validity = `${_h}:${_m}:${_s}`
  429. } else {
  430. this.validity = `00:00:00`
  431. this.getDetail(() => {
  432. this.handleStatusPage()
  433. })
  434. clearInterval(timer)
  435. }
  436. }, 1000)
  437. },
  438. handleScroll(e) {
  439. e = e.target
  440. if (this.luck_list_end) {
  441. return
  442. }
  443. if ((e.clientHeight + e.scrollTop) / e.scrollHeight > .8) {
  444. this.luck_list_end = false
  445. this.page_index++
  446. this.getReceivedList()
  447. }
  448. },
  449. handleStatusPage() {
  450. // 如果 我领取过了
  451. // taskFinishStatus 任务完成状态(0:未完成,1:已完成,2:已过期)
  452. if (this.detail.postBizData.myReceived) {
  453. this.receiveAmount = this.detail.postBizData.myReceived.amountValue || 0
  454. // 如果 任务完成状态 = 未完成
  455. if (this.detail.postBizData.myReceived.taskFinishStatus == 0) {
  456. // 显示任务未完成页面
  457. this.status = `opened`
  458. } else if (this.detail.postBizData.myReceived.taskFinishStatus == 1) {
  459. //如果 任务完成状态 = 已经完成
  460. if (this.receiveAmount == 0) {
  461. // 领取到空红包
  462. this.status = `opened`
  463. } else {
  464. // 显示成功页面
  465. this.status = `success`
  466. }
  467. } else {
  468. // 如果 任务完成状态 = 已经过期
  469. if (this.detail.postBizData.status == 1) {
  470. // 显示未打开页面
  471. this.status = 'not-open'
  472. } else {
  473. // 显示已经过期页面
  474. this.status = 'expire'
  475. }
  476. }
  477. } else {
  478. // 如果 我没有领取过
  479. // 如果 红包状态 = 进行中
  480. if (this.detail.postBizData.status == 1) {
  481. // 如果 过了红包的领取截止时间 = true
  482. if (this.detail.postBizData.receiveTimeExpired) {
  483. // 显示过期页面
  484. this.status = 'expire'
  485. } else {
  486. // 如果 过了红包的领取截止时间 = false
  487. // 显示未打开页面
  488. this.status = 'not-open'
  489. }
  490. } else {
  491. // 红包状态 = 已经结束了 | 已经终止 | 终止退款中
  492. // 显示过期页面
  493. this.status = 'expire'
  494. }
  495. }
  496. // this.status = 'not-open'
  497. // getList
  498. if (this.status !== 'not-open') {
  499. this.getReceivedList()
  500. } else {
  501. this.getValidity(this.detail.postBizData.endTimestamp)
  502. }
  503. },
  504. async getDetail(fn) {
  505. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  506. baseInfo: {
  507. appVersionCode: appVersionCode,
  508. mid: this.mid
  509. },
  510. params: {
  511. postId: this.detail.postId
  512. }
  513. })
  514. if (data.code == 0) {
  515. this.detail.postBizData = JSON.parse(data.data.postBizData)
  516. if (fn) fn();
  517. }
  518. },
  519. async getReceivedList() {
  520. let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/getReceivedList`, {
  521. baseInfo: {
  522. appVersionCode: appVersionCode,
  523. mid: this.mid
  524. },
  525. params: {
  526. pageNum: this.page_index,
  527. pageSize: this.page_size,
  528. postId: this.detail.postId || ''
  529. }
  530. })
  531. if (data.code == 0) {
  532. if (data.data.length > 0) {
  533. this.luck_list = this.luck_list.concat(data.data)
  534. this.luck_list_end = false
  535. } else {
  536. this.luck_list_end = true
  537. }
  538. }
  539. },
  540. }
  541. }
  542. </script>
  543. <style lang="scss">
  544. html,
  545. body,
  546. #__nuxt,
  547. #__layout {
  548. width: 100%;
  549. height: 100%;
  550. padding: 0;
  551. margin: 0;
  552. }
  553. .content {
  554. overflow: hidden;
  555. width: 100%;
  556. height: 100%;
  557. background: #F5FAFF;
  558. .loading {
  559. position: absolute;
  560. transform: translate(-50%, -50%);
  561. top: 50%;
  562. left: 50%;
  563. margin: auto;
  564. width: 40px;
  565. border-radius: 50%;
  566. }
  567. .logo {
  568. display: flex;
  569. align-items: center;
  570. height: 70px;
  571. margin-left: 25px;
  572. img {
  573. width: 99px;
  574. height: 32px;
  575. }
  576. }
  577. .show {
  578. display: flex;
  579. align-items: center;
  580. height: calc(100% - 70px);
  581. .center {
  582. display: flex;
  583. margin: -50px auto 0;
  584. justify-content: space-between;
  585. width: 1000px;
  586. .giveaway {
  587. position: relative;
  588. overflow: hidden;
  589. width: 375px;
  590. height: 500px;
  591. border-radius: 20px;
  592. background-color: #fff;
  593. box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.1);
  594. &.bg {
  595. background: linear-gradient(17.98deg, #3438FF 3.69%, #8B56FC 74.32%);
  596. }
  597. .lottery {
  598. position: absolute;
  599. top: 0;
  600. right: 0;
  601. width: 110px;
  602. height: 94px;
  603. }
  604. .head {
  605. display: flex;
  606. height: 50px;
  607. align-items: center;
  608. img {
  609. width: 20px;
  610. height: 20px;
  611. border-radius: 50%;
  612. margin: 0 10px 0 15px;
  613. border: solid 2px #fff;
  614. }
  615. span {
  616. color: #fff;
  617. font-size: 13px;
  618. font-weight: 700;
  619. line-height: 16px;
  620. letter-spacing: 0.005em;
  621. }
  622. }
  623. .price {
  624. text-align: center;
  625. .usdt {
  626. margin: 10px 0;
  627. color: #FFFFFF;
  628. font-weight: bold;
  629. font-size: 16px;
  630. line-height: 20px;
  631. text-align: center;
  632. letter-spacing: 0.3px;
  633. }
  634. .money {
  635. display: flex;
  636. align-items: center;
  637. justify-content: center;
  638. img {
  639. width: 46px;
  640. height: 46px;
  641. margin-right: 15px;
  642. border-radius: 50%;
  643. border: solid 3px #fff;
  644. }
  645. span {
  646. color: #fff;
  647. font-size: 60px;
  648. font-weight: 800;
  649. line-height: 76px;
  650. }
  651. }
  652. }
  653. .time {
  654. display: flex;
  655. height: 30px;
  656. align-items: center;
  657. justify-content: center;
  658. font-weight: bold;
  659. font-size: 17px;
  660. line-height: 22px;
  661. text-align: center;
  662. .t {
  663. color: #fff;
  664. margin-right: 8px;
  665. }
  666. .w {
  667. color: #fcc74e;
  668. margin-left: 8px;
  669. }
  670. }
  671. .box {
  672. margin: auto;
  673. width: 200px;
  674. height: 200px;
  675. margin-top: 27px;
  676. img {
  677. width: 100%;
  678. height: 100%;
  679. }
  680. }
  681. }
  682. .desc {
  683. width: 520px;
  684. .title {
  685. color: #2C2C2C;
  686. font-size: 36px;
  687. line-height: 40px;
  688. font-weight: 900;
  689. margin-top: 90px;
  690. margin-bottom: 20px;
  691. }
  692. .issue {
  693. font-size: 15px;
  694. color: #A4A4A4;
  695. }
  696. .button {
  697. cursor: pointer;
  698. height: 64px;
  699. margin-top: 30px;
  700. }
  701. }
  702. }
  703. }
  704. }
  705. .small {
  706. width: 100%;
  707. height: 100%;
  708. position: relative;
  709. background-color: #fff;
  710. &.bg {
  711. background: linear-gradient(17.98deg, #3438FF 3.69%, #8B56FC 74.32%);
  712. }
  713. .lottery {
  714. position: absolute;
  715. top: 0;
  716. right: 0;
  717. width: 110px;
  718. height: 94px;
  719. }
  720. .luck-list {
  721. height: calc(100% - 430px);
  722. }
  723. .head {
  724. display: flex;
  725. height: 50px;
  726. align-items: center;
  727. img {
  728. width: 20px;
  729. height: 20px;
  730. border-radius: 50%;
  731. margin: 0 10px 0 15px;
  732. border: solid 2px #fff;
  733. }
  734. span {
  735. color: #fff;
  736. font-size: 13px;
  737. font-weight: 700;
  738. line-height: 16px;
  739. letter-spacing: 0.005em;
  740. }
  741. }
  742. .price {
  743. text-align: center;
  744. .usdt {
  745. margin: 10px 0;
  746. color: #FFFFFF;
  747. font-weight: bold;
  748. font-size: 16px;
  749. line-height: 20px;
  750. text-align: center;
  751. letter-spacing: 0.3px;
  752. }
  753. .money {
  754. display: flex;
  755. align-items: center;
  756. justify-content: center;
  757. img {
  758. width: 46px;
  759. height: 46px;
  760. margin-right: 15px;
  761. border-radius: 50%;
  762. border: solid 3px #fff;
  763. }
  764. span {
  765. color: #fff;
  766. font-size: 60px;
  767. font-weight: 800;
  768. line-height: 76px;
  769. }
  770. }
  771. }
  772. .time {
  773. display: flex;
  774. height: 30px;
  775. align-items: center;
  776. justify-content: center;
  777. font-weight: bold;
  778. font-size: 17px;
  779. line-height: 22px;
  780. text-align: center;
  781. .t {
  782. color: #fff;
  783. margin-right: 8px;
  784. }
  785. .w {
  786. color: #fcc74e;
  787. margin-left: 8px;
  788. }
  789. }
  790. .box {
  791. margin: auto;
  792. width: 200px;
  793. height: 200px;
  794. margin-top: 27px;
  795. img {
  796. width: 100%;
  797. height: 100%;
  798. }
  799. }
  800. .area-cp-link {
  801. position: absolute;
  802. bottom: 0;
  803. background: #fff;
  804. overflow: hidden;
  805. width: 100%;
  806. flex-wrap: wrap;
  807. height: 238px;
  808. box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
  809. border-top-left-radius: 10px;
  810. border-top-right-radius: 10px;
  811. .area-list {
  812. clear: both;
  813. margin: 15px;
  814. .item {
  815. clear: both;
  816. overflow: hidden;
  817. margin: 7px 0;
  818. font-size: 16px;
  819. font-weight: 500;
  820. .icon {
  821. float: left;
  822. margin-right: 8px;
  823. margin-top: -2px;
  824. }
  825. .font {
  826. float: left;
  827. margin-right: 8px;
  828. }
  829. .pc {
  830. float: left;
  831. margin-top: -2px;
  832. }
  833. }
  834. }
  835. .area-content {
  836. margin: 0 15px;
  837. color: #4B4B4B;
  838. padding: 7px 10px;
  839. font-size: 13px;
  840. border-radius: 5px;
  841. background: #F4F4F4;
  842. word-break: break-all;
  843. }
  844. .area-btn {
  845. flex: 1;
  846. display: flex;
  847. justify-content: center;
  848. .btn {
  849. margin: 15px 15px 0 15px;
  850. display: inline-block;
  851. width: 100%;
  852. height: 47px;
  853. font-size: 18px;
  854. line-height: 34px;
  855. color: #FFFFFF;
  856. border-radius: 100px;
  857. background: #389AFF;
  858. }
  859. }
  860. }
  861. }
  862. .layer {
  863. position: fixed;
  864. width: 100%;
  865. height: 100%;
  866. top: 0;
  867. left: 0;
  868. background: rgba(0, 0, 0, .5);
  869. .layer-box {
  870. width: 300px;
  871. height: 170px;
  872. background: #FFFFFF;
  873. border-radius: 11px;
  874. opacity: 1;
  875. position: absolute;
  876. top: 250px;
  877. left: 50%;
  878. margin-left: -150px;
  879. .layer-txt {
  880. margin: 30px 0;
  881. width: 100%;
  882. padding: 0 27px;
  883. font-weight: 600;
  884. font-size: 18px;
  885. text-align: center;
  886. }
  887. .layer-btn {
  888. width: 190px;
  889. height: 40px;
  890. background: #389AFF;
  891. border-radius: 100px;
  892. margin: 0 auto;
  893. text-align: center;
  894. line-height: 40px;
  895. color: #fff;
  896. font-weight: 600;
  897. font-size: 18px;
  898. }
  899. }
  900. }
  901. .luck-list {
  902. flex: 1;
  903. width: 100%;
  904. height: 310px;
  905. overflow-y: auto;
  906. .luck-item {
  907. display: flex;
  908. padding: 12px 0;
  909. margin: 0 16px;
  910. border-bottom: 1px solid #F2F2F2;
  911. justify-content: space-between;
  912. position: relative;
  913. .header {
  914. border-radius: 50%;
  915. }
  916. .luck-king {
  917. position: absolute;
  918. top: 36px;
  919. right: 0px;
  920. display: flex;
  921. align-items: center;
  922. img {
  923. width: 22px;
  924. height: 19px;
  925. margin: 0;
  926. }
  927. span {
  928. font-weight: 500;
  929. font-size: 12px;
  930. line-height: 14px;
  931. letter-spacing: 0.3px;
  932. color: #f5b945;
  933. }
  934. }
  935. .userLogo {
  936. position: relative;
  937. width: 42px;
  938. height: 42px;
  939. margin-right: 12px;
  940. .medal {
  941. position: absolute;
  942. right: -5px;
  943. bottom: -5px;
  944. width: 18px;
  945. height: 18px;
  946. }
  947. img {
  948. width: 100%;
  949. height: 100%;
  950. }
  951. }
  952. .luck-content {
  953. flex: auto;
  954. .luck-title {
  955. font-weight: 500;
  956. font-size: 16px;
  957. letter-spacing: 0.3px;
  958. color: #444444;
  959. }
  960. .luck-time {
  961. font-weight: 400;
  962. font-size: 12px;
  963. line-height: 14px;
  964. color: #9b9b9b;
  965. }
  966. }
  967. .luck-money {
  968. display: flex;
  969. height: 17px;
  970. align-items: center;
  971. img {
  972. width: 14px;
  973. height: 14px;
  974. margin-right: 6px;
  975. }
  976. .luck-money-txt {
  977. font-weight: 500;
  978. font-size: 14px;
  979. /* identical to box height */
  980. text-align: right;
  981. letter-spacing: 0.3px;
  982. color: #444444;
  983. }
  984. }
  985. }
  986. .luck-item:last-child {
  987. border: 0;
  988. }
  989. }
  990. .succTop {
  991. display: flex;
  992. align-items: center;
  993. flex-direction: column;
  994. justify-content: center;
  995. height: 150px;
  996. margin-bottom: 13px;
  997. background: #7D52FD;
  998. border-radius: 0 586px 586px/0 0 104px 104px;
  999. .img {
  1000. height: 62px;
  1001. }
  1002. .expire {
  1003. color: #FFFFFF;
  1004. font-size: 22px;
  1005. font-weight: 800;
  1006. line-height: 36px;
  1007. margin-top: 15px;
  1008. text-align: center;
  1009. }
  1010. .tips {
  1011. color: #FFFFFF;
  1012. font-size: 22px;
  1013. font-weight: 800;
  1014. line-height: 26px;
  1015. margin-top: 15px;
  1016. }
  1017. .win {
  1018. font-size: 21px;
  1019. font-weight: 800;
  1020. color: #fff;
  1021. }
  1022. .win-money {
  1023. display: flex;
  1024. margin-top: -10px;
  1025. align-items: center;
  1026. justify-content: center;
  1027. img {
  1028. width: 44px;
  1029. height: 44px;
  1030. margin-right: 15px;
  1031. border-radius: 50%;
  1032. border: solid 3px #fff;
  1033. }
  1034. span {
  1035. color: #fff;
  1036. font-size: 60px;
  1037. font-weight: 800;
  1038. line-height: 76px;
  1039. }
  1040. }
  1041. }
  1042. .succTitle {
  1043. display: flex;
  1044. padding: 5px 0;
  1045. justify-content: space-between;
  1046. box-shadow: inset 0px -1px 0px #F2F2F2;
  1047. span {
  1048. margin: 0 16px;
  1049. font-size: 12px;
  1050. color: #B0B0B0;
  1051. &:last-child {
  1052. text-align: right;
  1053. }
  1054. }
  1055. }
  1056. </style>