index.vue 37 KB

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