index.vue 37 KB

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