index.vue 25 KB

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