index.vue 37 KB

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