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, getDetailSSR } 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. postId: this.detail.postId || '',
  550. };
  551. Cookies.set('jump_info', JSON.stringify(pickupInfo), { expires: 100 });
  552. },
  553. async getDetail() {
  554. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  555. baseInfo: {
  556. appVersionCode: this.appVersionCode,
  557. mid: this.mid,
  558. },
  559. params: {
  560. postId: this.detail.postId,
  561. },
  562. });
  563. if (data.code == 0) {
  564. this.detail.postBizData = JSON.parse(data.data.postBizData);
  565. this.customCover = this.detail.postBizData && this.detail.postBizData.posterType == 2 ? 1 : 0;
  566. this.customGiveaway = this.detail.postBizData && this.detail.postBizData.rewardType == 2 ? 1 : 0;
  567. }
  568. },
  569. async getConfig() {
  570. let { data } = await axios.post(`${baseURL}/denet/base/config/getFrontConfig`, {
  571. baseInfo: {
  572. appVersionCode: this.appVersionCode,
  573. mid: this.mid,
  574. },
  575. params: {},
  576. });
  577. if (data.code == 0) {
  578. this.config = data.data;
  579. }
  580. },
  581. },
  582. async asyncData(context) {
  583. let { route } = context;
  584. let result = await getDetailSSR({
  585. context,
  586. params: {
  587. postId: route.params.id || '',
  588. },
  589. url: `${baseURL}/denet/post/getDetail`,
  590. });
  591. if (result.code == 0) {
  592. if (result.data && result.data.postBizData && typeof result.data.postBizData == 'string') {
  593. result.data.postBizData = JSON.parse(result.data.postBizData);
  594. }
  595. if (result.data.postBizData === null) {
  596. result.data.postBizData = {
  597. postUserInfo: {},
  598. };
  599. }
  600. return {
  601. detail: result.data,
  602. customCover: result.data.postBizData && result.data.postBizData.posterType == 2 ? 1 : 0,
  603. customGiveaway: result.data.postBizData && result.data.postBizData.rewardType == 2 ? 1 : 0,
  604. };
  605. }
  606. },
  607. mounted() {
  608. this.getConfig();
  609. if (!this.detail.postId) {
  610. return;
  611. }
  612. console.log(this.detail);
  613. //改变font-size
  614. // (function (doc, win) {
  615. // var docEI = doc.documentElement,
  616. // resizeEvt = 'orientationchange' in window ? 'orientataionchange' : 'resize',
  617. // recalc = function () {
  618. // var clientWidth = docEI.clientWidth;
  619. // if (!clientWidth) return;
  620. // //100是字体大小,1510是开发时浏览器窗口的宽度,等比计算
  621. // docEI.style.fontSize = 10 * (clientWidth / 1510) + 'px';
  622. // }
  623. // if (!doc.addEventListener) return;
  624. // win.addEventListener(resizeEvt, recalc, false);
  625. // doc.addEventListener('DOMContentLoaded', recalc, false);
  626. // })(document, window);
  627. document.documentElement.style.fontSize = '62.5%';
  628. if (this.isMobile()) {
  629. this.setCookieMid();
  630. setTimeout(() => {
  631. Report.reportLog({
  632. baseInfo: {
  633. appVersionCode: this.appVersionCode,
  634. mid: this.mid,
  635. pageSource: Report.pageSource.mobileLandingPage,
  636. machineCode: this.mid,
  637. },
  638. params: {
  639. eventData: {
  640. businessType: Report.businessType.pageView,
  641. postId: this.detail.postId,
  642. redPacketType: 0,
  643. },
  644. },
  645. });
  646. }, 500);
  647. this.show_moblie = true;
  648. this.cp_link = window.location.href;
  649. // 复制链接
  650. var clipboard = new ClipboardJS('.btn');
  651. clipboard.on('success', function (e) {
  652. Toast('copy success');
  653. console.info('Action:', e.action);
  654. console.info('Text:', e.text);
  655. console.info('Trigger:', e.trigger);
  656. e.clearSelection();
  657. });
  658. clipboard.on('error', function (e) {
  659. this.layer_show = true;
  660. console.error('Action:', e.action);
  661. console.error('Trigger:', e.trigger);
  662. });
  663. // 领取列表分页
  664. this.getReceivedList();
  665. } else if (isBrowser() == 'chrome') {
  666. // 领取任务红包
  667. this.setCookieMid();
  668. // 是否被领完
  669. if (this.detail.postBizData.receiveCount < this.detail.postBizData.totalCount) {
  670. this.getRedPacket();
  671. } else {
  672. this.show_home = true;
  673. this.status = 'nothing';
  674. this.reportStatus = 'empty';
  675. }
  676. this.setPickupInfo();
  677. setTimeout(() => {
  678. Report.reportLog({
  679. baseInfo: {
  680. appVersionCode: this.appVersionCode,
  681. mid: this.mid,
  682. pageSource: Report.pageSource.newUserLandingPage,
  683. appType,
  684. machineCode: this.mid,
  685. },
  686. params: {
  687. eventData: {
  688. businessType: Report.businessType.pageView,
  689. postId: this.detail.postId,
  690. srcContentId: this.detail.srcContentId,
  691. senderId: this.detail.srcUserId,
  692. redPacketType: 0,
  693. customCover: this.customCover,
  694. },
  695. extParams: {
  696. status: this.reportStatus,
  697. },
  698. },
  699. });
  700. }, 1000);
  701. } else {
  702. this.show_home = true;
  703. this.status = 'no-chrome';
  704. this.reportStatus = 'not-chrome';
  705. Report.reportLog({
  706. baseInfo: {
  707. appVersionCode: this.appVersionCode,
  708. mid: this.mid,
  709. pageSource: Report.pageSource.newUserLandingPage,
  710. appType,
  711. machineCode: this.mid,
  712. },
  713. params: {
  714. eventData: {
  715. businessType: Report.businessType.pageView,
  716. postId: this.detail.postId,
  717. srcContentId: this.detail.srcContentId,
  718. senderId: this.detail.srcUserId,
  719. redPacketType: 0,
  720. customCover: this.customCover,
  721. },
  722. extParams: {
  723. status: this.reportStatus,
  724. },
  725. },
  726. });
  727. }
  728. },
  729. };
  730. </script>
  731. <style lang="scss">
  732. html,
  733. body,
  734. #__nuxt,
  735. #__layout {
  736. width: 100%;
  737. height: 100%;
  738. padding: 0;
  739. margin: 0;
  740. }
  741. .moblie {
  742. display: flex;
  743. flex-wrap: wrap;
  744. height: 100%;
  745. align-content: flex-start;
  746. flex-direction: column;
  747. .layer {
  748. position: fixed;
  749. width: 100%;
  750. height: 100%;
  751. top: 0;
  752. left: 0;
  753. background: rgba(0, 0, 0, 0.5);
  754. .layer-box {
  755. width: 30rem;
  756. height: 17rem;
  757. background: #ffffff;
  758. border-radius: 11px;
  759. opacity: 1;
  760. position: absolute;
  761. top: 25rem;
  762. left: 50%;
  763. margin-left: -15rem;
  764. .layer-txt {
  765. margin: 3rem 0;
  766. width: 100%;
  767. padding: 0 2.7rem;
  768. font-weight: 600;
  769. font-size: 1.8rem;
  770. text-align: center;
  771. }
  772. .layer-btn {
  773. width: 19rem;
  774. height: 4rem;
  775. background: #389aff;
  776. border-radius: 100px;
  777. margin: 0 auto;
  778. text-align: center;
  779. line-height: 4rem;
  780. color: #fff;
  781. font-weight: 600;
  782. font-size: 1.8rem;
  783. }
  784. }
  785. }
  786. .head-area {
  787. width: 100%;
  788. height: 11rem;
  789. text-align: center;
  790. letter-spacing: 0.3px;
  791. font-size: 2rem;
  792. text-align: center;
  793. color: #fff;
  794. background: #389aff;
  795. border-radius: 0 586px 586px/0 0 104px 104px;
  796. display: flex;
  797. align-items: center;
  798. justify-content: center;
  799. .gift {
  800. margin-right: 1.4rem;
  801. img {
  802. width: 5.2rem;
  803. }
  804. }
  805. .txt {
  806. font-size: 1.8rem;
  807. text-align: left;
  808. }
  809. }
  810. .luck-list-title {
  811. /* margin-top: 47px;*/
  812. margin: 0 16px;
  813. padding: 14px 0 11px 0;
  814. background: #fff;
  815. display: flex;
  816. justify-content: space-between;
  817. color: #b0b0b0;
  818. border-bottom: 1px solid #d1d1d1;
  819. }
  820. .luck-list {
  821. flex: 1;
  822. width: 100%;
  823. overflow-y: auto;
  824. .luck-item {
  825. display: flex;
  826. padding: 12px 0;
  827. margin: 0 16px;
  828. border-bottom: 1px solid #f2f2f2;
  829. justify-content: space-between;
  830. position: relative;
  831. img:first-child {
  832. border-radius: 50%;
  833. }
  834. .luck-king {
  835. position: absolute;
  836. top: 36px;
  837. right: 0px;
  838. display: flex;
  839. align-items: center;
  840. img {
  841. width: 22px;
  842. height: 19px;
  843. margin: 0;
  844. }
  845. span {
  846. font-weight: 500;
  847. font-size: 12px;
  848. line-height: 14px;
  849. letter-spacing: 0.3px;
  850. color: #f5b945;
  851. }
  852. }
  853. img {
  854. width: 42px;
  855. height: 42px;
  856. margin-right: 12px;
  857. }
  858. .luck-content {
  859. flex: auto;
  860. .luck-title {
  861. font-weight: 500;
  862. font-size: 16px;
  863. letter-spacing: 0.3px;
  864. color: #444444;
  865. }
  866. .luck-time {
  867. font-weight: 400;
  868. font-size: 12px;
  869. line-height: 14px;
  870. color: #9b9b9b;
  871. }
  872. }
  873. .luck-money {
  874. display: flex;
  875. height: 17px;
  876. align-items: center;
  877. img {
  878. width: 14px;
  879. height: 14px;
  880. margin-right: 6px;
  881. }
  882. .luck-money-txt {
  883. font-weight: 500;
  884. font-size: 14px;
  885. /* identical to box height */
  886. text-align: right;
  887. letter-spacing: 0.3px;
  888. color: #444444;
  889. }
  890. }
  891. .luck-custom-prize {
  892. font-weight: 500;
  893. font-size: 14px;
  894. letter-spacing: 0.3px;
  895. color: #f5b945;
  896. }
  897. }
  898. .luck-item:last-child {
  899. border: 0;
  900. }
  901. }
  902. .area-cp-link {
  903. background: #fff;
  904. width: 100%;
  905. flex-wrap: wrap;
  906. height: 18rem;
  907. box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
  908. border-top-left-radius: 1rem;
  909. border-top-right-radius: 1rem;
  910. .area-list {
  911. width: 34.3rem;
  912. margin: 1.5rem auto;
  913. .item {
  914. clear: both;
  915. overflow: hidden;
  916. margin: 0.7rem 0;
  917. font-size: 1.6rem;
  918. font-weight: 500;
  919. .icon {
  920. float: left;
  921. margin-right: 0.8rem;
  922. }
  923. .font {
  924. float: left;
  925. margin-right: 0.8rem;
  926. }
  927. .pc {
  928. float: left;
  929. }
  930. }
  931. }
  932. .area-content {
  933. background: #f4f4f4;
  934. padding: 0.7rem 1rem;
  935. margin: 0 auto 1rem;
  936. width: 34.3rem;
  937. font-size: 1.3rem;
  938. border-radius: 0.5rem;
  939. word-break: break-all;
  940. }
  941. .area-btn {
  942. flex: 1;
  943. display: flex;
  944. justify-content: center;
  945. .btn {
  946. width: 34.3rem;
  947. height: 4rem;
  948. background: #389aff;
  949. border-radius: 100px;
  950. font-size: 1.8rem;
  951. color: #ffffff;
  952. }
  953. }
  954. }
  955. }
  956. .content {
  957. width: 100%;
  958. height: 100%;
  959. background-size: 100%;
  960. background-repeat: no-repeat;
  961. position: relative;
  962. font-family: 'SF Pro Display';
  963. font-style: normal;
  964. font-weight: 600;
  965. .head-in-custom {
  966. position: absolute;
  967. top: 9rem;
  968. left: 30rem;
  969. background: #fff;
  970. display: flex;
  971. align-items: center;
  972. font-weight: 500;
  973. font-size: 15px;
  974. color: #000;
  975. height: 54px;
  976. img {
  977. width: 30px;
  978. height: 30px;
  979. border-radius: 50%;
  980. margin-right: 10px;
  981. }
  982. }
  983. .not-open {
  984. display: flex;
  985. align-items: center;
  986. justify-content: center;
  987. width: 100%;
  988. height: 100%;
  989. img {
  990. width: 20rem;
  991. height: 20rem;
  992. }
  993. }
  994. .logo {
  995. position: absolute;
  996. left: 4rem;
  997. top: 1.5rem;
  998. img {
  999. width: 10.7rem;
  1000. height: 3.4rem;
  1001. }
  1002. }
  1003. .key_packet {
  1004. animation: key_packet 3s;
  1005. animation-delay: 0s;
  1006. animation-fill-mode: forwards;
  1007. }
  1008. .redBagCustom {
  1009. display: flex;
  1010. justify-content: flex-start;
  1011. flex-direction: column;
  1012. position: absolute;
  1013. top: 16rem;
  1014. left: 30.6rem;
  1015. width: 37.5rem;
  1016. border-radius: 2rem;
  1017. overflow-y: hidden;
  1018. box-shadow: 0 0.3rem 2rem rgba(0, 0, 0, 0.2);
  1019. background: #fff;
  1020. .customImg {
  1021. width: 100%;
  1022. min-height: 373px;
  1023. }
  1024. .customBottom {
  1025. width: 100%;
  1026. background: #111214;
  1027. padding: 10px 16px;
  1028. font-weight: 500;
  1029. font-size: 12px;
  1030. line-height: 14px;
  1031. letter-spacing: 0.3px;
  1032. color: #838383;
  1033. line-height: 20px;
  1034. .theme {
  1035. display: flex;
  1036. height: 20px;
  1037. align-items: center;
  1038. justify-content: flex-start;
  1039. .icon {
  1040. width: 12px;
  1041. }
  1042. .time {
  1043. margin: 0 4px;
  1044. color: #1d9bf0;
  1045. }
  1046. }
  1047. .winner-info {
  1048. display: flex;
  1049. height: 20px;
  1050. align-items: center;
  1051. justify-content: flex-start;
  1052. .count {
  1053. color: #1d9bf0;
  1054. margin-right: 4px;
  1055. }
  1056. .prize-name {
  1057. color: #1d9bf0;
  1058. margin-left: 4px;
  1059. }
  1060. }
  1061. }
  1062. }
  1063. .redBag {
  1064. display: flex;
  1065. justify-content: flex-start;
  1066. flex-direction: column;
  1067. position: absolute;
  1068. top: 14rem;
  1069. left: 30.6rem;
  1070. width: 37.5rem;
  1071. height: 50rem;
  1072. border-radius: 2rem;
  1073. overflow-y: hidden;
  1074. box-shadow: 0 0 5px #888888;
  1075. background: #fff;
  1076. &.auto-height {
  1077. height: auto;
  1078. }
  1079. .money-area {
  1080. width: 100%;
  1081. position: absolute;
  1082. top: 65px;
  1083. display: flex;
  1084. flex-wrap: wrap;
  1085. align-items: center;
  1086. justify-content: center;
  1087. .txt {
  1088. font-weight: 800;
  1089. font-size: 16px;
  1090. text-align: center;
  1091. letter-spacing: 0.3px;
  1092. color: #ffffff;
  1093. }
  1094. .coin {
  1095. text-align: center;
  1096. margin-top: 6px;
  1097. margin-bottom: 7px;
  1098. display: flex;
  1099. justify-content: center;
  1100. align-items: center;
  1101. width: 90%;
  1102. img {
  1103. width: 46px;
  1104. height: 46px;
  1105. border-radius: 50%;
  1106. border: 3px solid #ffffff;
  1107. }
  1108. span {
  1109. margin-left: 15px;
  1110. font-weight: 800;
  1111. font-size: 60px;
  1112. line-height: 76px;
  1113. color: #ffffff;
  1114. }
  1115. }
  1116. .people {
  1117. font-weight: 800;
  1118. font-size: 13px;
  1119. line-height: 16px;
  1120. letter-spacing: 0.05em;
  1121. text-align: center;
  1122. color: #ffffff;
  1123. }
  1124. }
  1125. .title {
  1126. position: absolute;
  1127. top: 15px;
  1128. left: 15px;
  1129. z-index: 3;
  1130. display: flex;
  1131. align-items: center;
  1132. img {
  1133. width: 24px;
  1134. height: 24px;
  1135. border: 2px solid #fff;
  1136. border-radius: 50%;
  1137. }
  1138. span {
  1139. margin-left: 10px;
  1140. font-weight: 600;
  1141. font-size: 16px;
  1142. letter-spacing: 0.3px;
  1143. color: #fff;
  1144. }
  1145. }
  1146. img {
  1147. width: 100%;
  1148. }
  1149. .up {
  1150. position: absolute;
  1151. top: 0;
  1152. z-index: 1;
  1153. }
  1154. .down {
  1155. position: absolute;
  1156. top: 253px;
  1157. }
  1158. .open {
  1159. width: 335px;
  1160. height: 50px;
  1161. cursor: pointer;
  1162. position: absolute;
  1163. bottom: 28px;
  1164. left: 50%;
  1165. margin-left: -167.5px;
  1166. z-index: 4;
  1167. }
  1168. .open-gif {
  1169. width: 200px;
  1170. height: 200px;
  1171. text-align: center;
  1172. position: absolute;
  1173. bottom: 70px;
  1174. left: 50%;
  1175. margin-left: -100px;
  1176. z-index: 3;
  1177. }
  1178. }
  1179. .redPacket {
  1180. display: flex;
  1181. justify-content: flex-start;
  1182. flex-direction: column;
  1183. position: absolute;
  1184. top: 9rem;
  1185. left: 50%;
  1186. width: 37.5rem;
  1187. margin-left: -18rem;
  1188. height: 65rem;
  1189. border-radius: 2rem;
  1190. // background: red;
  1191. overflow-y: hidden;
  1192. box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.1);
  1193. background: #fff;
  1194. .top {
  1195. top: 0;
  1196. position: absolute;
  1197. width: 100%;
  1198. z-index: 12;
  1199. }
  1200. .down {
  1201. bottom: 0;
  1202. position: absolute;
  1203. height: 32.3rem;
  1204. z-index: 11;
  1205. }
  1206. .head {
  1207. position: relative;
  1208. .head-title {
  1209. position: absolute;
  1210. top: 0;
  1211. width: 100%;
  1212. display: flex;
  1213. align-items: center;
  1214. justify-content: center;
  1215. height: 3.6rem;
  1216. background: rgba(255, 255, 255, 0.1);
  1217. img {
  1218. width: 1.8rem;
  1219. height: 1.8rem;
  1220. border-radius: 50%;
  1221. border: 1px solid #fff;
  1222. }
  1223. span {
  1224. margin-left: 0.8rem;
  1225. font-size: 1.2rem;
  1226. color: #fff;
  1227. }
  1228. }
  1229. .head-txt {
  1230. margin-top: 4.7rem;
  1231. font-size: 2rem;
  1232. text-align: center;
  1233. color: #fff;
  1234. }
  1235. .head-area {
  1236. height: 19rem;
  1237. text-align: center;
  1238. letter-spacing: 0.3px;
  1239. font-size: 2rem;
  1240. text-align: center;
  1241. color: #fff;
  1242. background: #389aff;
  1243. border-radius: 0 586px 586px/0 0 164px 164px;
  1244. .txt {
  1245. padding-top: 8.5rem;
  1246. }
  1247. }
  1248. .head-money {
  1249. .txt {
  1250. padding-top: 6.8rem;
  1251. font-weight: 800;
  1252. font-size: 1.5rem;
  1253. text-align: center;
  1254. letter-spacing: 0.3px;
  1255. }
  1256. .head-money-area {
  1257. display: flex;
  1258. width: 100%;
  1259. justify-content: center;
  1260. align-items: center;
  1261. img {
  1262. width: 4rem;
  1263. height: 4rem;
  1264. border: 2px solid #ffffff;
  1265. border-radius: 100px;
  1266. }
  1267. span {
  1268. margin-left: 1.3rem;
  1269. font-size: 4.6rem;
  1270. word-break: break-all;
  1271. }
  1272. }
  1273. }
  1274. }
  1275. .luck-list-title {
  1276. /* margin-top: 47px;*/
  1277. margin: 0 16px;
  1278. padding: 14px 0 11px 0;
  1279. background: #fff;
  1280. display: flex;
  1281. font-weight: 500;
  1282. justify-content: space-between;
  1283. color: #b0b0b0;
  1284. border-bottom: 1px solid #f2f2f2;
  1285. }
  1286. .luck-list {
  1287. background: #fff;
  1288. overflow-y: auto;
  1289. .luck-item {
  1290. display: flex;
  1291. padding: 12px 0;
  1292. margin: 0 16px;
  1293. border-bottom: 1px solid #f2f2f2;
  1294. justify-content: space-between;
  1295. position: relative;
  1296. img:first-child {
  1297. border-radius: 50%;
  1298. }
  1299. .luck-king {
  1300. position: absolute;
  1301. top: 36px;
  1302. right: 0px;
  1303. display: flex;
  1304. align-items: center;
  1305. img {
  1306. width: 22px;
  1307. height: 19px;
  1308. margin: 0;
  1309. }
  1310. span {
  1311. font-weight: 500;
  1312. font-size: 12px;
  1313. line-height: 14px;
  1314. letter-spacing: 0.3px;
  1315. color: #f5b945;
  1316. }
  1317. }
  1318. img {
  1319. width: 42px;
  1320. height: 42px;
  1321. margin-right: 12px;
  1322. }
  1323. .luck-content {
  1324. flex: auto;
  1325. .luck-title {
  1326. font-weight: 500;
  1327. font-size: 16px;
  1328. letter-spacing: 0.3px;
  1329. color: #444444;
  1330. margin-bottom: 5px;
  1331. }
  1332. .luck-time {
  1333. font-weight: 400;
  1334. font-size: 12px;
  1335. line-height: 14px;
  1336. color: #b0b0b0;
  1337. }
  1338. }
  1339. .luck-money {
  1340. display: flex;
  1341. height: 17px;
  1342. align-items: center;
  1343. img {
  1344. width: 14px;
  1345. height: 14px;
  1346. margin-right: 6px;
  1347. }
  1348. .luck-money-txt {
  1349. font-weight: 500;
  1350. font-size: 14px;
  1351. /* identical to box height */
  1352. text-align: right;
  1353. letter-spacing: 0.3px;
  1354. color: #444444;
  1355. }
  1356. }
  1357. .luck-custom-prize {
  1358. font-weight: 500;
  1359. font-size: 14px;
  1360. letter-spacing: 0.3px;
  1361. color: #f5b945;
  1362. }
  1363. }
  1364. .luck-item:last-child {
  1365. border: 0;
  1366. }
  1367. }
  1368. .area {
  1369. position: absolute;
  1370. z-index: 112;
  1371. width: 100%;
  1372. .title {
  1373. z-index: 11;
  1374. margin-top: 8.5rem;
  1375. text-align: center;
  1376. img {
  1377. width: 3.6rem;
  1378. height: 3.6rem;
  1379. border: 2px solid #fff4db;
  1380. border-radius: 50%;
  1381. }
  1382. span {
  1383. letter-spacing: 0.3px;
  1384. font-size: 1.6rem;
  1385. color: #fff2d3;
  1386. }
  1387. }
  1388. .txt {
  1389. font-size: 4rem;
  1390. text-align: center;
  1391. letter-spacing: 0.03rem;
  1392. color: #fff2d3;
  1393. }
  1394. }
  1395. .key_area {
  1396. animation: key_area 1s;
  1397. animation-delay: 1s;
  1398. animation-fill-mode: forwards;
  1399. }
  1400. }
  1401. .redPacket2 {
  1402. left: 43.6rem;
  1403. margin-left: -18rem;
  1404. }
  1405. .key_install {
  1406. opacity: 0;
  1407. animation: key_install 2s;
  1408. animation-delay: 0s;
  1409. animation-fill-mode: forwards;
  1410. }
  1411. .install {
  1412. position: absolute;
  1413. top: 20rem;
  1414. left: 73.5rem;
  1415. .title {
  1416. font-size: 4.8rem;
  1417. color: #000000;
  1418. letter-spacing: 0.3px;
  1419. }
  1420. .validity {
  1421. margin-top: 1rem;
  1422. color: #ff0000;
  1423. width: 40rem;
  1424. height: 3.3rem;
  1425. line-height: 3.3rem;
  1426. font-weight: normal;
  1427. span {
  1428. font-size: 1.4rem;
  1429. }
  1430. }
  1431. .flow {
  1432. position: absolute;
  1433. margin-top: 4rem;
  1434. .line {
  1435. position: absolute;
  1436. height: 16rem;
  1437. border: 1px solid #e0e0e0;
  1438. top: 3rem;
  1439. left: 1.2rem;
  1440. }
  1441. .area_num {
  1442. display: flex;
  1443. align-items: center;
  1444. .num {
  1445. width: 2.4rem;
  1446. height: 2.4rem;
  1447. background-color: rgba(56, 154, 255, 1);
  1448. border-radius: 50%;
  1449. color: #fff;
  1450. text-align: center;
  1451. line-height: 2.4rem;
  1452. font-size: 1.4rem;
  1453. }
  1454. span {
  1455. margin-left: 1.5rem;
  1456. color: #000000;
  1457. font-size: 1.8rem;
  1458. }
  1459. }
  1460. .tip {
  1461. margin-left: 4rem;
  1462. margin-top: 0.7rem;
  1463. font-size: 1.4rem;
  1464. color: #a4a4a4;
  1465. }
  1466. .install_btn {
  1467. cursor: pointer;
  1468. margin-left: 4rem;
  1469. margin-top: 2rem;
  1470. margin-bottom: 6.7rem;
  1471. width: 23rem;
  1472. height: 5.8rem;
  1473. background: #389aff;
  1474. border-radius: 10rem;
  1475. color: #fff;
  1476. line-height: 5.8rem;
  1477. text-align: center;
  1478. font-size: 2rem;
  1479. }
  1480. }
  1481. .tip {
  1482. margin-top: 0.7rem;
  1483. font-size: 1.4rem;
  1484. color: #a4a4a4;
  1485. }
  1486. .install_btn {
  1487. cursor: pointer;
  1488. margin-top: 2rem;
  1489. margin-bottom: 6.7rem;
  1490. width: 23rem;
  1491. height: 5.8rem;
  1492. background: #389aff;
  1493. border-radius: 10rem;
  1494. color: #fff;
  1495. line-height: 5.8rem;
  1496. text-align: center;
  1497. font-size: 2rem;
  1498. }
  1499. }
  1500. .install-error {
  1501. left: 78.5rem;
  1502. .install_chrome {
  1503. cursor: pointer;
  1504. width: 24.3rem;
  1505. height: 5.8rem;
  1506. font-size: 2rem;
  1507. font-weight: 500;
  1508. letter-spacing: 0.3px;
  1509. display: flex;
  1510. align-items: center;
  1511. background: #ffffff;
  1512. border: 1px solid #e8e8e8;
  1513. border-radius: 10rem;
  1514. margin-top: 3.3rem;
  1515. img {
  1516. width: 3.2rem;
  1517. height: 3.2rem;
  1518. margin-left: 3.3rem;
  1519. }
  1520. span {
  1521. margin-left: 1.2rem;
  1522. }
  1523. }
  1524. }
  1525. }
  1526. @keyframes key_area {
  1527. 0% {
  1528. opacity: 1;
  1529. }
  1530. 100% {
  1531. opacity: 0;
  1532. }
  1533. }
  1534. @keyframes key_install {
  1535. 0% {
  1536. opacity: 0;
  1537. }
  1538. 100% {
  1539. opacity: 1;
  1540. }
  1541. }
  1542. @keyframes key_packet {
  1543. 0% {
  1544. }
  1545. 100% {
  1546. left: 30.6rem;
  1547. margin-left: -18rem;
  1548. }
  1549. }
  1550. </style>