index.vue 26 KB

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