index.vue 27 KB

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