index.vue 41 KB

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