luckdraw.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065
  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. this.getDetail()
  429. this.getReceivedList()
  430. clearInterval(timer)
  431. }
  432. }, 1000)
  433. },
  434. handleScroll(e) {
  435. e = e.target
  436. if (this.luck_list_end) {
  437. return
  438. }
  439. if ((e.clientHeight + e.scrollTop) / e.scrollHeight > .8) {
  440. this.luck_list_end = false
  441. this.page_index++
  442. this.getReceivedList()
  443. }
  444. },
  445. handleStatusPage() {
  446. // 如果 我领取过了
  447. // taskFinishStatus 任务完成状态(0:未完成,1:已完成,2:已过期)
  448. if (this.detail.myReceived) {
  449. this.receiveAmount = this.detail.myReceived.amountValue || 0
  450. // 如果 任务完成状态 = 未完成
  451. if (this.detail.myReceived.taskFinishStatus == 0) {
  452. // 显示任务未完成页面
  453. this.status = `opened`
  454. } else if (this.detail.myReceived.taskFinishStatus == 1) {
  455. //如果 任务完成状态 = 已经完成
  456. if (this.receiveAmount == 0) {
  457. // 领取到空红包
  458. this.status = `opened`
  459. } else {
  460. // 显示成功页面
  461. this.status = `success`
  462. }
  463. } else {
  464. // 如果 任务完成状态 = 已经过期
  465. if (this.detail.status == 1) {
  466. // 显示未打开页面
  467. this.status = 'not-open'
  468. } else {
  469. // 显示已经过期页面
  470. this.status = 'expire'
  471. }
  472. }
  473. } else {
  474. // 如果 我没有领取过
  475. // 如果 红包状态 = 进行中
  476. if (this.detail.status == 1) {
  477. // 如果 过了红包的领取截止时间 = true
  478. if (this.detail.receiveTimeExpired) {
  479. // 显示过期页面
  480. this.status = 'expire'
  481. } else {
  482. // 如果 过了红包的领取截止时间 = false
  483. // 显示未打开页面
  484. this.status = 'not-open'
  485. }
  486. } else {
  487. // 红包状态 = 已经结束了 | 已经终止 | 终止退款中
  488. // 显示过期页面
  489. this.status = 'expire'
  490. }
  491. }
  492. // this.status = 'not-open'
  493. // getList
  494. if (this.status !== 'not-open') {
  495. this.getReceivedList()
  496. } else {
  497. this.getValidity(this.detail.endTimestamp)
  498. }
  499. },
  500. async getDetail() {
  501. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  502. baseInfo: {
  503. appVersionCode: appVersionCode,
  504. mid: this.mid
  505. },
  506. params: {
  507. postId: this.detail.postId
  508. }
  509. })
  510. if (data.code == 0) {
  511. this.detail.postBizData = JSON.parse(data.data.postBizData)
  512. }
  513. },
  514. async getReceivedList() {
  515. let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/getReceivedList`, {
  516. baseInfo: {
  517. appVersionCode: appVersionCode,
  518. mid: this.mid
  519. },
  520. params: {
  521. pageNum: this.page_index,
  522. pageSize: this.page_size,
  523. postId: this.detail.postId || ''
  524. }
  525. })
  526. if (data.code == 0) {
  527. if (data.data.length > 0) {
  528. this.luck_list = this.luck_list.concat(data.data)
  529. this.luck_list_end = false
  530. } else {
  531. this.luck_list_end = true
  532. }
  533. }
  534. },
  535. }
  536. }
  537. </script>
  538. <style lang="scss">
  539. html,
  540. body,
  541. #__nuxt,
  542. #__layout {
  543. width: 100%;
  544. height: 100%;
  545. padding: 0;
  546. margin: 0;
  547. }
  548. .content {
  549. overflow: hidden;
  550. width: 100%;
  551. height: 100%;
  552. background: #F5FAFF;
  553. .loading {
  554. position: absolute;
  555. transform: translate(-50%, -50%);
  556. top: 50%;
  557. left: 50%;
  558. margin: auto;
  559. width: 40px;
  560. border-radius: 50%;
  561. }
  562. .logo {
  563. display: flex;
  564. align-items: center;
  565. height: 70px;
  566. margin-left: 25px;
  567. img {
  568. width: 99px;
  569. height: 32px;
  570. }
  571. }
  572. .show {
  573. display: flex;
  574. align-items: center;
  575. height: calc(100% - 70px);
  576. .center {
  577. display: flex;
  578. margin: -50px auto 0;
  579. justify-content: space-between;
  580. width: 1000px;
  581. .giveaway {
  582. position: relative;
  583. overflow: hidden;
  584. width: 375px;
  585. height: 500px;
  586. border-radius: 20px;
  587. background-color: #fff;
  588. box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.1);
  589. &.bg {
  590. background: linear-gradient(17.98deg, #3438FF 3.69%, #8B56FC 74.32%);
  591. }
  592. .lottery {
  593. position: absolute;
  594. top: 0;
  595. right: 0;
  596. width: 110px;
  597. height: 94px;
  598. }
  599. .head {
  600. display: flex;
  601. height: 50px;
  602. align-items: center;
  603. img {
  604. width: 20px;
  605. height: 20px;
  606. border-radius: 50%;
  607. margin: 0 10px 0 15px;
  608. border: solid 2px #fff;
  609. }
  610. span {
  611. color: #fff;
  612. font-size: 13px;
  613. font-weight: 700;
  614. line-height: 16px;
  615. letter-spacing: 0.005em;
  616. }
  617. }
  618. .price {
  619. text-align: center;
  620. .usdt {
  621. margin: 10px 0;
  622. color: #FFFFFF;
  623. font-weight: bold;
  624. font-size: 16px;
  625. line-height: 20px;
  626. text-align: center;
  627. letter-spacing: 0.3px;
  628. }
  629. .money {
  630. display: flex;
  631. align-items: center;
  632. justify-content: center;
  633. img {
  634. width: 46px;
  635. height: 46px;
  636. margin-right: 15px;
  637. border-radius: 50%;
  638. border: solid 3px #fff;
  639. }
  640. span {
  641. color: #fff;
  642. font-size: 60px;
  643. font-weight: 800;
  644. line-height: 76px;
  645. }
  646. }
  647. }
  648. .time {
  649. display: flex;
  650. height: 30px;
  651. align-items: center;
  652. justify-content: center;
  653. font-weight: bold;
  654. font-size: 17px;
  655. line-height: 22px;
  656. text-align: center;
  657. .t {
  658. color: #fff;
  659. margin-right: 8px;
  660. }
  661. .w {
  662. color: #fcc74e;
  663. margin-left: 8px;
  664. }
  665. }
  666. .box {
  667. margin: auto;
  668. width: 200px;
  669. height: 200px;
  670. margin-top: 27px;
  671. img {
  672. width: 100%;
  673. height: 100%;
  674. }
  675. }
  676. }
  677. .desc {
  678. width: 520px;
  679. .title {
  680. color: #2C2C2C;
  681. font-size: 36px;
  682. line-height: 40px;
  683. font-weight: 900;
  684. margin-top: 90px;
  685. margin-bottom: 20px;
  686. }
  687. .issue {
  688. font-size: 15px;
  689. color: #A4A4A4;
  690. }
  691. .button {
  692. cursor: pointer;
  693. height: 64px;
  694. margin-top: 30px;
  695. }
  696. }
  697. }
  698. }
  699. }
  700. .small {
  701. width: 100%;
  702. height: 100%;
  703. position: relative;
  704. background-color: #fff;
  705. &.bg {
  706. background: linear-gradient(17.98deg, #3438FF 3.69%, #8B56FC 74.32%);
  707. }
  708. .lottery {
  709. position: absolute;
  710. top: 0;
  711. right: 0;
  712. width: 110px;
  713. height: 94px;
  714. }
  715. .luck-list {
  716. height: calc(100% - 430px);
  717. }
  718. .head {
  719. display: flex;
  720. height: 50px;
  721. align-items: center;
  722. img {
  723. width: 20px;
  724. height: 20px;
  725. border-radius: 50%;
  726. margin: 0 10px 0 15px;
  727. border: solid 2px #fff;
  728. }
  729. span {
  730. color: #fff;
  731. font-size: 13px;
  732. font-weight: 700;
  733. line-height: 16px;
  734. letter-spacing: 0.005em;
  735. }
  736. }
  737. .price {
  738. text-align: center;
  739. .usdt {
  740. margin: 10px 0;
  741. color: #FFFFFF;
  742. font-weight: bold;
  743. font-size: 16px;
  744. line-height: 20px;
  745. text-align: center;
  746. letter-spacing: 0.3px;
  747. }
  748. .money {
  749. display: flex;
  750. align-items: center;
  751. justify-content: center;
  752. img {
  753. width: 46px;
  754. height: 46px;
  755. margin-right: 15px;
  756. border-radius: 50%;
  757. border: solid 3px #fff;
  758. }
  759. span {
  760. color: #fff;
  761. font-size: 60px;
  762. font-weight: 800;
  763. line-height: 76px;
  764. }
  765. }
  766. }
  767. .time {
  768. display: flex;
  769. height: 30px;
  770. align-items: center;
  771. justify-content: center;
  772. font-weight: bold;
  773. font-size: 17px;
  774. line-height: 22px;
  775. text-align: center;
  776. .t {
  777. color: #fff;
  778. margin-right: 8px;
  779. }
  780. .w {
  781. color: #fcc74e;
  782. margin-left: 8px;
  783. }
  784. }
  785. .box {
  786. margin: auto;
  787. width: 200px;
  788. height: 200px;
  789. margin-top: 27px;
  790. img {
  791. width: 100%;
  792. height: 100%;
  793. }
  794. }
  795. .area-cp-link {
  796. position: absolute;
  797. bottom: 0;
  798. background: #fff;
  799. overflow: hidden;
  800. width: 100%;
  801. flex-wrap: wrap;
  802. height: 238px;
  803. box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
  804. border-top-left-radius: 10px;
  805. border-top-right-radius: 10px;
  806. .area-list {
  807. clear: both;
  808. margin: 15px;
  809. .item {
  810. clear: both;
  811. overflow: hidden;
  812. margin: 7px 0;
  813. font-size: 16px;
  814. font-weight: 500;
  815. .icon {
  816. float: left;
  817. margin-right: 8px;
  818. margin-top: -2px;
  819. }
  820. .font {
  821. float: left;
  822. margin-right: 8px;
  823. }
  824. .pc {
  825. float: left;
  826. margin-top: -2px;
  827. }
  828. }
  829. }
  830. .area-content {
  831. margin: 0 15px;
  832. color: #4B4B4B;
  833. padding: 7px 10px;
  834. font-size: 13px;
  835. border-radius: 5px;
  836. background: #F4F4F4;
  837. word-break: break-all;
  838. }
  839. .area-btn {
  840. flex: 1;
  841. display: flex;
  842. justify-content: center;
  843. .btn {
  844. margin: 15px 15px 0 15px;
  845. display: inline-block;
  846. width: 100%;
  847. height: 47px;
  848. font-size: 18px;
  849. line-height: 34px;
  850. color: #FFFFFF;
  851. border-radius: 100px;
  852. background: #389AFF;
  853. }
  854. }
  855. }
  856. }
  857. .layer {
  858. position: fixed;
  859. width: 100%;
  860. height: 100%;
  861. top: 0;
  862. left: 0;
  863. background: rgba(0, 0, 0, .5);
  864. .layer-box {
  865. width: 300px;
  866. height: 170px;
  867. background: #FFFFFF;
  868. border-radius: 11px;
  869. opacity: 1;
  870. position: absolute;
  871. top: 250px;
  872. left: 50%;
  873. margin-left: -150px;
  874. .layer-txt {
  875. margin: 30px 0;
  876. width: 100%;
  877. padding: 0 27px;
  878. font-weight: 600;
  879. font-size: 18px;
  880. text-align: center;
  881. }
  882. .layer-btn {
  883. width: 190px;
  884. height: 40px;
  885. background: #389AFF;
  886. border-radius: 100px;
  887. margin: 0 auto;
  888. text-align: center;
  889. line-height: 40px;
  890. color: #fff;
  891. font-weight: 600;
  892. font-size: 18px;
  893. }
  894. }
  895. }
  896. .luck-list {
  897. flex: 1;
  898. width: 100%;
  899. height: 310px;
  900. overflow-y: auto;
  901. .luck-item {
  902. display: flex;
  903. padding: 12px 0;
  904. margin: 0 16px;
  905. border-bottom: 1px solid #F2F2F2;
  906. justify-content: space-between;
  907. position: relative;
  908. .header {
  909. border-radius: 50%;
  910. }
  911. .luck-king {
  912. position: absolute;
  913. top: 36px;
  914. right: 0px;
  915. display: flex;
  916. align-items: center;
  917. img {
  918. width: 22px;
  919. height: 19px;
  920. margin: 0;
  921. }
  922. span {
  923. font-weight: 500;
  924. font-size: 12px;
  925. line-height: 14px;
  926. letter-spacing: 0.3px;
  927. color: #f5b945;
  928. }
  929. }
  930. .userLogo {
  931. position: relative;
  932. width: 42px;
  933. height: 42px;
  934. margin-right: 12px;
  935. .medal {
  936. position: absolute;
  937. right: -5px;
  938. bottom: -5px;
  939. width: 18px;
  940. height: 18px;
  941. }
  942. img {
  943. width: 100%;
  944. height: 100%;
  945. }
  946. }
  947. .luck-content {
  948. flex: auto;
  949. .luck-title {
  950. font-weight: 500;
  951. font-size: 16px;
  952. letter-spacing: 0.3px;
  953. color: #444444;
  954. }
  955. .luck-time {
  956. font-weight: 400;
  957. font-size: 12px;
  958. line-height: 14px;
  959. color: #9b9b9b;
  960. }
  961. }
  962. .luck-money {
  963. display: flex;
  964. height: 17px;
  965. align-items: center;
  966. img {
  967. width: 14px;
  968. height: 14px;
  969. margin-right: 6px;
  970. }
  971. .luck-money-txt {
  972. font-weight: 500;
  973. font-size: 14px;
  974. /* identical to box height */
  975. text-align: right;
  976. letter-spacing: 0.3px;
  977. color: #444444;
  978. }
  979. }
  980. }
  981. .luck-item:last-child {
  982. border: 0;
  983. }
  984. }
  985. .succTop {
  986. display: flex;
  987. align-items: center;
  988. flex-direction: column;
  989. justify-content: center;
  990. height: 150px;
  991. margin-bottom: 13px;
  992. background: #7D52FD;
  993. border-radius: 0 586px 586px/0 0 104px 104px;
  994. .img {
  995. height: 62px;
  996. }
  997. .tips {
  998. color: #FFFFFF;
  999. font-size: 22px;
  1000. font-weight: 800;
  1001. line-height: 26px;
  1002. margin-top: 15px;
  1003. }
  1004. .win {
  1005. font-size: 21px;
  1006. font-weight: 800;
  1007. color: #fff;
  1008. }
  1009. .win-money {
  1010. display: flex;
  1011. margin-top: -10px;
  1012. align-items: center;
  1013. justify-content: center;
  1014. img {
  1015. width: 44px;
  1016. height: 44px;
  1017. margin-right: 15px;
  1018. border-radius: 50%;
  1019. border: solid 3px #fff;
  1020. }
  1021. span {
  1022. color: #fff;
  1023. font-size: 60px;
  1024. font-weight: 800;
  1025. line-height: 76px;
  1026. }
  1027. }
  1028. }
  1029. .succTitle {
  1030. display: flex;
  1031. padding: 5px 0;
  1032. justify-content: space-between;
  1033. box-shadow: inset 0px -1px 0px #F2F2F2;
  1034. span {
  1035. margin: 0 16px;
  1036. font-size: 12px;
  1037. color: #B0B0B0;
  1038. &:last-child {
  1039. text-align: right;
  1040. }
  1041. }
  1042. }
  1043. </style>