index.vue 37 KB

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