index.vue 25 KB

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