index.vue 39 KB

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