index.vue 25 KB

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