index.vue 26 KB

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