luckdraw.vue 39 KB

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