index.vue 37 KB

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