index.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300
  1. <template>
  2. <div style="width: 100%; height: 100%;">
  3. <div class="content" :style="{ 'background': `#F5FAFF` }" v-show="show_home" v-if="detail">
  4. <div class="logo">
  5. <img src="/img/icon-logo.png" alt />
  6. </div>
  7. <!-- 未开始 -->
  8. <div class="not-open" v-show="status == 'not-open'">
  9. <img src="/subject/001.gif">
  10. </div>
  11. <!-- 红包打开 -->
  12. <div class="redPacket" v-show="status != 'not-open'"
  13. :class="{ redPacket2: status != 'open', key_packet: status == 'open' }">
  14. <!-- 内容 -->
  15. <div class="head">
  16. <div class="head-title">
  17. <img :src="detail.postBizData.postUserInfo.avatarUrl" alt />
  18. <span>{{ detail.postBizData.postUserInfo.nickName }}</span>
  19. </div>
  20. <!-- <div class="head-txt" v-if="status == 'open' || status == 'opened'">Awesome! You Will Get</div> -->
  21. <!-- <div class="head-area" v-else-if="status == 'opened'">opened!</div> -->
  22. <!-- 红包被领完了 -->
  23. <div class="head-area" v-if="status == 'nothing'">
  24. <div class="txt">Better luck next time!</div>
  25. </div>
  26. <!-- 过期 -->
  27. <div class="head-area expire" v-if="status == 'expire'">
  28. <div class="txt">This Giveaways</div>
  29. <div class="titme">expired on {{ formatTime(detail.postBizData.endTimestamp, 'MM-DD') }}</div>
  30. </div>
  31. <!-- 非chrome浏览器 -->
  32. <div class="head-area expire" v-if="status == 'no-chrome'">
  33. <div class="txt">Get Giveaways</div>
  34. <div class="titme">with chrome</div>
  35. </div>
  36. <!-- 领取成功 -->
  37. <div class="head-area head-money" v-if="status == 'open' || status == 'opened'">
  38. <div class="txt">AWESOME! YOU Will GET</div>
  39. <div class="head-money-area">
  40. <img :src="currencyIconPath" alt />
  41. <span class="money-txt" :style="{ fontSize: amount_font_size + 'px' }">{{ receiveAmount }}</span>
  42. </div>
  43. </div>
  44. </div>
  45. <!-- 领取列表 -->
  46. <div class="luck-list-title">
  47. <div>{{ detail.postBizData.receiveCount || 0 }}/{{ detail.postBizData.totalCount || 0 }} Winners
  48. </div>
  49. <div> {{ detail.postBizData.receiveAmountValue }} / {{
  50. detail.postBizData.amountValue || ''
  51. }} {{ detail.postBizData.currencySymbol || '' }}</div>
  52. </div>
  53. <div class="luck-list" @scroll="handleScroll($event)">
  54. <div class="luck-item" v-for="item, i in luck_list" v-bind:key="i">
  55. <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
  56. <img v-else src="/svg/icon-twitter.svg" alt />
  57. <div class="luck-content">
  58. <div class="luck-title">{{ item.simpleUserInfoVO.nickName || 'Twitter User' }}</div>
  59. <div class="luck-time">{{ formatTime(item.receiveTimestamp) }}</div>
  60. </div>
  61. <div class="luck-money">
  62. <img :src="item.currencyIconPath" alt />
  63. <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
  64. </div>
  65. <div class="luck-king" v-if="item.maxAmount">
  66. <img src="/svg/icon-king-hat.svg" alt />
  67. <span>Luckiest Draw</span>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <!-- 安装 -->
  73. <div class="install" v-if="status == 'open' || status == 'opened'"
  74. :class="{ key_install: status == 'open' }">
  75. <div class="title">Withdraw to Wallet</div>
  76. <div class="validity">
  77. <template v-if="validity_state">
  78. <span style="color:#FFA620;">Remaining valid time </span>
  79. <span style="color: #FFA620;">{{ validity }}</span>
  80. </template>
  81. <template v-else>
  82. <span style="color: #FFA620;">Giveaways Validity</span>
  83. </template>
  84. </div>
  85. <div class="flow">
  86. <div class="line"></div>
  87. <div class="area_num">
  88. <div class="num">1</div>
  89. <span>Install DeNet</span>
  90. </div>
  91. <div class="tip">Used to verify tasks and get rewards</div>
  92. <div class="install_btn" @click="installExtension">Install</div>
  93. <div class="area_num">
  94. <div class="num">2</div>
  95. <span>Complete Tasks by {{ detail.postBizData.postUserInfo.nickName }}</span>
  96. </div>
  97. <div class="tip">Complete like, retweet and follow in a simple way</div>
  98. </div>
  99. </div>
  100. <!-- 过期 -->
  101. <div class="install install-error" v-if="status == 'nothing' || status == 'expire'">
  102. <div class="title">Install DeNet</div>
  103. <div class="title">Don't miss the next Giveaway</div>
  104. <div class="tip">Used to verify tasks and get rewards</div>
  105. <div class="install_btn" @click="installExtension">Install</div>
  106. </div>
  107. <!-- 非chrome 浏览器状态 -->
  108. <div class="install install-error" v-if="status == 'no-chrome'">
  109. <div class="title">Open Giveaways</div>
  110. <div class="title">with chrome</div>
  111. <div class="tip">Only supports getting Giveaways through chrome</div>
  112. <div class="install_chrome" @click="clickOpenChrome()">
  113. <img src="/svg/icon-chrome.svg" alt />
  114. Install Chrome
  115. </div>
  116. </div>
  117. <div v-if="status == 'error'"></div>
  118. </div>
  119. <div v-if="show_moblie" class="moblie">
  120. <div class="head-area">
  121. <div class="txt">GET GIVEAWAY</div>
  122. </div>
  123. <!-- 领取列表 -->
  124. <div class="luck-list-title">
  125. <div>{{ detail.postBizData.receiveCount || 0 }}/{{ detail.postBizData.totalCount || 0 }} Winners</div>
  126. <div> {{ detail.postBizData.receiveAmountValue }} / {{
  127. detail.postBizData.amountValue || ''
  128. }} {{ detail.postBizData.currencySymbol || '' }}</div>
  129. </div>
  130. <div class="luck-list" @scroll="handleScroll($event)">
  131. <div class="luck-item" v-for="item, i in luck_list" v-bind:key="i">
  132. <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
  133. <img v-else src="/svg/icon-twitter.svg" alt />
  134. <div class="luck-content">
  135. <div class="luck-title">{{ item.simpleUserInfoVO.nickName || 'Twitter User' }}</div>
  136. <div class="luck-time">{{ formatTime(item.receiveTimestamp) }}</div>
  137. </div>
  138. <div class="luck-money">
  139. <img :src="currencyIconPath" alt />
  140. <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
  141. </div>
  142. <div class="luck-king" v-if="item.maxAmount">
  143. <img src="/svg/icon-king-hat.svg" alt />
  144. <span>Luckiest Draw</span>
  145. </div>
  146. </div>
  147. </div>
  148. <div class="area-cp-link">
  149. <div class="area-title">
  150. <img src="/svg/icon-mobile.svg" alt="">
  151. <div class="right">
  152. <div class="right-title">Get Giveaway on PC</div>
  153. <div class="right-content">You need to use a computer to complete tasks, and Get Giveaways (Just
  154. 2-3 minutes)</div>
  155. </div>
  156. </div>
  157. <div class="area-content">
  158. {{ cp_link }}
  159. </div>
  160. <div class="area-btn">
  161. <div class="btn" :data-clipboard-text="cp_link">Copy Link</div>
  162. </div>
  163. </div>
  164. <div class="layer" v-show="layer_show">
  165. <div class="layer-box">
  166. <div class="layer-txt">Unable to copy, please enter the link manually</div>
  167. <div class="layer-btn" @click="layer_show = false">Done</div>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. </template>
  173. <script>
  174. import axios from 'axios';
  175. import Cookies from 'js-cookie'
  176. import { isBrowser } from '../utils/help.js'
  177. import Report from "../log-center/log"
  178. var moment = require('moment');
  179. var ClipboardJS = require('clipboard')
  180. const api = {
  181. prod: 'https://api.denetme.net',
  182. pre: 'https://preapi.denetme.net',
  183. test: 'https://testapi.denetme.net'
  184. }
  185. const page = {
  186. prod: "https://h5.denetme.net",
  187. pre: "https://preh5.denetme.net",
  188. test: 'https://testh5.denetme.net'
  189. }
  190. const jumpUrl = page[process.env.NUXT_ENV.MODE] + '/'
  191. const baseURL = api[process.env.NUXT_ENV.MODE]
  192. export default {
  193. name: "index",
  194. data() {
  195. return {
  196. cp_link: '',
  197. appVersionCode: 1,
  198. mid: '',
  199. show_moblie: false,
  200. show_home: false,
  201. layer_show: false,
  202. amount_font_size:46,
  203. validity: '',
  204. receiveAmount: 0,
  205. validity_state: true,
  206. detail: {
  207. postId: '',
  208. postBizData: {
  209. imagePath: '',
  210. postUserInfo: {
  211. }
  212. }
  213. },
  214. currencyIconPath: '',
  215. title: '',
  216. twitterTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
  217. jumpUrl: jumpUrl,
  218. status: '',
  219. page_index: 1,
  220. page_size: 20,
  221. luck_list: [],
  222. luck_list_end: false,
  223. config: {
  224. extensionsInstallChannel: 'officeDownload', // chromeAppStore
  225. extensionsInstallUrl: ''
  226. }
  227. }
  228. },
  229. head() {
  230. return {
  231. type: '',
  232. title: this.title,
  233. appVersionCode: 1,
  234. meta: [
  235. {
  236. name: 'twitter:card',
  237. content: 'summary_large_image'
  238. },
  239. {
  240. name: 'twitter:url',
  241. content: this.jumpUrl + this.detail.postId
  242. },
  243. {
  244. name: 'twitter:title',
  245. content: this.twitterTitle
  246. },
  247. {
  248. name: 'twitter:image',
  249. content: this.detail.postBizData.imagePath || ''
  250. }
  251. ]
  252. }
  253. },
  254. methods: {
  255. clickOpenChrome() {
  256. window.open('https://www.google.com/chrome')
  257. },
  258. isMobile() {
  259. let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
  260. return flag;
  261. },
  262. installExtension() {
  263. let { extensionsInstallChannel, extensionsInstallUrl } = this.config;
  264. let url = extensionsInstallUrl;
  265. Report.reportLog({
  266. baseInfo: {
  267. appVersionCode: this.appVersionCode,
  268. mid: this.mid,
  269. pageSource: Report.pageSource.newUserLandingPage
  270. },
  271. params: {
  272. eventData: {
  273. businessType: Report.businessType.buttonClick,
  274. objectType: Report.objectType.installButton
  275. }
  276. }
  277. })
  278. switch (extensionsInstallChannel) {
  279. case "officeDownload":
  280. location.href = url;
  281. this.$router.push({
  282. path: '/install'
  283. })
  284. break;
  285. case "chromeAppStore":
  286. window.open(extensionsInstallUrl)
  287. break;
  288. }
  289. },
  290. formatTime(time, _type = 'MM-DD HH:mm:ss') {
  291. return moment(time).format(_type)
  292. },
  293. guid() {
  294. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  295. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  296. return v.toString(16);
  297. });
  298. },
  299. handleScroll(e) {
  300. e = e.target
  301. if (this.luck_list_end) {
  302. return
  303. }
  304. if ((e.clientHeight + e.scrollTop) / e.scrollHeight > .8) {
  305. this.luck_list_end = false
  306. this.page_index++
  307. this.getReceivedList()
  308. }
  309. },
  310. getFontSize(amount) {
  311. let _num = parseInt(360 / amount.length);
  312. this.amount_font_size = _num < 46 ? _num : 46;
  313. },
  314. setCookieMid() {
  315. let _cookie_mid_arr = Cookies.get('mid') || []
  316. if (_cookie_mid_arr.length > 0) {
  317. this.mid = JSON.parse(_cookie_mid_arr)[0].mid
  318. } else {
  319. this.mid = this.guid()
  320. Cookies.set('mid', JSON.stringify([{ mid: this.mid }]), { expires: 1000 })
  321. }
  322. },
  323. async getRedPacket() {
  324. this.currencyIconPath = this.detail.postBizData.currencyIconPath
  325. let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/receiveLuckdrop`, {
  326. baseInfo: {
  327. appVersionCode: this.appVersionCode,
  328. mid: this.mid
  329. },
  330. params: {
  331. postId: this.detail.postId || ''
  332. }
  333. })
  334. this.show_home = true
  335. switch (data.code.toString()) {
  336. case '0':
  337. this.getDetail()
  338. if (data.data.newReceived) {
  339. this.status = 'not-open'
  340. setTimeout(() => {
  341. this.status = 'open'
  342. }, 3000)
  343. this.receiveAmount = data.data.receiveAmount
  344. } else {
  345. this.status = 'opened'
  346. }
  347. this.getValidity(data.data.endTimestamp)
  348. this.receiveAmount = data.data.receiveAmount
  349. this.getFontSize(this.receiveAmount)
  350. break;
  351. case '2003':
  352. this.status = 'expire'
  353. break
  354. // 红包被领完了
  355. case '2008':
  356. this.status = 'nothing'
  357. break
  358. case '2029':
  359. // 推文未发布
  360. this.status = 'error'
  361. break
  362. default:
  363. console.log('getRedPacket', data)
  364. this.show_home = false
  365. break;
  366. }
  367. // 领取列表分页
  368. this.getReceivedList()
  369. },
  370. async getReceivedList() {
  371. let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/getReceivedList`, {
  372. baseInfo: {
  373. appVersionCode: this.appVersionCode,
  374. mid: this.mid
  375. },
  376. params: {
  377. pageNum: this.page_index,
  378. pageSize: this.page_size,
  379. postId: this.detail.postId || ''
  380. }
  381. })
  382. if (data.code == 0) {
  383. if (data.data.length > 0) {
  384. this.luck_list = this.luck_list.concat(data.data)
  385. this.luck_list_end = false
  386. } else {
  387. this.luck_list_end = true
  388. }
  389. } else {
  390. console.log('getReceivedList', data)
  391. }
  392. },
  393. getValidity(end_time) {
  394. let _d1, _d2, _d3, _h, _m, _s
  395. let timer = setInterval(() => {
  396. let _time = new Date().getTime()
  397. _d3 = end_time - _time
  398. if (_d3 > 0) {
  399. _d1 = moment(end_time)
  400. _d2 = moment(_time)
  401. _h = moment.duration(_d1.diff(_d2)).hours()
  402. _m = moment.duration(_d1.diff(_d2)).minutes()
  403. _s = moment.duration(_d1.diff(_d2)).seconds()
  404. if (_h < 10) {
  405. _h = '0' + _h
  406. }
  407. if (_m < 10) {
  408. _m = '0' + _m
  409. }
  410. if (_s < 10) {
  411. _s = '0' + _s
  412. }
  413. this.validity = `${_h}:${_m}:${_s}`
  414. } else {
  415. clearInterval(timer)
  416. }
  417. }, 1000)
  418. },
  419. setPickupInfo() {
  420. let pickupInfo = {
  421. srcContentId: this.detail.srcContentId,
  422. postNickName: this.detail.postBizData.postUserInfo.nickName
  423. };
  424. Cookies.set('pickup_info', JSON.stringify(pickupInfo), { expires: 100 });
  425. },
  426. async getDetail() {
  427. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  428. baseInfo: {
  429. appVersionCode: this.appVersionCode,
  430. mid: this.mid
  431. },
  432. params: {
  433. postId: this.detail.postId
  434. }
  435. })
  436. if (data.code == 0) {
  437. this.detail.postBizData = JSON.parse(data.data.postBizData)
  438. }
  439. },
  440. async getConfig() {
  441. let { data } = await axios.post(`${baseURL}/denet/base/config/getFrontConfig`, {
  442. baseInfo: {
  443. appVersionCode: this.appVersionCode,
  444. mid: this.mid
  445. },
  446. params: {
  447. }
  448. })
  449. if (data.code == 0) {
  450. this.config = data.data;
  451. }
  452. },
  453. },
  454. async asyncData(params) {
  455. let { route } = params;
  456. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  457. baseInfo: {
  458. mid: function () {
  459. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  460. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  461. return v.toString(16);
  462. });
  463. }()
  464. },
  465. params: {
  466. postId: route.params.id || ''
  467. }
  468. })
  469. if (data.code == 0) {
  470. if (data.data && data.data.postBizData && typeof data.data.postBizData == 'string') {
  471. data.data.postBizData = JSON.parse(data.data.postBizData)
  472. }
  473. if(data.data.postBizData === null) {
  474. data.data.postBizData = {
  475. postUserInfo: {
  476. }
  477. }
  478. }
  479. return {
  480. detail: data.data,
  481. }
  482. }
  483. },
  484. mounted() {
  485. Report.reportLog({
  486. baseInfo: {
  487. appVersionCode: this.appVersionCode,
  488. mid: this.mid,
  489. pageSource: Report.pageSource.newUserLandingPage
  490. },
  491. params: {
  492. eventData: {
  493. businessType: Report.businessType.pageView,
  494. }
  495. }
  496. })
  497. this.getConfig()
  498. if (!this.detail.postId) {
  499. return
  500. }
  501. console.log(this.detail)
  502. //改变font-size
  503. // (function (doc, win) {
  504. // var docEI = doc.documentElement,
  505. // resizeEvt = 'orientationchange' in window ? 'orientataionchange' : 'resize',
  506. // recalc = function () {
  507. // var clientWidth = docEI.clientWidth;
  508. // if (!clientWidth) return;
  509. // //100是字体大小,1510是开发时浏览器窗口的宽度,等比计算
  510. // docEI.style.fontSize = 10 * (clientWidth / 1510) + 'px';
  511. // }
  512. // if (!doc.addEventListener) return;
  513. // win.addEventListener(resizeEvt, recalc, false);
  514. // doc.addEventListener('DOMContentLoaded', recalc, false);
  515. // })(document, window);
  516. document.documentElement.style.fontSize = '62.5%'
  517. if (this.isMobile()) {
  518. this.show_moblie = true
  519. this.cp_link = window.location.href
  520. // 复制链接
  521. var clipboard = new ClipboardJS('.btn');
  522. clipboard.on('success', function (e) {
  523. console.info('Action:', e.action);
  524. console.info('Text:', e.text);
  525. console.info('Trigger:', e.trigger);
  526. e.clearSelection();
  527. });
  528. clipboard.on('error', function (e) {
  529. this.layer_show = true
  530. console.error('Action:', e.action);
  531. console.error('Trigger:', e.trigger);
  532. });
  533. // 领取列表分页
  534. this.getReceivedList()
  535. } else if (isBrowser() == 'chrome') {
  536. // 领取任务红包
  537. this.setCookieMid()
  538. this.getRedPacket()
  539. this.setPickupInfo()
  540. } else {
  541. this.show_home = true
  542. this.status = 'no-chrome'
  543. }
  544. }
  545. }
  546. </script>
  547. <style lang="scss" >
  548. html,
  549. body,
  550. #__nuxt,
  551. #__layout {
  552. width: 100%;
  553. height: 100%;
  554. padding: 0;
  555. margin: 0;
  556. }
  557. .moblie {
  558. display: flex;
  559. flex-wrap: wrap;
  560. height: 100%;
  561. align-content: flex-start;
  562. flex-direction: column;
  563. .layer {
  564. position: fixed;
  565. width: 100%;
  566. height: 100%;
  567. top: 0;
  568. left: 0;
  569. background: rgba(0, 0, 0, .5);
  570. .layer-box {
  571. width: 30rem;
  572. height: 17rem;
  573. background: #FFFFFF;
  574. border-radius: 11px;
  575. opacity: 1;
  576. position: absolute;
  577. top: 25rem;
  578. left: 50%;
  579. margin-left: -15rem;
  580. .layer-txt {
  581. margin: 3rem 0;
  582. width: 100%;
  583. padding: 0 2.7rem;
  584. font-weight: 600;
  585. font-size: 1.8rem;
  586. text-align: center;
  587. }
  588. .layer-btn {
  589. width: 19rem;
  590. height: 4rem;
  591. background: #389AFF;
  592. border-radius: 100px;
  593. margin: 0 auto;
  594. text-align: center;
  595. line-height: 4rem;
  596. color: #fff;
  597. font-weight: 600;
  598. font-size: 1.8rem;
  599. }
  600. }
  601. }
  602. .head-area {
  603. width: 100%;
  604. height: 8rem;
  605. text-align: center;
  606. letter-spacing: 0.3px;
  607. font-size: 2rem;
  608. text-align: center;
  609. color: #fff;
  610. background: #389AFF;
  611. border-radius: 0 586px 586px/0 0 104px 104px;
  612. display: flex;
  613. align-items: center;
  614. .txt {
  615. width: 100%;
  616. text-align: center;
  617. }
  618. }
  619. .luck-list-title {
  620. /* margin-top: 47px;*/
  621. margin: 0 16px;
  622. padding: 14px 0 11px 0;
  623. background: #fff;
  624. display: flex;
  625. justify-content: space-between;
  626. color: #B0B0B0;
  627. border-bottom: 1px solid #D1D1D1;
  628. }
  629. .luck-list {
  630. flex: 1;
  631. width: 100%;
  632. background: #fff;
  633. overflow-y: auto;
  634. .luck-item {
  635. display: flex;
  636. padding: 12px 0;
  637. margin: 0 16px;
  638. border-bottom: 1px solid #d1d1d1;
  639. justify-content: space-between;
  640. position: relative;
  641. img:first-child {
  642. border-radius: 50%;
  643. }
  644. .luck-king {
  645. position: absolute;
  646. top: 36px;
  647. right: 0px;
  648. display: flex;
  649. align-items: center;
  650. img {
  651. width: 22px;
  652. height: 19px;
  653. margin: 0;
  654. }
  655. span {
  656. font-weight: 500;
  657. font-size: 12px;
  658. line-height: 14px;
  659. letter-spacing: 0.3px;
  660. color: #f5b945;
  661. }
  662. }
  663. img {
  664. width: 42px;
  665. height: 42px;
  666. margin-right: 12px;
  667. }
  668. .luck-content {
  669. flex: auto;
  670. .luck-title {
  671. font-weight: 500;
  672. font-size: 16px;
  673. letter-spacing: 0.3px;
  674. color: #444444;
  675. }
  676. .luck-time {
  677. font-weight: 400;
  678. font-size: 12px;
  679. line-height: 14px;
  680. color: #9b9b9b;
  681. }
  682. }
  683. .luck-money {
  684. display: flex;
  685. height: 17px;
  686. align-items: center;
  687. img {
  688. width: 14px;
  689. height: 14px;
  690. margin-right: 6px;
  691. }
  692. .luck-money-txt {
  693. font-weight: 500;
  694. font-size: 14px;
  695. /* identical to box height */
  696. text-align: right;
  697. letter-spacing: 0.3px;
  698. color: #444444;
  699. }
  700. }
  701. }
  702. .luck-item:last-child {
  703. border: 0;
  704. }
  705. }
  706. .area-cp-link {
  707. background: #fff;
  708. display: flex;
  709. width: 100%;
  710. flex-wrap: wrap;
  711. position: fixed;
  712. bottom: 0;
  713. height: 20rem;
  714. box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
  715. border-top-left-radius: 2rem;
  716. border-top-right-radius: 2rem;
  717. .area-title {
  718. display: flex;
  719. img {
  720. width: 6.4rem;
  721. height: 6.4rem;
  722. margin: 1.5rem;
  723. }
  724. .right {
  725. flex: 1;
  726. letter-spacing: 0.3px;
  727. .right-title {
  728. font-size: 1.7rem;
  729. color: #000000;
  730. margin-top: 1.7rem;
  731. }
  732. .right-content {
  733. font-size: 1.2rem;
  734. color: #989898;
  735. }
  736. }
  737. }
  738. .area-content {
  739. background: #F4F4F4;
  740. height: 4.6rem;
  741. padding: 0 1rem;
  742. width: 100%;
  743. font-size: 1.3rem;
  744. word-break: break-all;
  745. }
  746. .area-btn {
  747. flex: 1;
  748. display: flex;
  749. justify-content: center;
  750. .btn {
  751. width: 34.3rem;
  752. height: 4rem;
  753. background: #389AFF;
  754. border-radius: 100px;
  755. font-size: 1.8rem;
  756. color: #FFFFFF;
  757. }
  758. }
  759. }
  760. }
  761. .content {
  762. width: 100%;
  763. height: 100%;
  764. background-size: 100%;
  765. background-repeat: no-repeat;
  766. position: relative;
  767. font-family: "SF Pro Display";
  768. font-style: normal;
  769. font-weight: 600;
  770. .not-open {
  771. display: flex;
  772. align-items: center;
  773. justify-content: center;
  774. width: 100%;
  775. height: 100%;
  776. img {
  777. width: 20rem;
  778. height: 20rem;
  779. }
  780. }
  781. .logo {
  782. position: absolute;
  783. left: 4rem;
  784. top: 1.5rem;
  785. img {
  786. width: 10.7rem;
  787. height: 3.4rem;
  788. }
  789. }
  790. .key_packet {
  791. animation: key_packet 3s;
  792. animation-delay: 0s;
  793. animation-fill-mode: forwards;
  794. }
  795. .redPacket {
  796. display: flex;
  797. justify-content: flex-start;
  798. flex-direction: column;
  799. position: absolute;
  800. top: 9rem;
  801. left: 50%;
  802. width: 37.5rem;
  803. margin-left: -18rem;
  804. height: 65rem;
  805. border-radius: 2rem;
  806. // background: red;
  807. overflow-y: hidden;
  808. box-shadow: 0 0 5px #888888;
  809. background: #fff;
  810. .top {
  811. top: 0;
  812. position: absolute;
  813. width: 100%;
  814. z-index: 12;
  815. }
  816. .down {
  817. bottom: 0;
  818. position: absolute;
  819. height: 32.3rem;
  820. z-index: 11;
  821. }
  822. .head {
  823. position: relative;
  824. .head-title {
  825. position: absolute;
  826. top: 0;
  827. width: 100%;
  828. display: flex;
  829. align-items: center;
  830. justify-content: center;
  831. height: 3.6rem;
  832. background: rgba(255, 255, 255, .1);
  833. img {
  834. width: 1.8rem;
  835. height: 1.8rem;
  836. border-radius: 50%;
  837. border: 1px solid #fff;
  838. }
  839. span {
  840. margin-left: .8rem;
  841. font-size: 1.2rem;
  842. color: #fff;
  843. }
  844. }
  845. .head-txt {
  846. margin-top: 4.7rem;
  847. font-size: 2rem;
  848. text-align: center;
  849. color: #fff;
  850. }
  851. .head-area {
  852. height: 19rem;
  853. text-align: center;
  854. letter-spacing: 0.3px;
  855. font-size: 2rem;
  856. text-align: center;
  857. color: #fff;
  858. background: #389AFF;
  859. border-radius: 0 586px 586px/0 0 104px 104px;
  860. .txt {
  861. padding-top: 8.5rem;
  862. }
  863. }
  864. .head-money {
  865. .txt {
  866. padding-top: 6.8rem;
  867. font-weight: 800;
  868. font-size: 1.5rem;
  869. text-align: center;
  870. letter-spacing: 0.3px;
  871. }
  872. .head-money-area {
  873. display: flex;
  874. width: 100%;
  875. justify-content: center;
  876. align-items: center;
  877. img {
  878. width: 4rem;
  879. height: 4rem;
  880. border: 2px solid #FFFFFF;
  881. border-radius: 100px;
  882. }
  883. span {
  884. margin-left: 1.3rem;
  885. font-size: 4.6rem;
  886. word-break: break-all;
  887. }
  888. }
  889. }
  890. }
  891. .luck-list-title {
  892. /* margin-top: 47px;*/
  893. margin: 0 16px;
  894. padding: 14px 0 11px 0;
  895. background: #fff;
  896. display: flex;
  897. justify-content: space-between;
  898. color: #B0B0B0;
  899. border-bottom: 1px solid #D1D1D1;
  900. }
  901. .luck-list {
  902. background: #fff;
  903. overflow-y: auto;
  904. .luck-item {
  905. display: flex;
  906. padding: 12px 0;
  907. margin: 0 16px;
  908. border-bottom: 1px solid #d1d1d1;
  909. justify-content: space-between;
  910. position: relative;
  911. img:first-child {
  912. border-radius: 50%;
  913. }
  914. .luck-king {
  915. position: absolute;
  916. top: 36px;
  917. right: 0px;
  918. display: flex;
  919. align-items: center;
  920. img {
  921. width: 22px;
  922. height: 19px;
  923. margin: 0;
  924. }
  925. span {
  926. font-weight: 500;
  927. font-size: 12px;
  928. line-height: 14px;
  929. letter-spacing: 0.3px;
  930. color: #f5b945;
  931. }
  932. }
  933. img {
  934. width: 42px;
  935. height: 42px;
  936. margin-right: 12px;
  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. .area {
  977. position: absolute;
  978. z-index: 112;
  979. width: 100%;
  980. .title {
  981. z-index: 11;
  982. margin-top: 8.5rem;
  983. text-align: center;
  984. img {
  985. width: 3.6rem;
  986. height: 3.6rem;
  987. border: 2px solid #fff4db;
  988. border-radius: 50%;
  989. }
  990. span {
  991. letter-spacing: 0.3px;
  992. font-size: 1.6rem;
  993. color: #fff2d3;
  994. }
  995. }
  996. .txt {
  997. font-size: 4rem;
  998. text-align: center;
  999. letter-spacing: 0.03rem;
  1000. color: #fff2d3;
  1001. }
  1002. }
  1003. .key_area {
  1004. animation: key_area 1s;
  1005. animation-delay: 1s;
  1006. animation-fill-mode: forwards;
  1007. }
  1008. }
  1009. .redPacket2 {
  1010. left: 30.6rem;
  1011. margin-left: -18rem;
  1012. }
  1013. .key_install {
  1014. opacity: 0;
  1015. animation: key_install 2s;
  1016. animation-delay: 0s;
  1017. animation-fill-mode: forwards;
  1018. }
  1019. .install {
  1020. position: absolute;
  1021. top: 20rem;
  1022. left: 78.5rem;
  1023. .title {
  1024. font-size: 4.8rem;
  1025. color: #000000;
  1026. letter-spacing: 0.3px;
  1027. }
  1028. .validity {
  1029. margin-top: 1rem;
  1030. color: #FF0000;
  1031. width: 40rem;
  1032. height: 3.3rem;
  1033. line-height: 3.3rem;
  1034. span {
  1035. font-size: 1.4rem;
  1036. }
  1037. }
  1038. .flow {
  1039. position: absolute;
  1040. margin-top: 4rem;
  1041. .line {
  1042. position: absolute;
  1043. height: 16rem;
  1044. border: 1px solid #e0e0e0;
  1045. top: 3rem;
  1046. left: 1.2rem;
  1047. }
  1048. .area_num {
  1049. display: flex;
  1050. align-items: center;
  1051. .num {
  1052. width: 2.4rem;
  1053. height: 2.4rem;
  1054. background-color: rgba(56, 154, 255, 1);
  1055. border-radius: 50%;
  1056. color: #fff;
  1057. text-align: center;
  1058. line-height: 2.4rem;
  1059. font-size: 1.4rem;
  1060. }
  1061. span {
  1062. margin-left: 1.5rem;
  1063. color: #000000;
  1064. font-size: 1.8rem;
  1065. }
  1066. }
  1067. .tip {
  1068. margin-left: 4rem;
  1069. margin-top: 0.7rem;
  1070. font-size: 1.4rem;
  1071. color: #a4a4a4;
  1072. }
  1073. .install_btn {
  1074. cursor: pointer;
  1075. margin-left: 4rem;
  1076. margin-top: 2rem;
  1077. margin-bottom: 6.7rem;
  1078. width: 23rem;
  1079. height: 5.8rem;
  1080. background: #389aff;
  1081. border-radius: 10rem;
  1082. color: #fff;
  1083. line-height: 5.8rem;
  1084. text-align: center;
  1085. font-size: 2rem;
  1086. }
  1087. }
  1088. .tip {
  1089. margin-top: 0.7rem;
  1090. font-size: 1.4rem;
  1091. color: #a4a4a4;
  1092. }
  1093. .install_btn {
  1094. cursor: pointer;
  1095. margin-top: 2rem;
  1096. margin-bottom: 6.7rem;
  1097. width: 23rem;
  1098. height: 5.8rem;
  1099. background: #389aff;
  1100. border-radius: 10rem;
  1101. color: #fff;
  1102. line-height: 5.8rem;
  1103. text-align: center;
  1104. font-size: 2rem;
  1105. }
  1106. }
  1107. .install-error {
  1108. left: 78.5rem;
  1109. .install_chrome {
  1110. cursor: pointer;
  1111. width: 24.3rem;
  1112. height: 5.8rem;
  1113. font-size: 2rem;
  1114. font-weight: 500;
  1115. letter-spacing: 0.3px;
  1116. display: flex;
  1117. align-items: center;
  1118. background: #FFFFFF;
  1119. border: 1px solid #e8e8e8;
  1120. border-radius: 10rem;
  1121. margin-top: 3.3rem;
  1122. img {
  1123. width: 3.2rem;
  1124. height: 3.2rem;
  1125. margin-left: 3.3rem;
  1126. }
  1127. span {
  1128. margin-left: 1.2rem;
  1129. }
  1130. }
  1131. }
  1132. }
  1133. @keyframes key_area {
  1134. 0% {
  1135. opacity: 1;
  1136. }
  1137. 100% {
  1138. opacity: 0;
  1139. }
  1140. }
  1141. @keyframes key_install {
  1142. 0% {
  1143. opacity: 0;
  1144. }
  1145. 100% {
  1146. opacity: 1;
  1147. }
  1148. }
  1149. @keyframes key_packet {
  1150. 0% {}
  1151. 100% {
  1152. left: 30.6rem;
  1153. margin-left: -18rem;
  1154. }
  1155. }
  1156. </style>