luckdraw.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060
  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. <img class="img" :src=" require('../static/svg/icon-time.svg') " />
  27. {{ validity || '00:00:00' }}
  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. <img class="img" :src=" require('../static/svg/icon-time.svg') " />
  128. {{ validity || '00:00:00' }}
  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, formatSecondsAsDaysOrTime } 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. jumpUrl: jumpUrl,
  292. metaTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
  293. }
  294. },
  295. mounted() {
  296. this.getConfig()
  297. this.setCookieMid()
  298. this.checkBrowser()
  299. this.handleStatusPage()
  300. this.isLoading = false;
  301. // 复制链接
  302. var clipboard = new ClipboardJS('.btn');
  303. clipboard.on('success', function (e) {
  304. Toast('copy success');
  305. e.clearSelection();
  306. });
  307. clipboard.on('error', function (e) {
  308. this.layer_show = true
  309. });
  310. },
  311. async asyncData(params) {
  312. let { route } = params;
  313. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  314. baseInfo: {
  315. appVersionCode: appVersionCode,
  316. mid: function () {
  317. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  318. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  319. return v.toString(16);
  320. });
  321. }()
  322. },
  323. params: {
  324. postId: route.params.id || ''
  325. }
  326. })
  327. if (data.code == 0) {
  328. if (data.data && data.data.postBizData && typeof data.data.postBizData == 'string') {
  329. data.data.postBizData = JSON.parse(data.data.postBizData)
  330. }
  331. if(data.data.postBizData === null) {
  332. data.data.postBizData = {
  333. postUserInfo: {}
  334. }
  335. }
  336. console.log('detail', data.data)
  337. return {
  338. detail: data.data,
  339. }
  340. }
  341. },
  342. methods: {
  343. checkBrowser() {
  344. this.linkHref = window.location.href;
  345. this.isChrome = isBrowser() == 'chrome';
  346. 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);
  347. if (!this.isChrome) {
  348. this.status = 'no-chrome'
  349. } else {
  350. this.setPickupInfo()
  351. }
  352. },
  353. async getConfig() {
  354. let { data } = await axios.post(`${baseURL}/denet/base/config/getFrontConfig`, {
  355. baseInfo: {
  356. appVersionCode: appVersionCode,
  357. mid: this.mid
  358. },
  359. params: {}
  360. })
  361. if (data.code == 0) {
  362. this.config = data.data;
  363. }
  364. },
  365. setCookieMid() {
  366. let _cookie_mid_arr = Cookies.get('mid') || []
  367. if (_cookie_mid_arr.length > 0) {
  368. this.mid = JSON.parse(_cookie_mid_arr)[0].mid
  369. } else {
  370. this.mid = this.guid()
  371. Cookies.set('mid', JSON.stringify([{ mid: this.mid }]), { expires: 1000 })
  372. }
  373. },
  374. guid() {
  375. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  376. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  377. return v.toString(16);
  378. });
  379. },
  380. clickOpenChrome() {
  381. window.open('https://www.google.com/chrome')
  382. },
  383. installExtension() {
  384. let { extensionsInstallChannel, extensionsInstallUrl } = this.config;
  385. switch (extensionsInstallChannel) {
  386. case "officeDownload":
  387. location.href = url;
  388. this.$router.push({
  389. path: '/install'
  390. })
  391. break;
  392. case "chromeAppStore":
  393. window.open(extensionsInstallUrl)
  394. break;
  395. }
  396. },
  397. setPickupInfo() {
  398. let pickupInfo = {
  399. srcContentId: this.detail.srcContentId,
  400. postNickName: this.detail.postBizData.postUserInfo.nickName,
  401. createTime: Date.now(),
  402. };
  403. Cookies.set('pickup_info', JSON.stringify(pickupInfo), { expires: 100 });
  404. },
  405. formatTime(time, _type = 'MM-DD HH:mm:ss') {
  406. return moment(time).format(_type)
  407. },
  408. getValidity(end_time) {
  409. let timer = setInterval(() => {
  410. let time = moment(new Date().getTime())
  411. let endTime = moment(end_time + 5000)
  412. let downTime = (endTime - time) || 0
  413. if (downTime > 0) {
  414. this.validity = formatSecondsAsDaysOrTime(downTime / 1000);
  415. } else {
  416. this.validity = `00:00:00`
  417. this.getDetail(() => {
  418. this.handleStatusPage()
  419. })
  420. clearInterval(timer)
  421. }
  422. }, 1000)
  423. },
  424. handleScroll(e) {
  425. e = e.target
  426. if (this.luck_list_end) {
  427. return
  428. }
  429. if ((e.clientHeight + e.scrollTop) / e.scrollHeight > .8) {
  430. this.luck_list_end = false
  431. this.page_index++
  432. this.getReceivedList()
  433. }
  434. },
  435. handleStatusPage() {
  436. // 如果 我领取过了
  437. // taskFinishStatus 任务完成状态(0:未完成,1:已完成,2:已过期)
  438. if (this.detail.postBizData.myReceived) {
  439. this.receiveAmount = this.detail.postBizData.myReceived.amountValue || 0
  440. // 如果 任务完成状态 = 未完成
  441. if (this.detail.postBizData.myReceived.taskFinishStatus == 0) {
  442. // 显示任务未完成页面
  443. this.status = `opened`
  444. } else if (this.detail.postBizData.myReceived.taskFinishStatus == 1) {
  445. //如果 任务完成状态 = 已经完成
  446. if (this.receiveAmount == 0) {
  447. // 领取到空红包
  448. this.status = `opened`
  449. } else {
  450. // 显示成功页面
  451. this.status = `success`
  452. }
  453. } else {
  454. // 如果 任务完成状态 = 已经过期
  455. if (this.detail.postBizData.status == 1) {
  456. // 显示未打开页面
  457. this.status = 'not-open'
  458. } else {
  459. // 显示已经过期页面
  460. this.status = 'expire'
  461. }
  462. }
  463. } else {
  464. // 如果 我没有领取过
  465. // 如果 红包状态 = 进行中
  466. if (this.detail.postBizData.status == 1) {
  467. // 如果 过了红包的领取截止时间 = true
  468. if (this.detail.postBizData.receiveTimeExpired) {
  469. // 显示过期页面
  470. this.status = 'expire'
  471. } else {
  472. // 如果 过了红包的领取截止时间 = false
  473. // 显示未打开页面
  474. this.status = 'not-open'
  475. }
  476. } else {
  477. // 红包状态 = 已经结束了 | 已经终止 | 终止退款中
  478. // 显示过期页面
  479. this.status = 'expire'
  480. }
  481. }
  482. // this.status = 'not-open'
  483. // getList
  484. if (this.status !== 'not-open') {
  485. this.getReceivedList()
  486. } else {
  487. this.getValidity(this.detail.postBizData.endTimestamp)
  488. }
  489. },
  490. async getDetail(fn) {
  491. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  492. baseInfo: {
  493. appVersionCode: appVersionCode,
  494. mid: this.mid
  495. },
  496. params: {
  497. postId: this.detail.postId
  498. }
  499. })
  500. if (data.code == 0) {
  501. this.detail.postBizData = JSON.parse(data.data.postBizData)
  502. if (fn) fn();
  503. }
  504. },
  505. async getReceivedList() {
  506. let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/getReceivedList`, {
  507. baseInfo: {
  508. appVersionCode: appVersionCode,
  509. mid: this.mid
  510. },
  511. params: {
  512. pageNum: this.page_index,
  513. pageSize: this.page_size,
  514. postId: this.detail.postId || ''
  515. }
  516. })
  517. if (data.code == 0) {
  518. if (data.data.length > 0) {
  519. this.luck_list = this.luck_list.concat(data.data)
  520. this.luck_list_end = false
  521. } else {
  522. this.luck_list_end = true
  523. }
  524. }
  525. },
  526. }
  527. }
  528. </script>
  529. <style lang="scss">
  530. html,
  531. body,
  532. #__nuxt,
  533. #__layout {
  534. width: 100%;
  535. height: 100%;
  536. padding: 0;
  537. margin: 0;
  538. }
  539. .content {
  540. overflow: hidden;
  541. width: 100%;
  542. height: 100%;
  543. background: #F5FAFF;
  544. .loading {
  545. position: absolute;
  546. transform: translate(-50%, -50%);
  547. top: 50%;
  548. left: 50%;
  549. margin: auto;
  550. width: 40px;
  551. border-radius: 50%;
  552. }
  553. .logo {
  554. display: flex;
  555. align-items: center;
  556. height: 70px;
  557. margin-left: 25px;
  558. img {
  559. width: 99px;
  560. height: 32px;
  561. }
  562. }
  563. .show {
  564. display: flex;
  565. align-items: center;
  566. height: calc(100% - 70px);
  567. .center {
  568. display: flex;
  569. margin: -50px auto 0;
  570. justify-content: space-between;
  571. width: 1000px;
  572. .giveaway {
  573. position: relative;
  574. overflow: hidden;
  575. width: 375px;
  576. height: 500px;
  577. border-radius: 20px;
  578. background-color: #fff;
  579. box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.1);
  580. &.bg {
  581. background: linear-gradient(17.98deg, #3438FF 3.69%, #8B56FC 74.32%);
  582. }
  583. .lottery {
  584. position: absolute;
  585. top: 0;
  586. right: 0;
  587. width: 110px;
  588. height: 94px;
  589. }
  590. .head {
  591. display: flex;
  592. height: 50px;
  593. align-items: center;
  594. img {
  595. width: 20px;
  596. height: 20px;
  597. border-radius: 50%;
  598. margin: 0 10px 0 15px;
  599. border: solid 2px #fff;
  600. }
  601. span {
  602. color: #fff;
  603. font-size: 13px;
  604. font-weight: 700;
  605. line-height: 16px;
  606. letter-spacing: 0.005em;
  607. }
  608. }
  609. .price {
  610. text-align: center;
  611. .usdt {
  612. margin: 10px 0;
  613. color: #FFFFFF;
  614. font-weight: bold;
  615. font-size: 16px;
  616. line-height: 20px;
  617. text-align: center;
  618. letter-spacing: 0.3px;
  619. }
  620. .money {
  621. display: flex;
  622. align-items: center;
  623. justify-content: center;
  624. img {
  625. width: 46px;
  626. height: 46px;
  627. margin-right: 15px;
  628. border-radius: 50%;
  629. border: solid 3px #fff;
  630. }
  631. span {
  632. color: #fff;
  633. font-size: 60px;
  634. font-weight: 800;
  635. line-height: 76px;
  636. }
  637. }
  638. }
  639. .time {
  640. display: flex;
  641. height: 46px;
  642. color: #FFCC4D;
  643. align-items: center;
  644. justify-content: center;
  645. font-weight: bold;
  646. font-size: 26px;
  647. line-height: 33px;
  648. text-align: center;
  649. background: rgba($color: #000000, $alpha: .15);
  650. .img {
  651. width: 26px;
  652. margin-right: 10px;
  653. }
  654. }
  655. .box {
  656. margin: auto;
  657. width: 200px;
  658. height: 200px;
  659. margin-top: 27px;
  660. img {
  661. width: 100%;
  662. height: 100%;
  663. }
  664. }
  665. }
  666. .desc {
  667. width: 520px;
  668. .title {
  669. color: #2C2C2C;
  670. font-size: 36px;
  671. line-height: 40px;
  672. font-weight: 900;
  673. margin-top: 90px;
  674. margin-bottom: 20px;
  675. }
  676. .issue {
  677. font-size: 15px;
  678. color: #A4A4A4;
  679. }
  680. .button {
  681. cursor: pointer;
  682. height: 64px;
  683. margin-top: 30px;
  684. }
  685. }
  686. }
  687. }
  688. }
  689. .small {
  690. width: 100%;
  691. height: 100%;
  692. position: relative;
  693. background-color: #fff;
  694. &.bg {
  695. background: linear-gradient(17.98deg, #3438FF 3.69%, #8B56FC 74.32%);
  696. }
  697. .lottery {
  698. position: absolute;
  699. top: 0;
  700. right: 0;
  701. width: 110px;
  702. height: 94px;
  703. }
  704. .luck-list {
  705. height: calc(100% - 430px);
  706. }
  707. .head {
  708. display: flex;
  709. height: 50px;
  710. align-items: center;
  711. img {
  712. width: 20px;
  713. height: 20px;
  714. border-radius: 50%;
  715. margin: 0 10px 0 15px;
  716. border: solid 2px #fff;
  717. }
  718. span {
  719. color: #fff;
  720. font-size: 13px;
  721. font-weight: 700;
  722. line-height: 16px;
  723. letter-spacing: 0.005em;
  724. }
  725. }
  726. .price {
  727. text-align: center;
  728. .usdt {
  729. margin: 10px 0;
  730. color: #FFFFFF;
  731. font-weight: bold;
  732. font-size: 16px;
  733. line-height: 20px;
  734. text-align: center;
  735. letter-spacing: 0.3px;
  736. }
  737. .money {
  738. display: flex;
  739. align-items: center;
  740. justify-content: center;
  741. img {
  742. width: 46px;
  743. height: 46px;
  744. margin-right: 15px;
  745. border-radius: 50%;
  746. border: solid 3px #fff;
  747. }
  748. span {
  749. color: #fff;
  750. font-size: 60px;
  751. font-weight: 800;
  752. line-height: 76px;
  753. }
  754. }
  755. }
  756. .time {
  757. display: flex;
  758. height: 46px;
  759. color: #FFCC4D;
  760. align-items: center;
  761. justify-content: center;
  762. font-weight: bold;
  763. font-size: 26px;
  764. line-height: 33px;
  765. text-align: center;
  766. background: rgba($color: #000000, $alpha: .15);
  767. .img {
  768. width: 26px;
  769. margin-right: 10px;
  770. }
  771. }
  772. .box {
  773. margin: auto;
  774. width: 200px;
  775. height: 200px;
  776. margin-top: 27px;
  777. img {
  778. width: 100%;
  779. height: 100%;
  780. }
  781. }
  782. .area-cp-link {
  783. position: absolute;
  784. bottom: 0;
  785. background: #fff;
  786. overflow: hidden;
  787. width: 100%;
  788. flex-wrap: wrap;
  789. height: 238px;
  790. box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
  791. border-top-left-radius: 10px;
  792. border-top-right-radius: 10px;
  793. .area-list {
  794. clear: both;
  795. margin: 15px;
  796. .item {
  797. clear: both;
  798. overflow: hidden;
  799. margin: 7px 0;
  800. font-size: 16px;
  801. font-weight: 500;
  802. .icon {
  803. float: left;
  804. margin-right: 8px;
  805. margin-top: -2px;
  806. }
  807. .font {
  808. float: left;
  809. margin-right: 8px;
  810. }
  811. .pc {
  812. float: left;
  813. margin-top: -2px;
  814. }
  815. }
  816. }
  817. .area-content {
  818. margin: 0 15px;
  819. color: #4B4B4B;
  820. padding: 7px 10px;
  821. font-size: 13px;
  822. border-radius: 5px;
  823. background: #F4F4F4;
  824. word-break: break-all;
  825. }
  826. .area-btn {
  827. flex: 1;
  828. display: flex;
  829. justify-content: center;
  830. .btn {
  831. margin: 15px 15px 0 15px;
  832. display: inline-block;
  833. width: 100%;
  834. height: 47px;
  835. font-size: 18px;
  836. line-height: 34px;
  837. color: #FFFFFF;
  838. border-radius: 100px;
  839. background: #389AFF;
  840. }
  841. }
  842. }
  843. }
  844. .layer {
  845. position: fixed;
  846. width: 100%;
  847. height: 100%;
  848. top: 0;
  849. left: 0;
  850. background: rgba(0, 0, 0, .5);
  851. .layer-box {
  852. width: 300px;
  853. height: 170px;
  854. background: #FFFFFF;
  855. border-radius: 11px;
  856. opacity: 1;
  857. position: absolute;
  858. top: 250px;
  859. left: 50%;
  860. margin-left: -150px;
  861. .layer-txt {
  862. margin: 30px 0;
  863. width: 100%;
  864. padding: 0 27px;
  865. font-weight: 600;
  866. font-size: 18px;
  867. text-align: center;
  868. }
  869. .layer-btn {
  870. width: 190px;
  871. height: 40px;
  872. background: #389AFF;
  873. border-radius: 100px;
  874. margin: 0 auto;
  875. text-align: center;
  876. line-height: 40px;
  877. color: #fff;
  878. font-weight: 600;
  879. font-size: 18px;
  880. }
  881. }
  882. }
  883. .luck-list {
  884. flex: 1;
  885. width: 100%;
  886. height: 310px;
  887. overflow-y: auto;
  888. .luck-item {
  889. display: flex;
  890. padding: 12px 0;
  891. margin: 0 16px;
  892. border-bottom: 1px solid #F2F2F2;
  893. justify-content: space-between;
  894. position: relative;
  895. .header {
  896. border-radius: 50%;
  897. }
  898. .luck-king {
  899. position: absolute;
  900. top: 36px;
  901. right: 0px;
  902. display: flex;
  903. align-items: center;
  904. img {
  905. width: 22px;
  906. height: 19px;
  907. margin: 0;
  908. }
  909. span {
  910. font-weight: 500;
  911. font-size: 12px;
  912. line-height: 14px;
  913. letter-spacing: 0.3px;
  914. color: #f5b945;
  915. }
  916. }
  917. .userLogo {
  918. position: relative;
  919. width: 42px;
  920. height: 42px;
  921. margin-right: 12px;
  922. .medal {
  923. position: absolute;
  924. right: -5px;
  925. bottom: -5px;
  926. width: 18px;
  927. height: 18px;
  928. }
  929. img {
  930. width: 100%;
  931. height: 100%;
  932. }
  933. }
  934. .luck-content {
  935. flex: auto;
  936. .luck-title {
  937. font-weight: 500;
  938. font-size: 16px;
  939. letter-spacing: 0.3px;
  940. color: #444444;
  941. }
  942. .luck-time {
  943. font-weight: 400;
  944. font-size: 12px;
  945. line-height: 14px;
  946. color: #9b9b9b;
  947. }
  948. }
  949. .luck-money {
  950. display: flex;
  951. height: 17px;
  952. align-items: center;
  953. img {
  954. width: 14px;
  955. height: 14px;
  956. margin-right: 6px;
  957. }
  958. .luck-money-txt {
  959. font-weight: 500;
  960. font-size: 14px;
  961. /* identical to box height */
  962. text-align: right;
  963. letter-spacing: 0.3px;
  964. color: #444444;
  965. }
  966. }
  967. }
  968. .luck-item:last-child {
  969. border: 0;
  970. }
  971. }
  972. .succTop {
  973. display: flex;
  974. align-items: center;
  975. flex-direction: column;
  976. justify-content: center;
  977. height: 150px;
  978. margin-bottom: 13px;
  979. background: #7D52FD;
  980. border-radius: 0 586px 586px/0 0 104px 104px;
  981. .img {
  982. height: 62px;
  983. }
  984. .expire {
  985. color: #FFFFFF;
  986. font-size: 22px;
  987. font-weight: 800;
  988. line-height: 36px;
  989. margin-top: 15px;
  990. text-align: center;
  991. }
  992. .tips {
  993. color: #FFFFFF;
  994. font-size: 22px;
  995. font-weight: 800;
  996. line-height: 26px;
  997. margin-top: 15px;
  998. }
  999. .win {
  1000. font-size: 21px;
  1001. font-weight: 800;
  1002. color: #fff;
  1003. }
  1004. .win-money {
  1005. display: flex;
  1006. margin-top: -10px;
  1007. align-items: center;
  1008. justify-content: center;
  1009. img {
  1010. width: 44px;
  1011. height: 44px;
  1012. margin-right: 15px;
  1013. border-radius: 50%;
  1014. border: solid 3px #fff;
  1015. }
  1016. span {
  1017. color: #fff;
  1018. font-size: 60px;
  1019. font-weight: 800;
  1020. line-height: 76px;
  1021. }
  1022. }
  1023. }
  1024. .succTitle {
  1025. display: flex;
  1026. padding: 5px 0;
  1027. justify-content: space-between;
  1028. box-shadow: inset 0px -1px 0px #F2F2F2;
  1029. span {
  1030. margin: 0 16px;
  1031. font-size: 12px;
  1032. color: #B0B0B0;
  1033. &:last-child {
  1034. text-align: right;
  1035. }
  1036. }
  1037. }
  1038. </style>