luckdraw.vue 35 KB

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