index.vue 39 KB

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