index.vue 39 KB

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