luckdraw.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840
  1. <!-- 红包玩法落地页 -->
  2. <template>
  3. <div class="content">
  4. <template v-if="isLoading">
  5. <img class="loading" src="../static/svg/icon-loading.svg" />
  6. </template>
  7. <template v-else>
  8. <template v-if="isMobile">
  9. <!-- 手机端 -->
  10. <div
  11. class="small"
  12. :class="{
  13. bg: status === 'not-open',
  14. custom:
  15. detail.postBizData.posterType === 2 &&
  16. detail.postBizData.customPosterInstalled,
  17. }"
  18. >
  19. <template v-if="status === 'not-open'">
  20. <template
  21. v-if="
  22. detail.postBizData.posterType === 2 &&
  23. detail.postBizData.customPosterInstalled
  24. "
  25. >
  26. <img
  27. class="customImg"
  28. :src="detail.postBizData.customPosterInstalled"
  29. />
  30. </template>
  31. <template v-else>
  32. <template v-if="isMoneyPrize">
  33. <img
  34. class="lottery"
  35. :src="
  36. require('../static/svg/icon-luck-mark.svg')
  37. "
  38. />
  39. <div class="head">
  40. <img
  41. :src="
  42. detail.postBizData.postUserInfo
  43. .avatarUrl
  44. "
  45. />
  46. <span>{{
  47. detail.postBizData.postUserInfo.nickName
  48. }}</span>
  49. </div>
  50. <div class="price">
  51. <div class="usdt">
  52. {{ detail.postBizData.currencySymbol }}
  53. GIVEAWAY
  54. </div>
  55. <div class="money">
  56. <img
  57. :src="
  58. detail.postBizData
  59. .currencyIconPath
  60. "
  61. />
  62. <font-amount
  63. :fontSize="60"
  64. :amount="
  65. detail.postBizData.amountValue
  66. "
  67. >
  68. </font-amount>
  69. </div>
  70. </div>
  71. <div class="time">
  72. <img
  73. class="img"
  74. :src="
  75. require('../static/svg/icon-time.svg')
  76. "
  77. />
  78. {{ validity || '00:00:00' }}
  79. </div>
  80. <div class="box">
  81. <img src="../static/subject/icon-box.png" />
  82. </div>
  83. </template>
  84. <template v-else>
  85. <custom-card-cover
  86. :totalCount="detail.postBizData.totalCount"
  87. :amountValue="
  88. detail.postBizData.amountValue
  89. "
  90. :tokenSymbol="
  91. detail.postBizData.tokenSymbol
  92. "
  93. :currencyIconUrl="
  94. detail.postBizData.iconPath
  95. "
  96. :playType="2"
  97. :validity="validity"
  98. :userInfo="{
  99. nickName:
  100. detail.postBizData.postUserInfo
  101. .nickName,
  102. avatarUrl:
  103. detail.postBizData.postUserInfo
  104. .avatarUrl,
  105. }"
  106. :rewardType="detail.postBizData.rewardType"
  107. :customizedReward="
  108. detail.postBizData.customizedReward
  109. "
  110. :showBottomInfo="false"
  111. >
  112. </custom-card-cover>
  113. </template>
  114. </template>
  115. </template>
  116. <template v-else>
  117. <div class="succTop">
  118. <template v-if="status === 'opened'">
  119. <img
  120. class="img"
  121. :src="
  122. require('../static/svg/icon-luck-rabbit.svg')
  123. "
  124. />
  125. <p class="tips">Good Luck Next Time!</p>
  126. </template>
  127. <template v-else-if="status === 'expire'">
  128. <!-- <img class="img" :src=" require('../static/svg/icon-luck-complete.svg') " />
  129. <p class="tips">This Draw is Complete</p> -->
  130. <p class="expire">
  131. This Giveaways<br />expired on
  132. {{
  133. formatTime(
  134. detail.postBizData.endTimestamp,
  135. 'MM-DD'
  136. )
  137. }}
  138. </p>
  139. </template>
  140. <template v-else>
  141. <p class="win">🎉 Awesome! You Will Get</p>
  142. <div class="win-money">
  143. <img
  144. :src="
  145. detail.postBizData.currencyIconPath
  146. "
  147. />
  148. <font-amount
  149. :fontSize="46"
  150. :amount="receiveAmount"
  151. ></font-amount>
  152. </div>
  153. </template>
  154. </div>
  155. <div class="succTitle">
  156. <span
  157. >{{ detail.postBizData.receiveCount || 0 }}/{{
  158. detail.postBizData.totalCount || 0
  159. }}
  160. Winners</span
  161. >
  162. <span v-if="isMoneyPrize"
  163. >{{ detail.postBizData.receiveAmountValue }} /
  164. {{ detail.postBizData.amountValue || '' }}
  165. {{
  166. detail.postBizData.currencySymbol || ''
  167. }}</span
  168. >
  169. </div>
  170. <div class="luck-list" @scroll="handleScroll($event)">
  171. <div
  172. class="luck-item"
  173. v-for="(item, i) in luck_list"
  174. v-bind:key="i"
  175. >
  176. <div class="userLogo">
  177. <img
  178. class="medal"
  179. v-if="i < 2"
  180. :src="
  181. require('../static/svg/icon-medal-' +
  182. i +
  183. '.svg')
  184. "
  185. />
  186. <img
  187. class="header"
  188. v-if="item.simpleUserInfoVO.avatarUrl"
  189. :src="item.simpleUserInfoVO.avatarUrl"
  190. alt
  191. />
  192. <img
  193. class="header"
  194. v-else
  195. src="/svg/icon-twitter.svg"
  196. alt
  197. />
  198. </div>
  199. <div class="luck-content">
  200. <div class="luck-title">
  201. {{
  202. item.simpleUserInfoVO.nickName ||
  203. 'Twitter User'
  204. }}
  205. </div>
  206. <div class="luck-time">
  207. {{
  208. formatTime(
  209. item.receiveTimestamp,
  210. 'MM-DD HH:mm'
  211. )
  212. }}
  213. </div>
  214. </div>
  215. <div class="luck-money" v-if="isMoneyPrize">
  216. <img :src="item.currencyIconPath" alt />
  217. <div class="luck-money-txt">
  218. {{ item.amountValue || 0 }}
  219. </div>
  220. </div>
  221. <div class="luck-custom-prize" v-else>
  222. winner
  223. </div>
  224. <div
  225. class="luck-king"
  226. v-if="isMoneyPrize && item.maxAmount"
  227. >
  228. <img src="/svg/icon-king-hat.svg" alt />
  229. <span>Luckiest Draw</span>
  230. </div>
  231. </div>
  232. </div>
  233. </template>
  234. <div class="area-cp-link">
  235. <div class="area-list">
  236. <div class="item">
  237. <div class="icon">
  238. <img
  239. :src="
  240. require('../static/subject/01.svg')
  241. "
  242. />
  243. </div>
  244. <div class="font">
  245. Complete the tasks on tweet
  246. </div>
  247. </div>
  248. <div class="item">
  249. <div class="icon">
  250. <img
  251. :src="
  252. require('../static/subject/02.svg')
  253. "
  254. />
  255. </div>
  256. <div class="font">Open link on PC to draw</div>
  257. <div class="pc">
  258. <img
  259. :src="
  260. require('../static/subject/pc.svg')
  261. "
  262. />
  263. </div>
  264. </div>
  265. </div>
  266. <div class="area-content">
  267. {{ linkHref }}
  268. </div>
  269. <div class="area-btn">
  270. <div
  271. class="btn"
  272. :data-clipboard-text="linkHref"
  273. @click="copyLinkHandle"
  274. >
  275. Copy Link
  276. </div>
  277. </div>
  278. </div>
  279. <div class="layer" v-show="layer_show">
  280. <div class="layer-box">
  281. <div class="layer-txt">
  282. Unable to copy, please enter the link manually
  283. </div>
  284. <div class="layer-btn" @click="layer_show = false">
  285. Done
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. </template>
  291. <!-- PC端 -->
  292. <template v-else>
  293. <div class="logo">
  294. <img src="/img/icon-logo.png" />
  295. </div>
  296. <div class="show">
  297. <div class="center">
  298. <div class="head-in-custom" v-if="!isMoneyPrize">
  299. <img
  300. :src="detail.postBizData.postUserInfo.avatarUrl"
  301. />
  302. <span>{{
  303. detail.postBizData.postUserInfo.nickName
  304. }}</span>
  305. </div>
  306. <div
  307. class="giveaway"
  308. :class="{
  309. bg: status === 'not-open',
  310. custom:
  311. detail.postBizData.posterType === 2 &&
  312. detail.postBizData.customPosterInstalled,
  313. 'auto-height': !isMoneyPrize,
  314. }"
  315. >
  316. <div v-if="status === 'not-open'">
  317. <template
  318. v-if="
  319. detail.postBizData.posterType === 2 &&
  320. detail.postBizData.customPosterInstalled
  321. "
  322. >
  323. <!-- <img class="customImg" :src="detail.postBizData.customPosterInstalled" />
  324. <div class="customBottom">
  325. <div class="theme">
  326. <img class="icon" :src="require('../static/svg/icon-last-time.svg')"/>
  327. <span class="time2">{{ validity || '00:00:00' }}</span>
  328. <span class="info">Left</span>
  329. </div>
  330. <div class="winner-info">
  331. <span class="count">{{detail.postBizData.totalCount}} Winners</span>
  332. <span>to Share </span>
  333. <span class="prize-name">{{detail.postBizData.amountValue + ' ' + detail.postBizData.currencySymbol}}</span>
  334. </div>
  335. </div> -->
  336. <custom-card-cover
  337. :totalCount="
  338. detail.postBizData.totalCount
  339. "
  340. :amountValue="
  341. detail.postBizData.amountValue
  342. "
  343. :tokenSymbol="
  344. detail.postBizData.tokenSymbol
  345. "
  346. :currencyIconUrl="
  347. detail.postBizData.iconPath
  348. "
  349. :playType="2"
  350. :posterType="2"
  351. :customPosterInstalled="
  352. detail.postBizData
  353. .customPosterInstalled
  354. "
  355. :validity="validity"
  356. :userInfo="{
  357. nickName:
  358. detail.postBizData.postUserInfo
  359. .nickName,
  360. avatarUrl:
  361. detail.postBizData.postUserInfo
  362. .avatarUrl,
  363. }"
  364. :rewardType="
  365. detail.postBizData.rewardType
  366. "
  367. :customizedReward="
  368. detail.postBizData.customizedReward
  369. "
  370. :showBottomInfo="true"
  371. >
  372. </custom-card-cover>
  373. </template>
  374. <template v-else>
  375. <!-- 旧版 样式,后续更新时在 custom-card-cover 公共组件内维护-->
  376. <template v-if="isMoneyPrize">
  377. <img
  378. class="lottery"
  379. :src="
  380. require('../static/svg/icon-luck-mark.svg')
  381. "
  382. />
  383. <div class="head">
  384. <img
  385. :src="
  386. detail.postBizData
  387. .postUserInfo.avatarUrl
  388. "
  389. />
  390. <span>{{
  391. detail.postBizData.postUserInfo
  392. .nickName
  393. }}</span>
  394. </div>
  395. <div class="price">
  396. <div class="usdt">
  397. {{
  398. detail.postBizData
  399. .currencySymbol
  400. }}
  401. GIVEAWAY
  402. </div>
  403. <div class="money">
  404. <img
  405. :src="
  406. detail.postBizData
  407. .currencyIconPath
  408. "
  409. />
  410. <font-amount
  411. :fontSize="60"
  412. :amount="
  413. detail.postBizData
  414. .amountValue
  415. "
  416. >
  417. </font-amount>
  418. </div>
  419. </div>
  420. <div class="time">
  421. <img
  422. class="img"
  423. :src="
  424. require('../static/svg/icon-time.svg')
  425. "
  426. />
  427. {{ validity || '00:00:00' }}
  428. </div>
  429. <div class="box">
  430. <img
  431. src="../static/subject/icon-box.png"
  432. />
  433. </div>
  434. </template>
  435. <template v-else>
  436. <custom-card-cover
  437. :totalCount="
  438. detail.postBizData.totalCount
  439. "
  440. :amountValue="
  441. detail.postBizData.amountValue
  442. "
  443. :tokenSymbol="
  444. detail.postBizData.tokenSymbol
  445. "
  446. :currencyIconUrl="
  447. detail.postBizData.iconPath
  448. "
  449. :playType="2"
  450. :validity="validity"
  451. :userInfo="{
  452. nickName:
  453. detail.postBizData
  454. .postUserInfo.nickName,
  455. avatarUrl:
  456. detail.postBizData
  457. .postUserInfo.avatarUrl,
  458. }"
  459. :rewardType="
  460. detail.postBizData.rewardType
  461. "
  462. :customizedReward="
  463. detail.postBizData
  464. .customizedReward
  465. "
  466. :showBottomInfo="true"
  467. ></custom-card-cover>
  468. </template>
  469. </template>
  470. </div>
  471. <template v-else>
  472. <div class="succTop">
  473. <template v-if="status === 'opened'">
  474. <img
  475. class="img"
  476. :src="
  477. require('../static/svg/icon-luck-rabbit.svg')
  478. "
  479. />
  480. <p class="tips">Good Luck Next Time!</p>
  481. </template>
  482. <template v-else-if="status === 'expire'">
  483. <!-- <img class="img" :src=" require('../static/svg/icon-luck-complete.svg') " />
  484. <p class="tips">This Draw is Complete</p> -->
  485. <p class="expire">
  486. This Giveaways<br />expired on
  487. {{
  488. formatTime(
  489. detail.postBizData
  490. .endTimestamp,
  491. 'MM-DD'
  492. )
  493. }}
  494. </p>
  495. </template>
  496. <template v-else>
  497. <p class="win">
  498. 🎉 Awesome! You are Winner!
  499. </p>
  500. <div class="win-money">
  501. <img
  502. :src="
  503. detail.postBizData
  504. .currencyIconPath
  505. "
  506. />
  507. <font-amount
  508. :fontSize="46"
  509. :amount="receiveAmount"
  510. ></font-amount>
  511. </div>
  512. </template>
  513. </div>
  514. <div class="succTitle">
  515. <span
  516. >{{
  517. detail.postBizData.receiveCount ||
  518. 0
  519. }}/{{
  520. detail.postBizData.totalCount || 0
  521. }}
  522. Winners</span
  523. >
  524. <span v-if="isMoneyPrize"
  525. >{{
  526. detail.postBizData
  527. .receiveAmountValue
  528. }}
  529. /
  530. {{
  531. detail.postBizData.amountValue || ''
  532. }}
  533. {{
  534. detail.postBizData.currencySymbol ||
  535. ''
  536. }}</span
  537. >
  538. </div>
  539. <div
  540. class="luck-list"
  541. @scroll="handleScroll($event)"
  542. >
  543. <div
  544. class="luck-item"
  545. v-for="(item, i) in luck_list"
  546. v-bind:key="i"
  547. >
  548. <div class="userLogo">
  549. <img
  550. class="medal"
  551. v-if="i < 2"
  552. :src="
  553. require('../static/svg/icon-medal-' +
  554. i +
  555. '.svg')
  556. "
  557. />
  558. <img
  559. class="header"
  560. v-if="
  561. item.simpleUserInfoVO
  562. .avatarUrl
  563. "
  564. :src="
  565. item.simpleUserInfoVO
  566. .avatarUrl
  567. "
  568. alt
  569. />
  570. <img
  571. class="header"
  572. v-else
  573. src="/svg/icon-twitter.svg"
  574. alt
  575. />
  576. </div>
  577. <div class="luck-content">
  578. <div class="luck-title">
  579. {{
  580. item.simpleUserInfoVO
  581. .nickName ||
  582. 'Twitter User'
  583. }}
  584. </div>
  585. <div class="luck-time">
  586. {{
  587. formatTime(
  588. item.receiveTimestamp,
  589. 'MM-DD HH:mm'
  590. )
  591. }}
  592. </div>
  593. </div>
  594. <div
  595. class="luck-money"
  596. v-if="isMoneyPrize"
  597. >
  598. <img
  599. :src="item.currencyIconPath"
  600. alt
  601. />
  602. <div class="luck-money-txt">
  603. {{ item.amountValue || 0 }}
  604. </div>
  605. </div>
  606. <div class="luck-custom-prize" v-else>
  607. winner
  608. </div>
  609. <div
  610. class="luck-king"
  611. v-if="
  612. isMoneyPrize && item.maxAmount
  613. "
  614. >
  615. <img
  616. src="/svg/icon-king-hat.svg"
  617. alt
  618. />
  619. <span>Luckiest Draw</span>
  620. </div>
  621. </div>
  622. </div>
  623. </template>
  624. </div>
  625. <div class="desc">
  626. <template v-if="isChrome">
  627. <template v-if="status === 'not-open'">
  628. <div class="title">
  629. Install DeNet Plugin<br />to Draw Prizes
  630. </div>
  631. <div class="issue">
  632. DeNet will detect task situation to
  633. issue Giveaway
  634. </div>
  635. </template>
  636. <template v-else>
  637. <div class="title">
  638. Install the Denet plugin<br />to not
  639. miss the next draw
  640. </div>
  641. </template>
  642. <img
  643. class="button"
  644. @click="installExtension"
  645. src="../static/svg/icon-install-nft-plugin.svg"
  646. />
  647. </template>
  648. <template v-else>
  649. <div class="title">
  650. Get Giveaway<br />with chrome
  651. </div>
  652. <div class="issue">
  653. Only supports getting Giveaways through
  654. chrome
  655. </div>
  656. <img
  657. class="button"
  658. @click="clickOpenChrome"
  659. src="../static/svg/icon-install-nft-chrome.svg"
  660. />
  661. </template>
  662. </div>
  663. </div>
  664. </div>
  665. </template>
  666. </template>
  667. </div>
  668. </template>
  669. <script>
  670. import axios from 'axios';
  671. import Cookies from 'js-cookie';
  672. import { Toast } from 'vant';
  673. import {
  674. isBrowser,
  675. appType,
  676. appVersionCode,
  677. formatSecondsAsDaysOrTime,
  678. } from '../utils/help.js';
  679. import FontAmount from '../components/FontAmount.vue';
  680. import CustomCardCover from '../components/CustomCardCover.vue';
  681. import Report from '../log-center/log';
  682. import { RewardType } from '../types';
  683. var moment = require('moment');
  684. var ClipboardJS = require('clipboard');
  685. const api = {
  686. prod: 'https://api.denetme.net',
  687. pre: 'https://preapi.denetme.net',
  688. test: 'https://testapi.denetme.net',
  689. };
  690. const page = {
  691. prod: 'https://h5.denetme.net',
  692. pre: 'https://preh5.denetme.net',
  693. test: 'https://testh5.denetme.net',
  694. };
  695. const jumpUrl = page[process.env.NUXT_ENV.MODE] + '/';
  696. const baseURL = api[process.env.NUXT_ENV.MODE];
  697. export default {
  698. name: 'luckdraw',
  699. components: {
  700. FontAmount,
  701. CustomCardCover,
  702. },
  703. head() {
  704. return {
  705. type: '',
  706. title: this.title,
  707. appVersionCode: appVersionCode,
  708. meta: [
  709. // facebook
  710. {
  711. name: 'og:url',
  712. content: this.jumpUrl + 'luckdraw/' + this.detail.postId,
  713. },
  714. {
  715. name: 'og:title',
  716. content: this.metaTitle,
  717. },
  718. {
  719. name: 'og:image',
  720. content:
  721. this.detail.postBizData.imagePath ||
  722. this.detail.postBizData.customPosterUninstalled ||
  723. '',
  724. },
  725. // twitter
  726. {
  727. name: 'twitter:card',
  728. content: 'summary_large_image',
  729. },
  730. {
  731. name: 'twitter:url',
  732. content: this.jumpUrl + 'luckdraw/' + this.detail.postId,
  733. },
  734. {
  735. name: 'twitter:title',
  736. content: this.metaTitle,
  737. },
  738. {
  739. name: 'twitter:image',
  740. content:
  741. this.detail.postBizData.imagePath ||
  742. this.detail.postBizData.customPosterUninstalled ||
  743. '',
  744. },
  745. ],
  746. };
  747. },
  748. data() {
  749. return {
  750. detail: {
  751. postId: '',
  752. postBizData: {
  753. imagePath: '',
  754. postUserInfo: {},
  755. amountValue: '0',
  756. },
  757. },
  758. luck_list: [],
  759. luck_list_end: false,
  760. layer_show: false,
  761. isLoading: true,
  762. isMobile: false,
  763. isChrome: false,
  764. config: {},
  765. mid: '',
  766. status: '', // not-open->未打开 opened->没有抽中 success->抽中了 expire->过期
  767. page_index: 1,
  768. page_size: 20,
  769. validity: '',
  770. receiveAmount: '0',
  771. title: 'DeNet Giveaway',
  772. jumpUrl: jumpUrl,
  773. metaTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
  774. reportStatus: 'normal',
  775. customCover: '',
  776. customGiveaway: '',
  777. };
  778. },
  779. computed: {
  780. // 货币类型的奖品
  781. isMoneyPrize() {
  782. return this.detail.postBizData.rewardType === RewardType.money;
  783. },
  784. },
  785. mounted() {
  786. this.getConfig();
  787. this.setCookieMid();
  788. this.checkBrowser();
  789. this.handleStatusPage();
  790. this.isLoading = false;
  791. // 复制链接
  792. var clipboard = new ClipboardJS('.btn');
  793. clipboard.on('success', function (e) {
  794. Toast('copy success');
  795. e.clearSelection();
  796. });
  797. clipboard.on('error', function () {
  798. this.layer_show = true;
  799. });
  800. },
  801. async asyncData(params) {
  802. let { route } = params;
  803. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  804. baseInfo: {
  805. appVersionCode: appVersionCode,
  806. mid: (function () {
  807. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
  808. /[xy]/g,
  809. function (c) {
  810. var r = (Math.random() * 16) | 0,
  811. v = c == 'x' ? r : (r & 0x3) | 0x8;
  812. return v.toString(16);
  813. }
  814. );
  815. })(),
  816. },
  817. params: {
  818. postId: route.params.id || '',
  819. },
  820. });
  821. if (data.code == 0) {
  822. if (
  823. data.data &&
  824. data.data.postBizData &&
  825. typeof data.data.postBizData == 'string'
  826. ) {
  827. data.data.postBizData = JSON.parse(data.data.postBizData);
  828. }
  829. if (data.data.postBizData === null) {
  830. data.data.postBizData = {
  831. postUserInfo: {},
  832. };
  833. }
  834. return {
  835. detail: data.data,
  836. customCover:
  837. data.data.postBizData &&
  838. data.data.postBizData.posterType == 2
  839. ? 1
  840. : 0,
  841. customGiveaway:
  842. data.data.postBizData &&
  843. data.data.postBizData.rewardType == 2
  844. ? 1
  845. : 0,
  846. };
  847. }
  848. },
  849. methods: {
  850. checkBrowser() {
  851. this.linkHref = window.location.href;
  852. this.isChrome = isBrowser() == 'chrome';
  853. this.isMobile = navigator.userAgent.match(
  854. /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
  855. );
  856. if (!this.isChrome) {
  857. this.status = 'no-chrome';
  858. } else {
  859. this.setPickupInfo();
  860. }
  861. // report
  862. setTimeout(() => {
  863. this.reportData();
  864. }, 500);
  865. },
  866. async getConfig() {
  867. let { data } = await axios.post(
  868. `${baseURL}/denet/base/config/getFrontConfig`,
  869. {
  870. baseInfo: {
  871. appVersionCode: appVersionCode,
  872. mid: this.mid,
  873. },
  874. params: {},
  875. }
  876. );
  877. if (data.code == 0) {
  878. this.config = data.data;
  879. }
  880. },
  881. setCookieMid() {
  882. let _cookie_mid_arr = Cookies.get('mid') || [];
  883. if (_cookie_mid_arr.length > 0) {
  884. this.mid = JSON.parse(_cookie_mid_arr)[0].mid;
  885. } else {
  886. this.mid = this.guid();
  887. Cookies.set('mid', JSON.stringify([{ mid: this.mid }]), {
  888. expires: 1000,
  889. });
  890. }
  891. },
  892. guid() {
  893. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
  894. /[xy]/g,
  895. function (c) {
  896. var r = (Math.random() * 16) | 0,
  897. v = c == 'x' ? r : (r & 0x3) | 0x8;
  898. return v.toString(16);
  899. }
  900. );
  901. },
  902. clickOpenChrome() {
  903. window.open('https://www.google.com/chrome');
  904. let extParams = this.isMobile ? {} : { status: this.reportStatus };
  905. Report.reportLog({
  906. baseInfo: {
  907. appVersionCode: appVersionCode,
  908. mid: this.mid,
  909. pageSource: Report.pageSource.newUserLandingPage,
  910. appType,
  911. machineCode: this.mid,
  912. },
  913. params: {
  914. eventData: {
  915. businessType: Report.businessType.buttonClick,
  916. objectType: Report.objectType.installButton,
  917. postId: this.detail.postId,
  918. srcContentId: this.detail.srcContentId,
  919. senderId: this.detail.srcUserId,
  920. redPacketType: 1,
  921. customCover: this.customCover,
  922. customGiveaway: this.customGiveaway,
  923. },
  924. extParams: extParams,
  925. },
  926. });
  927. },
  928. installExtension() {
  929. let { extensionsInstallChannel, extensionsInstallUrl } =
  930. this.config;
  931. let extParams = this.isMobile ? {} : { status: this.reportStatus };
  932. Report.reportLog({
  933. baseInfo: {
  934. appVersionCode: appVersionCode,
  935. mid: this.mid,
  936. pageSource: Report.pageSource.newUserLandingPage,
  937. appType,
  938. machineCode: this.mid,
  939. },
  940. params: {
  941. eventData: {
  942. businessType: Report.businessType.buttonClick,
  943. objectType: Report.objectType.installButton,
  944. postId: this.detail.postId,
  945. srcContentId: this.detail.srcContentId,
  946. senderId: this.detail.srcUserId,
  947. redPacketType: 1,
  948. customCover: this.customCover,
  949. customGiveaway: this.customGiveaway,
  950. },
  951. extParams: extParams,
  952. },
  953. });
  954. switch (extensionsInstallChannel) {
  955. case 'officeDownload':
  956. // eslint-disable-next-line no-undef
  957. location.href = url;
  958. this.$router.push({
  959. path: '/install',
  960. });
  961. break;
  962. case 'chromeAppStore':
  963. window.open(extensionsInstallUrl);
  964. break;
  965. }
  966. },
  967. setPickupInfo() {
  968. let pickupInfo = {
  969. srcContentId: this.detail.srcContentId || '',
  970. postNickName:
  971. this.detail.postBizData.postUserInfo.nickName || '',
  972. createTime: Date.now(),
  973. jump_type: 'luck_draw',
  974. };
  975. Cookies.set('jump_info', JSON.stringify(pickupInfo), {
  976. expires: 100,
  977. });
  978. },
  979. formatTime(time, _type = 'MM-DD HH:mm:ss') {
  980. return moment(time).format(_type);
  981. },
  982. getValidity(end_time) {
  983. let timer = setInterval(() => {
  984. let time = moment(new Date().getTime());
  985. let endTime = moment(end_time + 5000);
  986. let downTime = endTime - time || 0;
  987. if (downTime > 0) {
  988. this.validity = formatSecondsAsDaysOrTime(downTime / 1000);
  989. } else {
  990. this.validity = `00:00:00`;
  991. this.getDetail(() => {
  992. this.handleStatusPage();
  993. });
  994. clearInterval(timer);
  995. }
  996. }, 1000);
  997. },
  998. handleScroll(e) {
  999. e = e.target;
  1000. if (this.luck_list_end) {
  1001. return;
  1002. }
  1003. if ((e.clientHeight + e.scrollTop) / e.scrollHeight > 0.8) {
  1004. this.luck_list_end = false;
  1005. this.page_index++;
  1006. this.getReceivedList();
  1007. }
  1008. },
  1009. handleStatusPage() {
  1010. // 如果 我领取过了
  1011. // taskFinishStatus 任务完成状态(0:未完成,1:已完成,2:已过期)
  1012. if (this.detail.postBizData.myReceived) {
  1013. this.receiveAmount =
  1014. this.detail.postBizData.myReceived.amountValue || 0;
  1015. // 如果 任务完成状态 = 未完成
  1016. if (this.detail.postBizData.myReceived.taskFinishStatus == 0) {
  1017. // 显示任务未完成页面
  1018. this.status = `opened`;
  1019. } else if (
  1020. this.detail.postBizData.myReceived.taskFinishStatus == 1
  1021. ) {
  1022. //如果 任务完成状态 = 已经完成
  1023. if (this.receiveAmount == 0) {
  1024. // 领取到空红包
  1025. this.status = `opened`;
  1026. this.reportStatus = `empty`;
  1027. } else {
  1028. // 显示成功页面
  1029. this.status = `success`;
  1030. }
  1031. } else {
  1032. // 如果 任务完成状态 = 已经过期
  1033. if (this.detail.postBizData.status == 1) {
  1034. // 显示未打开页面
  1035. this.status = 'not-open';
  1036. } else {
  1037. // 显示已经过期页面
  1038. this.status = 'expire';
  1039. this.reportStatus = `empty`;
  1040. }
  1041. }
  1042. } else {
  1043. // 如果 我没有领取过
  1044. // 如果 红包状态 = 进行中
  1045. if (this.detail.postBizData.status == 1) {
  1046. // 如果 过了红包的领取截止时间 = true
  1047. if (this.detail.postBizData.receiveTimeExpired) {
  1048. // 显示过期页面
  1049. this.status = 'expire';
  1050. this.reportStatus = `empty`;
  1051. } else {
  1052. // 如果 过了红包的领取截止时间 = false
  1053. // 显示未打开页面
  1054. this.status = 'not-open';
  1055. }
  1056. } else {
  1057. // 红包状态 = 已经结束了 | 已经终止 | 终止退款中
  1058. // 显示过期页面
  1059. this.status = 'expire';
  1060. this.reportStatus = `empty`;
  1061. }
  1062. }
  1063. // this.status = 'not-open'
  1064. // getList
  1065. if (this.status !== 'not-open') {
  1066. this.getReceivedList();
  1067. } else {
  1068. this.getValidity(this.detail.postBizData.endTimestamp);
  1069. }
  1070. },
  1071. async getDetail(fn) {
  1072. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  1073. baseInfo: {
  1074. appVersionCode: appVersionCode,
  1075. mid: this.mid,
  1076. },
  1077. params: {
  1078. postId: this.detail.postId,
  1079. },
  1080. });
  1081. if (data.code == 0) {
  1082. this.detail.postBizData = JSON.parse(data.data.postBizData);
  1083. this.customCover =
  1084. this.detail.postBizData &&
  1085. this.detail.postBizData.posterType == 2
  1086. ? 1
  1087. : 0;
  1088. this.customGiveaway =
  1089. this.detail.postBizData &&
  1090. this.detail.postBizData.rewardType == 2
  1091. ? 1
  1092. : 0;
  1093. if (fn) fn();
  1094. }
  1095. },
  1096. async getReceivedList() {
  1097. let { data } = await axios.post(
  1098. `${baseURL}/denet/post/luckdrop/getReceivedList`,
  1099. {
  1100. baseInfo: {
  1101. appVersionCode: appVersionCode,
  1102. mid: this.mid,
  1103. },
  1104. params: {
  1105. pageNum: this.page_index,
  1106. pageSize: this.page_size,
  1107. postId: this.detail.postId || '',
  1108. },
  1109. }
  1110. );
  1111. if (data.code == 0) {
  1112. if (data.data.length > 0) {
  1113. this.luck_list = this.luck_list.concat(data.data);
  1114. this.luck_list_end = false;
  1115. } else {
  1116. this.luck_list_end = true;
  1117. }
  1118. }
  1119. },
  1120. copyLinkHandle() {
  1121. Report.reportLog({
  1122. baseInfo: {
  1123. appVersionCode: appVersionCode,
  1124. mid: this.mid,
  1125. pageSource: Report.pageSource.mobileLandingPage,
  1126. appType,
  1127. machineCode: this.mid,
  1128. },
  1129. params: {
  1130. eventData: {
  1131. businessType: Report.businessType.buttonClick,
  1132. objectType: Report.objectType.copyLinkButton,
  1133. postId: this.detail.postId || '',
  1134. srcContentId: this.detail.srcContentId || '',
  1135. senderId: this.detail.srcUserId || '',
  1136. redPacketType: 1,
  1137. customCover: this.customCover,
  1138. customGiveaway: this.customGiveaway,
  1139. },
  1140. },
  1141. });
  1142. },
  1143. reportData() {
  1144. if (this.isMobile) {
  1145. // 手机端
  1146. Report.reportLog({
  1147. baseInfo: {
  1148. appVersionCode: appVersionCode,
  1149. mid: this.mid,
  1150. pageSource: Report.pageSource.mobileLandingPage,
  1151. appType,
  1152. machineCode: this.mid,
  1153. },
  1154. params: {
  1155. eventData: {
  1156. businessType: Report.businessType.pageView,
  1157. postId: this.detail.postId,
  1158. srcContentId: this.detail.srcContentId,
  1159. senderId: this.detail.srcUserId,
  1160. redPacketType: 1,
  1161. customCover: this.customCover,
  1162. customGiveaway: this.customGiveaway,
  1163. },
  1164. },
  1165. });
  1166. } else if (this.isChrome) {
  1167. // pc端
  1168. Report.reportLog({
  1169. baseInfo: {
  1170. appVersionCode: appVersionCode,
  1171. mid: this.mid,
  1172. pageSource: Report.pageSource.newUserLandingPage,
  1173. appType,
  1174. machineCode: this.mid,
  1175. },
  1176. params: {
  1177. eventData: {
  1178. businessType: Report.businessType.pageView,
  1179. postId: this.detail.postId,
  1180. srcContentId: this.detail.srcContentId,
  1181. senderId: this.detail.srcUserId,
  1182. redPacketType: 1,
  1183. customCover: this.customCover,
  1184. customGiveaway: this.customGiveaway,
  1185. },
  1186. extParams: {
  1187. status: this.reportStatus,
  1188. },
  1189. },
  1190. });
  1191. } else {
  1192. Report.reportLog({
  1193. baseInfo: {
  1194. appVersionCode: appVersionCode,
  1195. mid: this.mid,
  1196. pageSource: Report.pageSource.newUserLandingPage,
  1197. appType,
  1198. machineCode: this.mid,
  1199. },
  1200. params: {
  1201. eventData: {
  1202. businessType: Report.businessType.pageView,
  1203. postId: this.detail.postId,
  1204. srcContentId: this.detail.srcContentId,
  1205. senderId: this.detail.srcUserId,
  1206. redPacketType: 1,
  1207. customCover: this.customCover,
  1208. customGiveaway: this.customGiveaway,
  1209. },
  1210. extParams: {
  1211. status: 'not-chrome',
  1212. },
  1213. },
  1214. });
  1215. }
  1216. },
  1217. },
  1218. };
  1219. </script>
  1220. <style lang="scss">
  1221. html,
  1222. body,
  1223. #__nuxt,
  1224. #__layout {
  1225. width: 100%;
  1226. height: 100%;
  1227. padding: 0;
  1228. margin: 0;
  1229. }
  1230. .content {
  1231. overflow: hidden;
  1232. width: 100%;
  1233. height: 100%;
  1234. background: #fff;
  1235. .loading {
  1236. position: absolute;
  1237. transform: translate(-50%, -50%);
  1238. top: 50%;
  1239. left: 50%;
  1240. margin: auto;
  1241. width: 40px;
  1242. border-radius: 50%;
  1243. }
  1244. .logo {
  1245. display: flex;
  1246. align-items: center;
  1247. height: 70px;
  1248. margin-left: 25px;
  1249. img {
  1250. width: 99px;
  1251. height: 32px;
  1252. }
  1253. }
  1254. .show {
  1255. display: flex;
  1256. align-items: center;
  1257. height: calc(100% - 70px);
  1258. .center {
  1259. display: flex;
  1260. margin: -50px auto 0;
  1261. justify-content: space-between;
  1262. width: 1000px;
  1263. position: relative;
  1264. .head-in-custom {
  1265. position: absolute;
  1266. bottom: 100%;
  1267. left: 0;
  1268. background: #fff;
  1269. display: flex;
  1270. align-items: center;
  1271. font-weight: 500;
  1272. font-size: 15px;
  1273. color: #000;
  1274. height: 54px;
  1275. img {
  1276. width: 30px;
  1277. height: 30px;
  1278. border-radius: 50%;
  1279. margin-right: 10px;
  1280. }
  1281. }
  1282. .giveaway {
  1283. position: relative;
  1284. overflow: hidden;
  1285. width: 375px;
  1286. height: 500px;
  1287. border-radius: 20px;
  1288. background-color: #fff;
  1289. box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.1);
  1290. &.bg {
  1291. background: linear-gradient(
  1292. 17.98deg,
  1293. #3438ff 3.69%,
  1294. #8b56fc 74.32%
  1295. );
  1296. }
  1297. &.custom {
  1298. background: unset;
  1299. height: auto !important;
  1300. }
  1301. &.auto-height {
  1302. height: auto;
  1303. }
  1304. .lottery {
  1305. position: absolute;
  1306. top: 0;
  1307. right: 0;
  1308. width: 110px;
  1309. height: 94px;
  1310. }
  1311. .head {
  1312. display: flex;
  1313. height: 50px;
  1314. align-items: center;
  1315. img {
  1316. width: 20px;
  1317. height: 20px;
  1318. border-radius: 50%;
  1319. margin: 0 10px 0 15px;
  1320. border: solid 2px #fff;
  1321. }
  1322. span {
  1323. color: #fff;
  1324. font-size: 13px;
  1325. font-weight: 700;
  1326. line-height: 16px;
  1327. letter-spacing: 0.005em;
  1328. }
  1329. }
  1330. .price {
  1331. text-align: center;
  1332. .usdt {
  1333. margin: 10px 0;
  1334. color: #ffffff;
  1335. font-weight: bold;
  1336. font-size: 16px;
  1337. line-height: 20px;
  1338. text-align: center;
  1339. letter-spacing: 0.3px;
  1340. }
  1341. .money {
  1342. display: flex;
  1343. align-items: center;
  1344. justify-content: center;
  1345. img {
  1346. width: 46px;
  1347. height: 46px;
  1348. margin-right: 15px;
  1349. border-radius: 50%;
  1350. border: solid 3px #fff;
  1351. }
  1352. span {
  1353. color: #fff;
  1354. font-size: 60px;
  1355. font-weight: 800;
  1356. line-height: 76px;
  1357. }
  1358. }
  1359. }
  1360. .time {
  1361. display: flex;
  1362. height: 46px;
  1363. color: #ffcc4d;
  1364. align-items: center;
  1365. justify-content: center;
  1366. font-weight: bold;
  1367. font-size: 26px;
  1368. line-height: 33px;
  1369. text-align: center;
  1370. background: rgba($color: #000000, $alpha: 0.15);
  1371. .img {
  1372. width: 26px;
  1373. margin-right: 10px;
  1374. }
  1375. }
  1376. .box {
  1377. margin: auto;
  1378. width: 200px;
  1379. height: 200px;
  1380. margin-top: 27px;
  1381. img {
  1382. width: 100%;
  1383. height: 100%;
  1384. }
  1385. }
  1386. }
  1387. .desc {
  1388. width: 520px;
  1389. .title {
  1390. color: #2c2c2c;
  1391. font-size: 36px;
  1392. line-height: 40px;
  1393. font-weight: 900;
  1394. margin-top: 90px;
  1395. margin-bottom: 20px;
  1396. }
  1397. .issue {
  1398. font-size: 15px;
  1399. color: #a4a4a4;
  1400. }
  1401. .button {
  1402. cursor: pointer;
  1403. height: 64px;
  1404. margin-top: 30px;
  1405. }
  1406. }
  1407. }
  1408. }
  1409. }
  1410. .small {
  1411. width: 100%;
  1412. height: 100%;
  1413. position: relative;
  1414. background-color: #fff;
  1415. &.bg {
  1416. background: linear-gradient(17.98deg, #3438ff 3.69%, #8b56fc 74.32%);
  1417. }
  1418. &.custom {
  1419. background: #111214 !important;
  1420. }
  1421. .lottery {
  1422. position: absolute;
  1423. top: 0;
  1424. right: 0;
  1425. width: 110px;
  1426. height: 94px;
  1427. }
  1428. .luck-list {
  1429. height: calc(100% - 430px);
  1430. }
  1431. .head {
  1432. display: flex;
  1433. height: 50px;
  1434. align-items: center;
  1435. img {
  1436. width: 20px;
  1437. height: 20px;
  1438. border-radius: 50%;
  1439. margin: 0 10px 0 15px;
  1440. border: solid 2px #fff;
  1441. }
  1442. span {
  1443. color: #fff;
  1444. font-size: 13px;
  1445. font-weight: 700;
  1446. line-height: 16px;
  1447. letter-spacing: 0.005em;
  1448. }
  1449. }
  1450. .price {
  1451. text-align: center;
  1452. .usdt {
  1453. margin: 10px 0;
  1454. color: #ffffff;
  1455. font-weight: bold;
  1456. font-size: 16px;
  1457. line-height: 20px;
  1458. text-align: center;
  1459. letter-spacing: 0.3px;
  1460. }
  1461. .money {
  1462. display: flex;
  1463. align-items: center;
  1464. justify-content: center;
  1465. img {
  1466. width: 46px;
  1467. height: 46px;
  1468. margin-right: 15px;
  1469. border-radius: 50%;
  1470. border: solid 3px #fff;
  1471. }
  1472. span {
  1473. color: #fff;
  1474. font-size: 60px;
  1475. font-weight: 800;
  1476. line-height: 76px;
  1477. }
  1478. }
  1479. }
  1480. .time {
  1481. display: flex;
  1482. height: 46px;
  1483. color: #ffcc4d;
  1484. align-items: center;
  1485. justify-content: center;
  1486. font-weight: bold;
  1487. font-size: 26px;
  1488. line-height: 33px;
  1489. text-align: center;
  1490. background: rgba($color: #000000, $alpha: 0.15);
  1491. .img {
  1492. width: 26px;
  1493. margin-right: 10px;
  1494. }
  1495. }
  1496. .box {
  1497. margin: auto;
  1498. width: 200px;
  1499. height: 200px;
  1500. margin-top: 27px;
  1501. img {
  1502. width: 100%;
  1503. height: 100%;
  1504. }
  1505. }
  1506. .area-cp-link {
  1507. position: absolute;
  1508. bottom: 0;
  1509. background: #fff;
  1510. overflow: hidden;
  1511. width: 100%;
  1512. flex-wrap: wrap;
  1513. height: 238px;
  1514. box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
  1515. border-top-left-radius: 10px;
  1516. border-top-right-radius: 10px;
  1517. .area-list {
  1518. clear: both;
  1519. margin: 15px;
  1520. .item {
  1521. clear: both;
  1522. overflow: hidden;
  1523. margin: 7px 0;
  1524. font-size: 16px;
  1525. font-weight: 500;
  1526. .icon {
  1527. float: left;
  1528. margin-right: 8px;
  1529. margin-top: -2px;
  1530. }
  1531. .font {
  1532. float: left;
  1533. margin-right: 8px;
  1534. }
  1535. .pc {
  1536. float: left;
  1537. margin-top: -2px;
  1538. }
  1539. }
  1540. }
  1541. .area-content {
  1542. margin: 0 15px;
  1543. color: #4b4b4b;
  1544. padding: 7px 10px;
  1545. font-size: 13px;
  1546. border-radius: 5px;
  1547. background: #f4f4f4;
  1548. word-break: break-all;
  1549. }
  1550. .area-btn {
  1551. flex: 1;
  1552. display: flex;
  1553. justify-content: center;
  1554. .btn {
  1555. margin: 15px 15px 0 15px;
  1556. display: inline-block;
  1557. width: 100%;
  1558. height: 47px;
  1559. font-size: 18px;
  1560. line-height: 34px;
  1561. color: #ffffff;
  1562. border-radius: 100px;
  1563. background: #389aff;
  1564. }
  1565. }
  1566. }
  1567. }
  1568. .layer {
  1569. position: fixed;
  1570. width: 100%;
  1571. height: 100%;
  1572. top: 0;
  1573. left: 0;
  1574. background: rgba(0, 0, 0, 0.5);
  1575. .layer-box {
  1576. width: 300px;
  1577. height: 170px;
  1578. background: #ffffff;
  1579. border-radius: 11px;
  1580. opacity: 1;
  1581. position: absolute;
  1582. top: 250px;
  1583. left: 50%;
  1584. margin-left: -150px;
  1585. .layer-txt {
  1586. margin: 30px 0;
  1587. width: 100%;
  1588. padding: 0 27px;
  1589. font-weight: 600;
  1590. font-size: 18px;
  1591. text-align: center;
  1592. }
  1593. .layer-btn {
  1594. width: 190px;
  1595. height: 40px;
  1596. background: #389aff;
  1597. border-radius: 100px;
  1598. margin: 0 auto;
  1599. text-align: center;
  1600. line-height: 40px;
  1601. color: #fff;
  1602. font-weight: 600;
  1603. font-size: 18px;
  1604. }
  1605. }
  1606. }
  1607. .luck-list {
  1608. flex: 1;
  1609. width: 100%;
  1610. height: 310px;
  1611. overflow-y: auto;
  1612. .luck-item {
  1613. display: flex;
  1614. padding: 12px 0;
  1615. margin: 0 16px;
  1616. border-bottom: 1px solid #f2f2f2;
  1617. justify-content: space-between;
  1618. position: relative;
  1619. .header {
  1620. border-radius: 50%;
  1621. }
  1622. .luck-king {
  1623. position: absolute;
  1624. top: 36px;
  1625. right: 0px;
  1626. display: flex;
  1627. align-items: center;
  1628. img {
  1629. width: 22px;
  1630. height: 19px;
  1631. margin: 0;
  1632. }
  1633. span {
  1634. font-weight: 500;
  1635. font-size: 12px;
  1636. line-height: 14px;
  1637. letter-spacing: 0.3px;
  1638. color: #f5b945;
  1639. }
  1640. }
  1641. .userLogo {
  1642. position: relative;
  1643. width: 42px;
  1644. height: 42px;
  1645. margin-right: 12px;
  1646. .medal {
  1647. position: absolute;
  1648. right: -5px;
  1649. bottom: -5px;
  1650. width: 18px;
  1651. height: 18px;
  1652. }
  1653. img {
  1654. width: 100%;
  1655. height: 100%;
  1656. }
  1657. }
  1658. .luck-content {
  1659. flex: auto;
  1660. .luck-title {
  1661. font-weight: 500;
  1662. font-size: 16px;
  1663. letter-spacing: 0.3px;
  1664. color: #444444;
  1665. }
  1666. .luck-time {
  1667. font-weight: 400;
  1668. font-size: 12px;
  1669. line-height: 14px;
  1670. color: #9b9b9b;
  1671. }
  1672. }
  1673. .luck-money {
  1674. display: flex;
  1675. height: 17px;
  1676. align-items: center;
  1677. img {
  1678. width: 14px;
  1679. height: 14px;
  1680. margin-right: 6px;
  1681. }
  1682. .luck-money-txt {
  1683. font-weight: 500;
  1684. font-size: 14px;
  1685. /* identical to box height */
  1686. text-align: right;
  1687. letter-spacing: 0.3px;
  1688. color: #444444;
  1689. }
  1690. }
  1691. .luck-custom-prize {
  1692. font-weight: 500;
  1693. font-size: 14px;
  1694. letter-spacing: 0.3px;
  1695. color: #f5b945;
  1696. }
  1697. }
  1698. .luck-item:last-child {
  1699. border: 0;
  1700. }
  1701. }
  1702. .succTop {
  1703. display: flex;
  1704. align-items: center;
  1705. flex-direction: column;
  1706. justify-content: center;
  1707. height: 150px;
  1708. margin-bottom: 13px;
  1709. background: #7d52fd;
  1710. border-radius: 0 586px 586px/0 0 104px 104px;
  1711. .img {
  1712. height: 62px;
  1713. }
  1714. .expire {
  1715. color: #ffffff;
  1716. font-size: 22px;
  1717. font-weight: 800;
  1718. line-height: 36px;
  1719. margin-top: 15px;
  1720. text-align: center;
  1721. }
  1722. .tips {
  1723. color: #ffffff;
  1724. font-size: 22px;
  1725. font-weight: 800;
  1726. line-height: 26px;
  1727. margin-top: 15px;
  1728. }
  1729. .win {
  1730. font-size: 21px;
  1731. font-weight: 800;
  1732. color: #fff;
  1733. }
  1734. .win-money {
  1735. display: flex;
  1736. margin-top: -10px;
  1737. align-items: center;
  1738. justify-content: center;
  1739. img {
  1740. width: 44px;
  1741. height: 44px;
  1742. margin-right: 15px;
  1743. border-radius: 50%;
  1744. border: solid 3px #fff;
  1745. }
  1746. span {
  1747. color: #fff;
  1748. font-size: 60px;
  1749. font-weight: 800;
  1750. line-height: 76px;
  1751. }
  1752. }
  1753. }
  1754. .succTitle {
  1755. display: flex;
  1756. padding: 5px 0;
  1757. justify-content: space-between;
  1758. box-shadow: inset 0px -1px 0px #f2f2f2;
  1759. span {
  1760. margin: 0 16px;
  1761. font-size: 12px;
  1762. color: #b0b0b0;
  1763. &:last-child {
  1764. text-align: right;
  1765. }
  1766. }
  1767. }
  1768. .customImg {
  1769. width: 100%;
  1770. min-height: 373px;
  1771. }
  1772. .customBottom {
  1773. width: 100%;
  1774. background: #111214;
  1775. padding: 10px 16px;
  1776. font-weight: 500;
  1777. font-size: 12px;
  1778. line-height: 14px;
  1779. letter-spacing: 0.3px;
  1780. color: #838383;
  1781. line-height: 20px;
  1782. .theme {
  1783. display: flex;
  1784. height: 20px;
  1785. align-items: center;
  1786. justify-content: flex-start;
  1787. .icon {
  1788. width: 12px;
  1789. }
  1790. .time2 {
  1791. margin: 0 4px;
  1792. color: #1d9bf0;
  1793. }
  1794. }
  1795. .winner-info {
  1796. display: flex;
  1797. height: 20px;
  1798. align-items: center;
  1799. justify-content: flex-start;
  1800. .count {
  1801. color: #1d9bf0;
  1802. margin-right: 4px;
  1803. }
  1804. .prize-name {
  1805. color: #1d9bf0;
  1806. margin-left: 4px;
  1807. }
  1808. }
  1809. }
  1810. </style>