index.vue 26 KB

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