luckdraw.vue 39 KB

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