index.vue 26 KB

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