index.vue 39 KB

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