index.vue 37 KB

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