luckdraw.vue 35 KB

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