index.vue 25 KB

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