index.vue 41 KB

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