index.vue 25 KB

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