luckdraw.vue 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  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 || '00:00:00' }}</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. <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. <span class="t">🕒 {{ validity || '00:00:00' }}</span>
  128. <span class="w">🏆 {{ detail.postBizData.totalCount }} WINNERS</span>
  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, formatSecondsAsTime } 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 = formatSecondsAsTime(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: 30px;
  642. align-items: center;
  643. justify-content: center;
  644. font-weight: bold;
  645. font-size: 17px;
  646. line-height: 22px;
  647. text-align: center;
  648. .t {
  649. color: #fff;
  650. margin-right: 8px;
  651. }
  652. .w {
  653. color: #fcc74e;
  654. margin-left: 8px;
  655. }
  656. }
  657. .box {
  658. margin: auto;
  659. width: 200px;
  660. height: 200px;
  661. margin-top: 27px;
  662. img {
  663. width: 100%;
  664. height: 100%;
  665. }
  666. }
  667. }
  668. .desc {
  669. width: 520px;
  670. .title {
  671. color: #2C2C2C;
  672. font-size: 36px;
  673. line-height: 40px;
  674. font-weight: 900;
  675. margin-top: 90px;
  676. margin-bottom: 20px;
  677. }
  678. .issue {
  679. font-size: 15px;
  680. color: #A4A4A4;
  681. }
  682. .button {
  683. cursor: pointer;
  684. height: 64px;
  685. margin-top: 30px;
  686. }
  687. }
  688. }
  689. }
  690. }
  691. .small {
  692. width: 100%;
  693. height: 100%;
  694. position: relative;
  695. background-color: #fff;
  696. &.bg {
  697. background: linear-gradient(17.98deg, #3438FF 3.69%, #8B56FC 74.32%);
  698. }
  699. .lottery {
  700. position: absolute;
  701. top: 0;
  702. right: 0;
  703. width: 110px;
  704. height: 94px;
  705. }
  706. .luck-list {
  707. height: calc(100% - 430px);
  708. }
  709. .head {
  710. display: flex;
  711. height: 50px;
  712. align-items: center;
  713. img {
  714. width: 20px;
  715. height: 20px;
  716. border-radius: 50%;
  717. margin: 0 10px 0 15px;
  718. border: solid 2px #fff;
  719. }
  720. span {
  721. color: #fff;
  722. font-size: 13px;
  723. font-weight: 700;
  724. line-height: 16px;
  725. letter-spacing: 0.005em;
  726. }
  727. }
  728. .price {
  729. text-align: center;
  730. .usdt {
  731. margin: 10px 0;
  732. color: #FFFFFF;
  733. font-weight: bold;
  734. font-size: 16px;
  735. line-height: 20px;
  736. text-align: center;
  737. letter-spacing: 0.3px;
  738. }
  739. .money {
  740. display: flex;
  741. align-items: center;
  742. justify-content: center;
  743. img {
  744. width: 46px;
  745. height: 46px;
  746. margin-right: 15px;
  747. border-radius: 50%;
  748. border: solid 3px #fff;
  749. }
  750. span {
  751. color: #fff;
  752. font-size: 60px;
  753. font-weight: 800;
  754. line-height: 76px;
  755. }
  756. }
  757. }
  758. .time {
  759. display: flex;
  760. height: 30px;
  761. align-items: center;
  762. justify-content: center;
  763. font-weight: bold;
  764. font-size: 17px;
  765. line-height: 22px;
  766. text-align: center;
  767. .t {
  768. color: #fff;
  769. margin-right: 8px;
  770. }
  771. .w {
  772. color: #fcc74e;
  773. margin-left: 8px;
  774. }
  775. }
  776. .box {
  777. margin: auto;
  778. width: 200px;
  779. height: 200px;
  780. margin-top: 27px;
  781. img {
  782. width: 100%;
  783. height: 100%;
  784. }
  785. }
  786. .area-cp-link {
  787. position: absolute;
  788. bottom: 0;
  789. background: #fff;
  790. overflow: hidden;
  791. width: 100%;
  792. flex-wrap: wrap;
  793. height: 238px;
  794. box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
  795. border-top-left-radius: 10px;
  796. border-top-right-radius: 10px;
  797. .area-list {
  798. clear: both;
  799. margin: 15px;
  800. .item {
  801. clear: both;
  802. overflow: hidden;
  803. margin: 7px 0;
  804. font-size: 16px;
  805. font-weight: 500;
  806. .icon {
  807. float: left;
  808. margin-right: 8px;
  809. margin-top: -2px;
  810. }
  811. .font {
  812. float: left;
  813. margin-right: 8px;
  814. }
  815. .pc {
  816. float: left;
  817. margin-top: -2px;
  818. }
  819. }
  820. }
  821. .area-content {
  822. margin: 0 15px;
  823. color: #4B4B4B;
  824. padding: 7px 10px;
  825. font-size: 13px;
  826. border-radius: 5px;
  827. background: #F4F4F4;
  828. word-break: break-all;
  829. }
  830. .area-btn {
  831. flex: 1;
  832. display: flex;
  833. justify-content: center;
  834. .btn {
  835. margin: 15px 15px 0 15px;
  836. display: inline-block;
  837. width: 100%;
  838. height: 47px;
  839. font-size: 18px;
  840. line-height: 34px;
  841. color: #FFFFFF;
  842. border-radius: 100px;
  843. background: #389AFF;
  844. }
  845. }
  846. }
  847. }
  848. .layer {
  849. position: fixed;
  850. width: 100%;
  851. height: 100%;
  852. top: 0;
  853. left: 0;
  854. background: rgba(0, 0, 0, .5);
  855. .layer-box {
  856. width: 300px;
  857. height: 170px;
  858. background: #FFFFFF;
  859. border-radius: 11px;
  860. opacity: 1;
  861. position: absolute;
  862. top: 250px;
  863. left: 50%;
  864. margin-left: -150px;
  865. .layer-txt {
  866. margin: 30px 0;
  867. width: 100%;
  868. padding: 0 27px;
  869. font-weight: 600;
  870. font-size: 18px;
  871. text-align: center;
  872. }
  873. .layer-btn {
  874. width: 190px;
  875. height: 40px;
  876. background: #389AFF;
  877. border-radius: 100px;
  878. margin: 0 auto;
  879. text-align: center;
  880. line-height: 40px;
  881. color: #fff;
  882. font-weight: 600;
  883. font-size: 18px;
  884. }
  885. }
  886. }
  887. .luck-list {
  888. flex: 1;
  889. width: 100%;
  890. height: 310px;
  891. overflow-y: auto;
  892. .luck-item {
  893. display: flex;
  894. padding: 12px 0;
  895. margin: 0 16px;
  896. border-bottom: 1px solid #F2F2F2;
  897. justify-content: space-between;
  898. position: relative;
  899. .header {
  900. border-radius: 50%;
  901. }
  902. .luck-king {
  903. position: absolute;
  904. top: 36px;
  905. right: 0px;
  906. display: flex;
  907. align-items: center;
  908. img {
  909. width: 22px;
  910. height: 19px;
  911. margin: 0;
  912. }
  913. span {
  914. font-weight: 500;
  915. font-size: 12px;
  916. line-height: 14px;
  917. letter-spacing: 0.3px;
  918. color: #f5b945;
  919. }
  920. }
  921. .userLogo {
  922. position: relative;
  923. width: 42px;
  924. height: 42px;
  925. margin-right: 12px;
  926. .medal {
  927. position: absolute;
  928. right: -5px;
  929. bottom: -5px;
  930. width: 18px;
  931. height: 18px;
  932. }
  933. img {
  934. width: 100%;
  935. height: 100%;
  936. }
  937. }
  938. .luck-content {
  939. flex: auto;
  940. .luck-title {
  941. font-weight: 500;
  942. font-size: 16px;
  943. letter-spacing: 0.3px;
  944. color: #444444;
  945. }
  946. .luck-time {
  947. font-weight: 400;
  948. font-size: 12px;
  949. line-height: 14px;
  950. color: #9b9b9b;
  951. }
  952. }
  953. .luck-money {
  954. display: flex;
  955. height: 17px;
  956. align-items: center;
  957. img {
  958. width: 14px;
  959. height: 14px;
  960. margin-right: 6px;
  961. }
  962. .luck-money-txt {
  963. font-weight: 500;
  964. font-size: 14px;
  965. /* identical to box height */
  966. text-align: right;
  967. letter-spacing: 0.3px;
  968. color: #444444;
  969. }
  970. }
  971. }
  972. .luck-item:last-child {
  973. border: 0;
  974. }
  975. }
  976. .succTop {
  977. display: flex;
  978. align-items: center;
  979. flex-direction: column;
  980. justify-content: center;
  981. height: 150px;
  982. margin-bottom: 13px;
  983. background: #7D52FD;
  984. border-radius: 0 586px 586px/0 0 104px 104px;
  985. .img {
  986. height: 62px;
  987. }
  988. .expire {
  989. color: #FFFFFF;
  990. font-size: 22px;
  991. font-weight: 800;
  992. line-height: 36px;
  993. margin-top: 15px;
  994. text-align: center;
  995. }
  996. .tips {
  997. color: #FFFFFF;
  998. font-size: 22px;
  999. font-weight: 800;
  1000. line-height: 26px;
  1001. margin-top: 15px;
  1002. }
  1003. .win {
  1004. font-size: 21px;
  1005. font-weight: 800;
  1006. color: #fff;
  1007. }
  1008. .win-money {
  1009. display: flex;
  1010. margin-top: -10px;
  1011. align-items: center;
  1012. justify-content: center;
  1013. img {
  1014. width: 44px;
  1015. height: 44px;
  1016. margin-right: 15px;
  1017. border-radius: 50%;
  1018. border: solid 3px #fff;
  1019. }
  1020. span {
  1021. color: #fff;
  1022. font-size: 60px;
  1023. font-weight: 800;
  1024. line-height: 76px;
  1025. }
  1026. }
  1027. }
  1028. .succTitle {
  1029. display: flex;
  1030. padding: 5px 0;
  1031. justify-content: space-between;
  1032. box-shadow: inset 0px -1px 0px #F2F2F2;
  1033. span {
  1034. margin: 0 16px;
  1035. font-size: 12px;
  1036. color: #B0B0B0;
  1037. &:last-child {
  1038. text-align: right;
  1039. }
  1040. }
  1041. }
  1042. </style>