index.vue 37 KB

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