index.vue 27 KB

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