index.vue 40 KB

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