index.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735
  1. <!-- 普通玩法落地页 -->
  2. <template>
  3. <div style="width: 100%; height: 100%;">
  4. <div class="content" :style="{ 'background': `#fff` }" v-show="show_home" v-if="detail">
  5. <div class="logo">
  6. <img src="/img/icon-logo.png" alt />
  7. </div>
  8. <!-- 未开始 -->
  9. <div class="redBag" v-show="status == 'not-open'">
  10. <img src="/subject/001.gif">
  11. </div>
  12. <div class="head-in-custom" v-if="!isMoneyPrize">
  13. <img :src="detail.postBizData.postUserInfo.avatarUrl" />
  14. <span>{{ detail.postBizData.postUserInfo.nickName }}</span>
  15. </div>
  16. <!-- 红包打开 -->
  17. <div class="redPacket"
  18. :class="{ redPacket2: status != 'open', key_packet: status == 'open' }"
  19. v-if="status != 'nothing'"
  20. v-show="status != 'not-open'">
  21. <!-- 内容 -->
  22. <div class="head">
  23. <div class="head-title">
  24. <img :src="detail.postBizData.postUserInfo.avatarUrl" alt />
  25. <span>{{ detail.postBizData.postUserInfo.nickName }}</span>
  26. </div>
  27. <!-- <div class="head-txt" v-if="status == 'open' || status == 'opened'">Awesome! You Will Get</div> -->
  28. <!-- <div class="head-area" v-else-if="status == 'opened'">opened!</div> -->
  29. <!-- 红包被领完了 -->
  30. <div class="head-area" v-if="status == 'nothing'">
  31. <div class="txt">Better luck next time!</div>
  32. </div>
  33. <!-- 过期 -->
  34. <div class="head-area expire" v-if="status == 'expire'">
  35. <div class="txt">This Giveaways</div>
  36. <div class="titme">expired on {{ formatTime(detail.postBizData.endTimestamp, 'MM-DD') }}</div>
  37. </div>
  38. <!-- 非chrome浏览器 -->
  39. <div class="head-area expire" v-if="status == 'no-chrome'">
  40. <div class="txt">Get Giveaways</div>
  41. <div class="titme">with chrome</div>
  42. </div>
  43. <!-- 领取成功 -->
  44. <div class="head-area head-money" v-if="status == 'open' || status == 'opened'">
  45. <div class="txt">AWESOME! YOU Will GET</div>
  46. <div class="head-money-area">
  47. <img :src="currencyIconPath" alt />
  48. <span class="money-txt" :style="{ fontSize: amount_font_size + 'px' }">{{ receiveAmount }}</span>
  49. </div>
  50. </div>
  51. </div>
  52. <!-- 领取列表 -->
  53. <div class="luck-list-title">
  54. <div>{{ detail.postBizData.receiveCount || 0 }}/{{ detail.postBizData.totalCount || 0 }} Winners
  55. </div>
  56. <div v-if="isMoneyPrize"> {{ detail.postBizData.receiveAmountValue }} / {{
  57. detail.postBizData.amountValue || ''
  58. }} {{ detail.postBizData.currencySymbol || '' }}</div>
  59. </div>
  60. <div class="luck-list" @scroll="handleScroll($event)">
  61. <div class="luck-item" v-for="item, i in luck_list" v-bind:key="i">
  62. <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
  63. <img v-else src="/svg/icon-twitter.svg" alt />
  64. <div class="luck-content">
  65. <div class="luck-title">{{ item.simpleUserInfoVO.nickName || 'Twitter User' }}</div>
  66. <div class="luck-time">{{ formatTime(item.receiveTimestamp, 'MM-DD HH:mm') }}</div>
  67. </div>
  68. <div class="luck-money" v-if="isMoneyPrize">
  69. <img :src="item.currencyIconPath" alt />
  70. <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
  71. </div>
  72. <div class="luck-custom-prize" v-else>winner</div>
  73. <div class="luck-king" v-if="isMoneyPrize && item.maxAmount">
  74. <img src="/svg/icon-king-hat.svg" alt />
  75. <span>Luckiest Draw</span>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <template v-else>
  81. <div class="redBagCustom" v-if="detail.postBizData.posterType === 2 && detail.postBizData.customPosterInstalled">
  82. <img class="customImg" :src="detail.postBizData.customPosterInstalled" />
  83. <div class="customBottom">
  84. <div class="theme">
  85. <span class="info">Instant Giveaway</span>
  86. </div>
  87. <div class="winner-info">
  88. <span class="count">{{detail.postBizData.totalCount}} Winners</span>
  89. <span>to Share </span>
  90. <span class="prize-name">{{detail.postBizData.amountValue + ' ' + detail.postBizData.currencySymbol}}</span>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="redBag" :class="{'auto-height': !isMoneyPrize}" v-else>
  95. <!-- 货币类型 -->
  96. <template v-if="isMoneyPrize">
  97. <img src="/subject/001-card.png" alt="">
  98. <img class="open-gif" src="/subject/001.gif" />
  99. <div class="title" v-if="detail.postBizData.postUserInfo">
  100. <img :src="detail.postBizData.postUserInfo.avatarUrl" alt />
  101. <span>{{ detail.postBizData.postUserInfo.nickName || 'FutureDoctor' }}</span>
  102. </div>
  103. <div class="money-area">
  104. <div class="txt">{{ detail.postBizData.currencySymbol }} GIVEAWAY</div>
  105. <div class="coin">
  106. <img :src="detail.postBizData.currencyIconPath" alt />
  107. <font-amount :amount="detail.postBizData.amountValue"></font-amount>
  108. </div>
  109. <div class="people">{{ detail.postBizData.totalCount }} WINNERS TO SHARE</div>
  110. </div>
  111. </template>
  112. <template v-else>
  113. <custom-card-cover
  114. :totalCount="detail.postBizData.totalCount"
  115. :amountValue="detail.postBizData.amountValue"
  116. :tokenSymbol="detail.postBizData.tokenSymbol"
  117. :currencyIconUrl="detail.postBizData.iconPath"
  118. :playType="1"
  119. :validity="validity"
  120. :userInfo="{
  121. nickName: detail.postBizData.postUserInfo.nickName,
  122. avatarUrl: detail.postBizData.postUserInfo.avatarUrl
  123. }"
  124. :rewardType="detail.postBizData.rewardType"
  125. :customizedReward="detail.postBizData.customizedReward"
  126. :showBottomInfo="true"
  127. ></custom-card-cover>
  128. </template>
  129. </div>
  130. </template>
  131. <!-- 安装 -->
  132. <div class="install" v-if="status == 'nothing' || status == 'open' || status == 'opened'"
  133. :class="{ key_install: status == 'open' }">
  134. <div v-if="status == 'nothing'">
  135. <div class="title">Install Denet to Draw</div>
  136. </div>
  137. <div v-else>
  138. <div class="title">Withdraw to Wallet</div>
  139. <div class="validity">
  140. <template v-if="validity_state">
  141. <span style="color:#FFA620;">Remaining valid time </span>
  142. <span style="color: #FFA620;">{{ validity }}</span>
  143. </template>
  144. <template v-else>
  145. <span style="color: #FFA620;">Giveaways Validity</span>
  146. </template>
  147. </div>
  148. </div>
  149. <div class="flow">
  150. <div class="line"></div>
  151. <div class="area_num">
  152. <div class="num">1</div>
  153. <span>Install DeNet</span>
  154. </div>
  155. <div class="tip">Used to verify tasks and get rewards</div>
  156. <div class="install_btn" @click="installExtension">Install</div>
  157. <div class="area_num">
  158. <div class="num">2</div>
  159. <span v-if="status == 'nothing'">Complete Tasks</span>
  160. <span v-else>Complete Tasks by {{ detail.postBizData.postUserInfo.nickName }}</span>
  161. </div>
  162. <div class="tip">Complete like, retweet and follow in a simple way</div>
  163. </div>
  164. </div>
  165. <!-- 过期 -->
  166. <div class="install install-error" v-if="status == 'expire'">
  167. <div class="title">Install DeNet</div>
  168. <div class="title">Don't miss the next Giveaway</div>
  169. <div class="tip">Used to verify tasks and get rewards</div>
  170. <div class="install_btn" @click="installExtension">Install</div>
  171. </div>
  172. <!-- 非chrome 浏览器状态 -->
  173. <div class="install install-error" v-if="status == 'no-chrome'">
  174. <div class="title">Open Giveaways</div>
  175. <div class="title">with chrome</div>
  176. <div class="tip">Only supports getting Giveaways through chrome</div>
  177. <div class="install_chrome" @click="clickOpenChrome()">
  178. <img src="/svg/icon-chrome.svg" alt />
  179. Install Chrome
  180. </div>
  181. </div>
  182. <div v-if="status == 'error'"></div>
  183. </div>
  184. <div v-if="show_moblie" class="moblie">
  185. <div class="head-area">
  186. <div class="gift">
  187. <img :src=" require('../static/subject/gift.svg') " />
  188. </div>
  189. <div class="txt">
  190. <div>Complete tasks</div>
  191. <div>to Draw Prizes</div>
  192. </div>
  193. </div>
  194. <!-- 领取列表 -->
  195. <div class="luck-list" @scroll="handleScroll($event)">
  196. <div class="luck-item" v-for="item, i in luck_list" v-bind:key="i">
  197. <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
  198. <img v-else src="/svg/icon-twitter.svg" alt />
  199. <div class="luck-content">
  200. <div class="luck-title">{{ item.simpleUserInfoVO.nickName || 'Twitter User' }}</div>
  201. <div class="luck-time">{{ formatTime(item.receiveTimestamp) }}</div>
  202. </div>
  203. <div class="luck-money" v-if="isMoneyPrize">
  204. <img :src="item.currencyIconPath" alt />
  205. <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
  206. </div>
  207. <div class="luck-custom-prize" v-else>winner</div>
  208. <div class="luck-king" v-if="isMoneyPrize && item.maxAmount">
  209. <img src="/svg/icon-king-hat.svg" alt />
  210. <span>Luckiest Draw</span>
  211. </div>
  212. </div>
  213. </div>
  214. <div class="area-cp-link">
  215. <div class="area-list">
  216. <div class="item">
  217. <div class="icon"><img :src=" require('../static/subject/01.svg') " /></div>
  218. <div class="font">Complete the tasks on tweet</div>
  219. </div>
  220. <div class="item">
  221. <div class="icon"><img :src=" require('../static/subject/02.svg') " /></div>
  222. <div class="font">Open link on PC to draw</div>
  223. <div class="pc"><img :src=" require('../static/subject/pc.svg') " /></div>
  224. </div>
  225. </div>
  226. <div class="area-content">
  227. {{ cp_link }}
  228. </div>
  229. <div class="area-btn">
  230. <div class="btn" :data-clipboard-text="cp_link" @click="copyLinkHandle">Copy Link</div>
  231. </div>
  232. </div>
  233. <div class="layer" v-show="layer_show">
  234. <div class="layer-box">
  235. <div class="layer-txt">Unable to copy, please enter the link manually</div>
  236. <div class="layer-btn" @click="layer_show = false">Done</div>
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. </template>
  242. <script>
  243. import axios from 'axios';
  244. import Cookies from 'js-cookie'
  245. import { isBrowser } from '../utils/help.js'
  246. import Report from "../log-center/log"
  247. import { Toast } from 'vant';
  248. import FontAmount from '../components/FontAmount.vue';
  249. import CustomCardCover from '../components/CustomCardCover.vue'
  250. import { RewardType } from '../types';
  251. var moment = require('moment');
  252. var ClipboardJS = require('clipboard')
  253. const api = {
  254. prod: 'https://api.denetme.net',
  255. pre: 'https://preapi.denetme.net',
  256. test: 'https://testapi.denetme.net'
  257. }
  258. const page = {
  259. prod: "https://h5.denetme.net",
  260. pre: "https://preh5.denetme.net",
  261. test: 'https://testh5.denetme.net'
  262. }
  263. const jumpUrl = page[process.env.NUXT_ENV.MODE] + '/'
  264. const baseURL = api[process.env.NUXT_ENV.MODE]
  265. const appType = 1;
  266. let appVersionCode = 6;
  267. export default {
  268. name: "index",
  269. data() {
  270. return {
  271. cp_link: '',
  272. appVersionCode: appVersionCode,
  273. mid: '',
  274. show_moblie: false,
  275. show_home: false,
  276. layer_show: false,
  277. amount_font_size:46,
  278. validity: '',
  279. receiveAmount: 0,
  280. validity_state: true,
  281. detail: {
  282. postId: '',
  283. postBizData: {
  284. imagePath: '',
  285. postUserInfo: {
  286. }
  287. }
  288. },
  289. currencyIconPath: '',
  290. title: 'DeNet Giveaway',
  291. metaTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
  292. jumpUrl: jumpUrl,
  293. status: '',
  294. reportStatus: 'normal',
  295. page_index: 1,
  296. page_size: 20,
  297. luck_list: [],
  298. luck_list_end: false,
  299. config: {
  300. extensionsInstallChannel: 'officeDownload', // chromeAppStore
  301. extensionsInstallUrl: ''
  302. }
  303. }
  304. },
  305. computed: {
  306. // 货币类型的奖品
  307. isMoneyPrize() {
  308. return this.detail.postBizData.rewardType === RewardType.money;
  309. }
  310. },
  311. components: {
  312. FontAmount,
  313. },
  314. head() {
  315. return {
  316. type: '',
  317. title: this.title,
  318. appVersionCode: 3,
  319. meta: [
  320. // facebook
  321. {
  322. name: 'og:url',
  323. content: this.jumpUrl + this.detail.postId
  324. },
  325. {
  326. name: 'og:title',
  327. content: this.metaTitle
  328. },
  329. {
  330. name: 'og:image',
  331. content: this.detail.postBizData.imagePath || this.detail.postBizData.customPosterUninstalled || ''
  332. },
  333. // twitter
  334. {
  335. name: 'twitter:card',
  336. content: 'summary_large_image'
  337. },
  338. {
  339. name: 'twitter:url',
  340. content: this.jumpUrl + this.detail.postId
  341. },
  342. {
  343. name: 'twitter:title',
  344. content: this.metaTitle
  345. },
  346. {
  347. name: 'twitter:image',
  348. content: this.detail.postBizData.imagePath || this.detail.postBizData.customPosterUninstalled || ''
  349. }
  350. ]
  351. }
  352. },
  353. methods: {
  354. copyLinkHandle() {
  355. Report.reportLog({
  356. baseInfo: {
  357. appVersionCode: this.appVersionCode,
  358. mid: this.mid,
  359. pageSource: Report.pageSource.mobileLandingPage,
  360. appType,
  361. machineCode: this.mid
  362. },
  363. params: {
  364. eventData: {
  365. businessType: Report.businessType.buttonClick,
  366. objectType: Report.objectType.copyLinkButton,
  367. postId: this.detail.postId,
  368. srcContentId: this.detail.srcContentId,
  369. senderId: this.detail.srcUserId,
  370. }
  371. }
  372. })
  373. },
  374. clickOpenChrome() {
  375. window.open('https://www.google.com/chrome')
  376. let extParams = this.isMobile() ? {} : { status: this.reportStatus }
  377. Report.reportLog({
  378. baseInfo: {
  379. appVersionCode: this.appVersionCode,
  380. mid: this.mid,
  381. pageSource: Report.pageSource.newUserLandingPage,
  382. appType,
  383. machineCode: this.mid
  384. },
  385. params: {
  386. eventData: {
  387. businessType: Report.businessType.buttonClick,
  388. objectType: Report.objectType.installButton,
  389. postId: this.detail.postId,
  390. srcContentId: this.detail.srcContentId,
  391. senderId: this.detail.srcUserId,
  392. },
  393. extParams: extParams
  394. }
  395. })
  396. },
  397. isMobile() {
  398. 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);
  399. return flag;
  400. },
  401. installExtension() {
  402. let { extensionsInstallChannel, extensionsInstallUrl } = this.config;
  403. let url = extensionsInstallUrl;
  404. let extParams = this.isMobile() ? {} : { status: this.reportStatus }
  405. Report.reportLog({
  406. baseInfo: {
  407. appVersionCode: this.appVersionCode,
  408. mid: this.mid,
  409. pageSource: Report.pageSource.newUserLandingPage,
  410. appType,
  411. machineCode: this.mid
  412. },
  413. params: {
  414. eventData: {
  415. businessType: Report.businessType.buttonClick,
  416. objectType: Report.objectType.installButton,
  417. postId: this.detail.postId,
  418. srcContentId: this.detail.srcContentId,
  419. senderId: this.detail.srcUserId,
  420. },
  421. extParams: extParams,
  422. }
  423. })
  424. switch (extensionsInstallChannel) {
  425. case "officeDownload":
  426. location.href = url;
  427. this.$router.push({
  428. path: '/install'
  429. })
  430. break;
  431. case "chromeAppStore":
  432. window.open(extensionsInstallUrl)
  433. break;
  434. }
  435. },
  436. formatTime(time, _type = 'MM-DD HH:mm:ss') {
  437. return moment(time).format(_type)
  438. },
  439. guid() {
  440. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  441. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  442. return v.toString(16);
  443. });
  444. },
  445. handleScroll(e) {
  446. e = e.target
  447. if (this.luck_list_end) {
  448. return
  449. }
  450. if ((e.clientHeight + e.scrollTop) / e.scrollHeight > .8) {
  451. this.luck_list_end = false
  452. this.page_index++
  453. this.getReceivedList()
  454. }
  455. },
  456. getFontSize(amount) {
  457. let _num = parseInt(360 / amount.length);
  458. this.amount_font_size = _num < 46 ? _num : 46;
  459. },
  460. setCookieMid() {
  461. let _cookie_mid_arr = Cookies.get('mid') || []
  462. if (_cookie_mid_arr.length > 0) {
  463. this.mid = JSON.parse(_cookie_mid_arr)[0].mid
  464. } else {
  465. this.mid = this.guid()
  466. Cookies.set('mid', JSON.stringify([{ mid: this.mid }]), { expires: 1000 })
  467. }
  468. },
  469. async getRedPacket() {
  470. this.currencyIconPath = this.detail.postBizData.currencyIconPath
  471. let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/receiveLuckdrop`, {
  472. baseInfo: {
  473. appVersionCode: this.appVersionCode,
  474. mid: this.mid
  475. },
  476. params: {
  477. postId: this.detail.postId || ''
  478. }
  479. })
  480. this.show_home = true
  481. switch (data.code.toString()) {
  482. case '0':
  483. this.getDetail()
  484. if (data.data.receiveAmount == '0') {
  485. this.reportStatus = 'empty'
  486. this.status = 'nothing'
  487. } else {
  488. if (data.data.newReceived) {
  489. this.status = 'not-open'
  490. setTimeout(() => {
  491. this.status = 'open'
  492. }, 3000)
  493. this.receiveAmount = data.data.receiveAmount
  494. } else {
  495. this.status = 'opened'
  496. }
  497. }
  498. this.getValidity(data.data.endTimestamp)
  499. this.receiveAmount = data.data.receiveAmount
  500. this.getFontSize(this.receiveAmount)
  501. break;
  502. case '2003':
  503. // this.status = 'expire'
  504. this.reportStatus = 'empty'
  505. this.getDetail()
  506. this.status = 'nothing'
  507. break
  508. // 红包被领完了
  509. case '2008':
  510. this.reportStatus = 'empty'
  511. this.getDetail()
  512. this.status = 'nothing'
  513. break
  514. case '2029':
  515. // 推文未发布
  516. this.status = 'error'
  517. break
  518. default:
  519. console.log('getRedPacket', data)
  520. // this.show_home = false
  521. this.reportStatus = 'empty'
  522. this.getDetail()
  523. this.status = 'nothing'
  524. break;
  525. }
  526. // 领取列表分页
  527. this.getReceivedList()
  528. },
  529. async getReceivedList() {
  530. let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/getReceivedList`, {
  531. baseInfo: {
  532. appVersionCode: this.appVersionCode,
  533. mid: this.mid
  534. },
  535. params: {
  536. pageNum: this.page_index,
  537. pageSize: this.page_size,
  538. postId: this.detail.postId || ''
  539. }
  540. })
  541. if (data.code == 0) {
  542. if (data.data.length > 0) {
  543. this.luck_list = this.luck_list.concat(data.data)
  544. this.luck_list_end = false
  545. } else {
  546. this.luck_list_end = true
  547. }
  548. } else {
  549. console.log('getReceivedList', data)
  550. }
  551. },
  552. getValidity(end_time) {
  553. let _d1, _d2, _d3, _h, _m, _s
  554. let timer = setInterval(() => {
  555. let _time = new Date().getTime()
  556. _d3 = end_time - _time
  557. if (_d3 > 0) {
  558. _d1 = moment(end_time)
  559. _d2 = moment(_time)
  560. _h = moment.duration(_d1.diff(_d2)).hours()
  561. _m = moment.duration(_d1.diff(_d2)).minutes()
  562. _s = moment.duration(_d1.diff(_d2)).seconds()
  563. if (_h < 10) {
  564. _h = '0' + _h
  565. }
  566. if (_m < 10) {
  567. _m = '0' + _m
  568. }
  569. if (_s < 10) {
  570. _s = '0' + _s
  571. }
  572. this.validity = `${_h}:${_m}:${_s}`
  573. } else {
  574. clearInterval(timer)
  575. }
  576. }, 1000)
  577. },
  578. setPickupInfo() {
  579. let pickupInfo = {
  580. srcContentId: this.detail.srcContentId,
  581. postNickName: this.detail.postBizData.postUserInfo.nickName,
  582. createTime: Date.now(),
  583. };
  584. Cookies.set('pickup_info', JSON.stringify(pickupInfo), { expires: 100 });
  585. },
  586. async getDetail() {
  587. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  588. baseInfo: {
  589. appVersionCode: this.appVersionCode,
  590. mid: this.mid
  591. },
  592. params: {
  593. postId: this.detail.postId
  594. }
  595. })
  596. if (data.code == 0) {
  597. this.detail.postBizData = JSON.parse(data.data.postBizData)
  598. }
  599. },
  600. async getConfig() {
  601. let { data } = await axios.post(`${baseURL}/denet/base/config/getFrontConfig`, {
  602. baseInfo: {
  603. appVersionCode: this.appVersionCode,
  604. mid: this.mid
  605. },
  606. params: {
  607. }
  608. })
  609. if (data.code == 0) {
  610. this.config = data.data;
  611. }
  612. },
  613. },
  614. async asyncData(params) {
  615. let { route } = params;
  616. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  617. baseInfo: {
  618. appVersionCode: appVersionCode,
  619. mid: function () {
  620. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  621. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  622. return v.toString(16);
  623. });
  624. }()
  625. },
  626. params: {
  627. postId: route.params.id || ''
  628. }
  629. })
  630. if (data.code == 0) {
  631. if (data.data && data.data.postBizData && typeof data.data.postBizData == 'string') {
  632. data.data.postBizData = JSON.parse(data.data.postBizData)
  633. }
  634. if(data.data.postBizData === null) {
  635. data.data.postBizData = {
  636. postUserInfo: {
  637. }
  638. }
  639. }
  640. return {
  641. detail: data.data,
  642. }
  643. }
  644. },
  645. mounted() {
  646. this.getConfig()
  647. if (!this.detail.postId) {
  648. return
  649. }
  650. console.log(this.detail)
  651. //改变font-size
  652. // (function (doc, win) {
  653. // var docEI = doc.documentElement,
  654. // resizeEvt = 'orientationchange' in window ? 'orientataionchange' : 'resize',
  655. // recalc = function () {
  656. // var clientWidth = docEI.clientWidth;
  657. // if (!clientWidth) return;
  658. // //100是字体大小,1510是开发时浏览器窗口的宽度,等比计算
  659. // docEI.style.fontSize = 10 * (clientWidth / 1510) + 'px';
  660. // }
  661. // if (!doc.addEventListener) return;
  662. // win.addEventListener(resizeEvt, recalc, false);
  663. // doc.addEventListener('DOMContentLoaded', recalc, false);
  664. // })(document, window);
  665. document.documentElement.style.fontSize = '62.5%'
  666. if (this.isMobile()) {
  667. this.setCookieMid();
  668. setTimeout(() => {
  669. Report.reportLog({
  670. baseInfo: {
  671. appVersionCode: this.appVersionCode,
  672. mid: this.mid,
  673. pageSource: Report.pageSource.mobileLandingPage,
  674. appType,
  675. machineCode: this.mid
  676. },
  677. params: {
  678. eventData: {
  679. businessType: Report.businessType.pageView,
  680. postId: this.detail.postId,
  681. srcContentId: this.detail.srcContentId,
  682. senderId: this.detail.srcUserId,
  683. }
  684. }
  685. })
  686. }, 500)
  687. this.show_moblie = true
  688. this.cp_link = window.location.href
  689. // 复制链接
  690. var clipboard = new ClipboardJS('.btn');
  691. clipboard.on('success', function (e) {
  692. Toast('copy success');
  693. console.info('Action:', e.action);
  694. console.info('Text:', e.text);
  695. console.info('Trigger:', e.trigger);
  696. e.clearSelection();
  697. });
  698. clipboard.on('error', function (e) {
  699. this.layer_show = true
  700. console.error('Action:', e.action);
  701. console.error('Trigger:', e.trigger);
  702. });
  703. // 领取列表分页
  704. this.getReceivedList()
  705. } else if (isBrowser() == 'chrome') {
  706. // 领取任务红包
  707. this.setCookieMid()
  708. // 是否被领完
  709. if(this.detail.postBizData.receiveCount < this.detail.postBizData.totalCount){
  710. this.getRedPacket()
  711. }else{
  712. this.show_home = true
  713. this.status = 'nothing'
  714. this.reportStatus = 'empty'
  715. }
  716. this.setPickupInfo()
  717. setTimeout(() => {
  718. Report.reportLog({
  719. baseInfo: {
  720. appVersionCode: this.appVersionCode,
  721. mid: this.mid,
  722. pageSource: Report.pageSource.newUserLandingPage,
  723. appType,
  724. machineCode: this.mid
  725. },
  726. params: {
  727. eventData: {
  728. businessType: Report.businessType.pageView,
  729. postId: this.detail.postId,
  730. srcContentId: this.detail.srcContentId,
  731. senderId: this.detail.srcUserId,
  732. },
  733. extParams: {
  734. status: this.reportStatus,
  735. }
  736. }
  737. });
  738. }, 1000)
  739. } else {
  740. this.show_home = true
  741. this.status = 'no-chrome'
  742. this.reportStatus = 'not-chrome'
  743. Report.reportLog({
  744. baseInfo: {
  745. appVersionCode: this.appVersionCode,
  746. mid: this.mid,
  747. pageSource: Report.pageSource.newUserLandingPage,
  748. appType,
  749. machineCode: this.mid
  750. },
  751. params: {
  752. eventData: {
  753. businessType: Report.businessType.pageView,
  754. postId: this.detail.postId,
  755. srcContentId: this.detail.srcContentId,
  756. senderId: this.detail.srcUserId,
  757. },
  758. extParams: {
  759. status: this.reportStatus,
  760. }
  761. }
  762. })
  763. }
  764. }
  765. }
  766. </script>
  767. <style lang="scss" >
  768. html,
  769. body,
  770. #__nuxt,
  771. #__layout {
  772. width: 100%;
  773. height: 100%;
  774. padding: 0;
  775. margin: 0;
  776. }
  777. .moblie {
  778. display: flex;
  779. flex-wrap: wrap;
  780. height: 100%;
  781. align-content: flex-start;
  782. flex-direction: column;
  783. .layer {
  784. position: fixed;
  785. width: 100%;
  786. height: 100%;
  787. top: 0;
  788. left: 0;
  789. background: rgba(0, 0, 0, .5);
  790. .layer-box {
  791. width: 30rem;
  792. height: 17rem;
  793. background: #FFFFFF;
  794. border-radius: 11px;
  795. opacity: 1;
  796. position: absolute;
  797. top: 25rem;
  798. left: 50%;
  799. margin-left: -15rem;
  800. .layer-txt {
  801. margin: 3rem 0;
  802. width: 100%;
  803. padding: 0 2.7rem;
  804. font-weight: 600;
  805. font-size: 1.8rem;
  806. text-align: center;
  807. }
  808. .layer-btn {
  809. width: 19rem;
  810. height: 4rem;
  811. background: #389AFF;
  812. border-radius: 100px;
  813. margin: 0 auto;
  814. text-align: center;
  815. line-height: 4rem;
  816. color: #fff;
  817. font-weight: 600;
  818. font-size: 1.8rem;
  819. }
  820. }
  821. }
  822. .head-area {
  823. width: 100%;
  824. height: 11rem;
  825. text-align: center;
  826. letter-spacing: 0.3px;
  827. font-size: 2rem;
  828. text-align: center;
  829. color: #fff;
  830. background: #389AFF;
  831. border-radius: 0 586px 586px/0 0 104px 104px;
  832. display: flex;
  833. align-items: center;
  834. justify-content: center;
  835. .gift {
  836. margin-right: 1.4rem;
  837. img {
  838. width: 5.2rem;
  839. }
  840. }
  841. .txt {
  842. font-size: 1.8rem;
  843. text-align: left;
  844. }
  845. }
  846. .luck-list-title {
  847. /* margin-top: 47px;*/
  848. margin: 0 16px;
  849. padding: 14px 0 11px 0;
  850. background: #fff;
  851. display: flex;
  852. justify-content: space-between;
  853. color: #B0B0B0;
  854. border-bottom: 1px solid #D1D1D1;
  855. }
  856. .luck-list {
  857. flex: 1;
  858. width: 100%;
  859. overflow-y: auto;
  860. .luck-item {
  861. display: flex;
  862. padding: 12px 0;
  863. margin: 0 16px;
  864. border-bottom: 1px solid #F2F2F2;
  865. justify-content: space-between;
  866. position: relative;
  867. img:first-child {
  868. border-radius: 50%;
  869. }
  870. .luck-king {
  871. position: absolute;
  872. top: 36px;
  873. right: 0px;
  874. display: flex;
  875. align-items: center;
  876. img {
  877. width: 22px;
  878. height: 19px;
  879. margin: 0;
  880. }
  881. span {
  882. font-weight: 500;
  883. font-size: 12px;
  884. line-height: 14px;
  885. letter-spacing: 0.3px;
  886. color: #f5b945;
  887. }
  888. }
  889. img {
  890. width: 42px;
  891. height: 42px;
  892. margin-right: 12px;
  893. }
  894. .luck-content {
  895. flex: auto;
  896. .luck-title {
  897. font-weight: 500;
  898. font-size: 16px;
  899. letter-spacing: 0.3px;
  900. color: #444444;
  901. }
  902. .luck-time {
  903. font-weight: 400;
  904. font-size: 12px;
  905. line-height: 14px;
  906. color: #9b9b9b;
  907. }
  908. }
  909. .luck-money {
  910. display: flex;
  911. height: 17px;
  912. align-items: center;
  913. img {
  914. width: 14px;
  915. height: 14px;
  916. margin-right: 6px;
  917. }
  918. .luck-money-txt {
  919. font-weight: 500;
  920. font-size: 14px;
  921. /* identical to box height */
  922. text-align: right;
  923. letter-spacing: 0.3px;
  924. color: #444444;
  925. }
  926. }
  927. .luck-custom-prize {
  928. font-weight: 500;
  929. font-size: 14px;
  930. letter-spacing: 0.3px;
  931. color: #F5B945;
  932. }
  933. }
  934. .luck-item:last-child {
  935. border: 0;
  936. }
  937. }
  938. .area-cp-link {
  939. background: #fff;
  940. width: 100%;
  941. flex-wrap: wrap;
  942. height: 20rem;
  943. box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
  944. border-top-left-radius: 1rem;
  945. border-top-right-radius: 1rem;
  946. .area-list {
  947. width: 34.3rem;
  948. margin: 1.5rem auto;
  949. .item {
  950. clear: both;
  951. overflow: hidden;
  952. margin: 0.7rem 0;
  953. font-size: 1.6rem;
  954. font-weight: 500;
  955. .icon {
  956. float: left;
  957. margin-right: 0.8rem;
  958. }
  959. .font {
  960. float: left;
  961. margin-right: 0.8rem;
  962. }
  963. .pc {
  964. float: left;
  965. }
  966. }
  967. }
  968. .area-content {
  969. background: #F4F4F4;
  970. padding: 0.7rem 1rem;
  971. margin: 0 auto 1rem;
  972. width: 34.3rem;
  973. font-size: 1.3rem;
  974. border-radius: 0.5rem;
  975. word-break: break-all;
  976. }
  977. .area-btn {
  978. flex: 1;
  979. display: flex;
  980. justify-content: center;
  981. .btn {
  982. width: 34.3rem;
  983. height: 4rem;
  984. background: #389AFF;
  985. border-radius: 100px;
  986. font-size: 1.8rem;
  987. color: #FFFFFF;
  988. }
  989. }
  990. }
  991. }
  992. .content {
  993. width: 100%;
  994. height: 100%;
  995. background-size: 100%;
  996. background-repeat: no-repeat;
  997. position: relative;
  998. font-family: "SF Pro Display";
  999. font-style: normal;
  1000. font-weight: 600;
  1001. .head-in-custom {
  1002. position: absolute;
  1003. top: 9rem;
  1004. left: 30rem;
  1005. background: #fff;
  1006. display: flex;
  1007. align-items: center;
  1008. font-weight: 500;
  1009. font-size: 15px;
  1010. color: #000;
  1011. height: 54px;
  1012. img {
  1013. width: 30px;
  1014. height: 30px;
  1015. border-radius: 50%;
  1016. margin-right: 10px;
  1017. }
  1018. }
  1019. .not-open {
  1020. display: flex;
  1021. align-items: center;
  1022. justify-content: center;
  1023. width: 100%;
  1024. height: 100%;
  1025. img {
  1026. width: 20rem;
  1027. height: 20rem;
  1028. }
  1029. }
  1030. .logo {
  1031. position: absolute;
  1032. left: 4rem;
  1033. top: 1.5rem;
  1034. img {
  1035. width: 10.7rem;
  1036. height: 3.4rem;
  1037. }
  1038. }
  1039. .key_packet {
  1040. animation: key_packet 3s;
  1041. animation-delay: 0s;
  1042. animation-fill-mode: forwards;
  1043. }
  1044. .redBagCustom {
  1045. display: flex;
  1046. justify-content: flex-start;
  1047. flex-direction: column;
  1048. position: absolute;
  1049. top: 16rem;
  1050. left: 30.6rem;
  1051. width: 37.5rem;
  1052. border-radius: 2rem;
  1053. overflow-y: hidden;
  1054. box-shadow: 0 0.3rem 2rem rgba(0, 0, 0, 0.2);
  1055. background: #fff;
  1056. .customImg {
  1057. width: 100%;
  1058. min-height: 373px;
  1059. }
  1060. .customBottom {
  1061. width: 100%;
  1062. background:#111214;
  1063. padding: 10px 16px;
  1064. font-weight: 500;
  1065. font-size: 12px;
  1066. line-height: 14px;
  1067. letter-spacing: 0.3px;
  1068. color: #838383;
  1069. line-height: 20px;
  1070. .theme {
  1071. display: flex;
  1072. height: 20px;
  1073. align-items: center;
  1074. justify-content: flex-start;
  1075. .icon {
  1076. width: 12px;
  1077. }
  1078. .time {
  1079. margin: 0 4px;
  1080. color: #1D9BF0;
  1081. }
  1082. }
  1083. .winner-info {
  1084. display: flex;
  1085. height: 20px;
  1086. align-items: center;
  1087. justify-content: flex-start;
  1088. .count{
  1089. color: #1D9BF0;
  1090. margin-right: 4px;
  1091. }
  1092. .prize-name {
  1093. color: #1D9BF0;
  1094. margin-left: 4px;
  1095. }
  1096. }
  1097. }
  1098. }
  1099. .redBag {
  1100. display: flex;
  1101. justify-content: flex-start;
  1102. flex-direction: column;
  1103. position: absolute;
  1104. top: 14rem;
  1105. left: 30.6rem;
  1106. width: 37.5rem;
  1107. height: 50rem;
  1108. border-radius: 2rem;
  1109. overflow-y: hidden;
  1110. box-shadow: 0 0 5px #888888;
  1111. background: #fff;
  1112. &.auto-height {
  1113. height: auto;
  1114. }
  1115. .money-area {
  1116. width: 100%;
  1117. position: absolute;
  1118. top: 65px;
  1119. display: flex;
  1120. flex-wrap: wrap;
  1121. align-items: center;
  1122. justify-content: center;
  1123. .txt {
  1124. font-weight: 800;
  1125. font-size: 16px;
  1126. text-align: center;
  1127. letter-spacing: 0.3px;
  1128. color: #FFFFFF;
  1129. }
  1130. .coin {
  1131. text-align: center;
  1132. margin-top: 6px;
  1133. margin-bottom: 7px;
  1134. display: flex;
  1135. justify-content: center;
  1136. align-items: center;
  1137. width: 90%;
  1138. img {
  1139. width: 46px;
  1140. height: 46px;
  1141. border-radius: 50%;
  1142. border: 3px solid #FFFFFF;
  1143. }
  1144. span {
  1145. margin-left: 15px;
  1146. font-weight: 800;
  1147. font-size: 60px;
  1148. line-height: 76px;
  1149. color: #FFFFFF;
  1150. }
  1151. }
  1152. .people {
  1153. font-weight: 800;
  1154. font-size: 13px;
  1155. line-height: 16px;
  1156. letter-spacing: 0.05em;
  1157. text-align: center;
  1158. color: #FFFFFF;
  1159. }
  1160. }
  1161. .title {
  1162. position: absolute;
  1163. top: 15px;
  1164. left: 15px;
  1165. z-index: 3;
  1166. display: flex;
  1167. align-items: center;
  1168. img {
  1169. width: 24px;
  1170. height: 24px;
  1171. border: 2px solid #FFF;
  1172. border-radius: 50%;
  1173. }
  1174. span {
  1175. margin-left: 10px;
  1176. font-weight: 600;
  1177. font-size: 16px;
  1178. letter-spacing: 0.3px;
  1179. color: #fff;
  1180. }
  1181. }
  1182. img {
  1183. width: 100%;
  1184. }
  1185. .up {
  1186. position: absolute;
  1187. top: 0;
  1188. z-index: 1;
  1189. }
  1190. .down {
  1191. position: absolute;
  1192. top: 253px;
  1193. }
  1194. .open {
  1195. width: 335px;
  1196. height: 50px;
  1197. cursor: pointer;
  1198. position: absolute;
  1199. bottom: 28px;
  1200. left: 50%;
  1201. margin-left: -167.5px;
  1202. z-index: 4;
  1203. }
  1204. .open-gif {
  1205. width: 200px;
  1206. height: 200px;
  1207. text-align: center;
  1208. position: absolute;
  1209. bottom: 70px;
  1210. left: 50%;
  1211. margin-left: -100px;
  1212. z-index: 3;
  1213. }
  1214. }
  1215. .redPacket {
  1216. display: flex;
  1217. justify-content: flex-start;
  1218. flex-direction: column;
  1219. position: absolute;
  1220. top: 9rem;
  1221. left: 50%;
  1222. width: 37.5rem;
  1223. margin-left: -18rem;
  1224. height: 65rem;
  1225. border-radius: 2rem;
  1226. // background: red;
  1227. overflow-y: hidden;
  1228. box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.1);
  1229. background: #fff;
  1230. .top {
  1231. top: 0;
  1232. position: absolute;
  1233. width: 100%;
  1234. z-index: 12;
  1235. }
  1236. .down {
  1237. bottom: 0;
  1238. position: absolute;
  1239. height: 32.3rem;
  1240. z-index: 11;
  1241. }
  1242. .head {
  1243. position: relative;
  1244. .head-title {
  1245. position: absolute;
  1246. top: 0;
  1247. width: 100%;
  1248. display: flex;
  1249. align-items: center;
  1250. justify-content: center;
  1251. height: 3.6rem;
  1252. background: rgba(255, 255, 255, .1);
  1253. img {
  1254. width: 1.8rem;
  1255. height: 1.8rem;
  1256. border-radius: 50%;
  1257. border: 1px solid #fff;
  1258. }
  1259. span {
  1260. margin-left: .8rem;
  1261. font-size: 1.2rem;
  1262. color: #fff;
  1263. }
  1264. }
  1265. .head-txt {
  1266. margin-top: 4.7rem;
  1267. font-size: 2rem;
  1268. text-align: center;
  1269. color: #fff;
  1270. }
  1271. .head-area {
  1272. height: 19rem;
  1273. text-align: center;
  1274. letter-spacing: 0.3px;
  1275. font-size: 2rem;
  1276. text-align: center;
  1277. color: #fff;
  1278. background: #389AFF;
  1279. border-radius: 0 586px 586px/0 0 164px 164px;
  1280. .txt {
  1281. padding-top: 8.5rem;
  1282. }
  1283. }
  1284. .head-money {
  1285. .txt {
  1286. padding-top: 6.8rem;
  1287. font-weight: 800;
  1288. font-size: 1.5rem;
  1289. text-align: center;
  1290. letter-spacing: 0.3px;
  1291. }
  1292. .head-money-area {
  1293. display: flex;
  1294. width: 100%;
  1295. justify-content: center;
  1296. align-items: center;
  1297. img {
  1298. width: 4rem;
  1299. height: 4rem;
  1300. border: 2px solid #FFFFFF;
  1301. border-radius: 100px;
  1302. }
  1303. span {
  1304. margin-left: 1.3rem;
  1305. font-size: 4.6rem;
  1306. word-break: break-all;
  1307. }
  1308. }
  1309. }
  1310. }
  1311. .luck-list-title {
  1312. /* margin-top: 47px;*/
  1313. margin: 0 16px;
  1314. padding: 14px 0 11px 0;
  1315. background: #fff;
  1316. display: flex;
  1317. font-weight: 500;
  1318. justify-content: space-between;
  1319. color: #B0B0B0;
  1320. border-bottom: 1px solid #F2F2F2;
  1321. }
  1322. .luck-list {
  1323. background: #fff;
  1324. overflow-y: auto;
  1325. .luck-item {
  1326. display: flex;
  1327. padding: 12px 0;
  1328. margin: 0 16px;
  1329. border-bottom: 1px solid #F2F2F2;
  1330. justify-content: space-between;
  1331. position: relative;
  1332. img:first-child {
  1333. border-radius: 50%;
  1334. }
  1335. .luck-king {
  1336. position: absolute;
  1337. top: 36px;
  1338. right: 0px;
  1339. display: flex;
  1340. align-items: center;
  1341. img {
  1342. width: 22px;
  1343. height: 19px;
  1344. margin: 0;
  1345. }
  1346. span {
  1347. font-weight: 500;
  1348. font-size: 12px;
  1349. line-height: 14px;
  1350. letter-spacing: 0.3px;
  1351. color: #f5b945;
  1352. }
  1353. }
  1354. img {
  1355. width: 42px;
  1356. height: 42px;
  1357. margin-right: 12px;
  1358. }
  1359. .luck-content {
  1360. flex: auto;
  1361. .luck-title {
  1362. font-weight: 500;
  1363. font-size: 16px;
  1364. letter-spacing: 0.3px;
  1365. color: #444444;
  1366. margin-bottom: 5px;
  1367. }
  1368. .luck-time {
  1369. font-weight: 400;
  1370. font-size: 12px;
  1371. line-height: 14px;
  1372. color: #B0B0B0;
  1373. }
  1374. }
  1375. .luck-money {
  1376. display: flex;
  1377. height: 17px;
  1378. align-items: center;
  1379. img {
  1380. width: 14px;
  1381. height: 14px;
  1382. margin-right: 6px;
  1383. }
  1384. .luck-money-txt {
  1385. font-weight: 500;
  1386. font-size: 14px;
  1387. /* identical to box height */
  1388. text-align: right;
  1389. letter-spacing: 0.3px;
  1390. color: #444444;
  1391. }
  1392. }
  1393. .luck-custom-prize {
  1394. font-weight: 500;
  1395. font-size: 14px;
  1396. letter-spacing: 0.3px;
  1397. color: #F5B945;
  1398. }
  1399. }
  1400. .luck-item:last-child {
  1401. border: 0;
  1402. }
  1403. }
  1404. .area {
  1405. position: absolute;
  1406. z-index: 112;
  1407. width: 100%;
  1408. .title {
  1409. z-index: 11;
  1410. margin-top: 8.5rem;
  1411. text-align: center;
  1412. img {
  1413. width: 3.6rem;
  1414. height: 3.6rem;
  1415. border: 2px solid #fff4db;
  1416. border-radius: 50%;
  1417. }
  1418. span {
  1419. letter-spacing: 0.3px;
  1420. font-size: 1.6rem;
  1421. color: #fff2d3;
  1422. }
  1423. }
  1424. .txt {
  1425. font-size: 4rem;
  1426. text-align: center;
  1427. letter-spacing: 0.03rem;
  1428. color: #fff2d3;
  1429. }
  1430. }
  1431. .key_area {
  1432. animation: key_area 1s;
  1433. animation-delay: 1s;
  1434. animation-fill-mode: forwards;
  1435. }
  1436. }
  1437. .redPacket2 {
  1438. left: 43.6rem;
  1439. margin-left: -18rem;
  1440. }
  1441. .key_install {
  1442. opacity: 0;
  1443. animation: key_install 2s;
  1444. animation-delay: 0s;
  1445. animation-fill-mode: forwards;
  1446. }
  1447. .install {
  1448. position: absolute;
  1449. top: 20rem;
  1450. left: 73.5rem;
  1451. .title {
  1452. font-size: 4.8rem;
  1453. color: #000000;
  1454. letter-spacing: 0.3px;
  1455. }
  1456. .validity {
  1457. margin-top: 1rem;
  1458. color: #FF0000;
  1459. width: 40rem;
  1460. height: 3.3rem;
  1461. line-height: 3.3rem;
  1462. font-weight: normal;
  1463. span {
  1464. font-size: 1.4rem;
  1465. }
  1466. }
  1467. .flow {
  1468. position: absolute;
  1469. margin-top: 4rem;
  1470. .line {
  1471. position: absolute;
  1472. height: 16rem;
  1473. border: 1px solid #e0e0e0;
  1474. top: 3rem;
  1475. left: 1.2rem;
  1476. }
  1477. .area_num {
  1478. display: flex;
  1479. align-items: center;
  1480. .num {
  1481. width: 2.4rem;
  1482. height: 2.4rem;
  1483. background-color: rgba(56, 154, 255, 1);
  1484. border-radius: 50%;
  1485. color: #fff;
  1486. text-align: center;
  1487. line-height: 2.4rem;
  1488. font-size: 1.4rem;
  1489. }
  1490. span {
  1491. margin-left: 1.5rem;
  1492. color: #000000;
  1493. font-size: 1.8rem;
  1494. }
  1495. }
  1496. .tip {
  1497. margin-left: 4rem;
  1498. margin-top: 0.7rem;
  1499. font-size: 1.4rem;
  1500. color: #a4a4a4;
  1501. }
  1502. .install_btn {
  1503. cursor: pointer;
  1504. margin-left: 4rem;
  1505. margin-top: 2rem;
  1506. margin-bottom: 6.7rem;
  1507. width: 23rem;
  1508. height: 5.8rem;
  1509. background: #389aff;
  1510. border-radius: 10rem;
  1511. color: #fff;
  1512. line-height: 5.8rem;
  1513. text-align: center;
  1514. font-size: 2rem;
  1515. }
  1516. }
  1517. .tip {
  1518. margin-top: 0.7rem;
  1519. font-size: 1.4rem;
  1520. color: #a4a4a4;
  1521. }
  1522. .install_btn {
  1523. cursor: pointer;
  1524. margin-top: 2rem;
  1525. margin-bottom: 6.7rem;
  1526. width: 23rem;
  1527. height: 5.8rem;
  1528. background: #389aff;
  1529. border-radius: 10rem;
  1530. color: #fff;
  1531. line-height: 5.8rem;
  1532. text-align: center;
  1533. font-size: 2rem;
  1534. }
  1535. }
  1536. .install-error {
  1537. left: 78.5rem;
  1538. .install_chrome {
  1539. cursor: pointer;
  1540. width: 24.3rem;
  1541. height: 5.8rem;
  1542. font-size: 2rem;
  1543. font-weight: 500;
  1544. letter-spacing: 0.3px;
  1545. display: flex;
  1546. align-items: center;
  1547. background: #FFFFFF;
  1548. border: 1px solid #e8e8e8;
  1549. border-radius: 10rem;
  1550. margin-top: 3.3rem;
  1551. img {
  1552. width: 3.2rem;
  1553. height: 3.2rem;
  1554. margin-left: 3.3rem;
  1555. }
  1556. span {
  1557. margin-left: 1.2rem;
  1558. }
  1559. }
  1560. }
  1561. }
  1562. @keyframes key_area {
  1563. 0% {
  1564. opacity: 1;
  1565. }
  1566. 100% {
  1567. opacity: 0;
  1568. }
  1569. }
  1570. @keyframes key_install {
  1571. 0% {
  1572. opacity: 0;
  1573. }
  1574. 100% {
  1575. opacity: 1;
  1576. }
  1577. }
  1578. @keyframes key_packet {
  1579. 0% {}
  1580. 100% {
  1581. left: 30.6rem;
  1582. margin-left: -18rem;
  1583. }
  1584. }
  1585. </style>