index.vue 40 KB

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