index.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769
  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="redBag" v-show="status == 'not-open'">
  10. <img src="/subject/001.gif">
  11. </div>
  12. <div class="head-in-custom" v-if="!isMoneyPrize">
  13. <img :src="detail.postBizData.postUserInfo.avatarUrl" />
  14. <span>{{ detail.postBizData.postUserInfo.nickName }}</span>
  15. </div>
  16. <!-- 红包打开 -->
  17. <div class="redPacket"
  18. :class="{ redPacket2: status != 'open', key_packet: status == 'open' }"
  19. v-if="status != 'nothing'"
  20. v-show="status != 'not-open'">
  21. <!-- 内容 -->
  22. <div class="head">
  23. <div class="head-title">
  24. <img :src="detail.postBizData.postUserInfo.avatarUrl" alt />
  25. <span>{{ detail.postBizData.postUserInfo.nickName }}</span>
  26. </div>
  27. <!-- <div class="head-txt" v-if="status == 'open' || status == 'opened'">Awesome! You Will Get</div> -->
  28. <!-- <div class="head-area" v-else-if="status == 'opened'">opened!</div> -->
  29. <!-- 红包被领完了 -->
  30. <div class="head-area" v-if="status == 'nothing'">
  31. <div class="txt">Better luck next time!</div>
  32. </div>
  33. <!-- 过期 -->
  34. <div class="head-area expire" v-if="status == 'expire'">
  35. <div class="txt">This Giveaways</div>
  36. <div class="titme">expired on {{ formatTime(detail.postBizData.endTimestamp, 'MM-DD') }}</div>
  37. </div>
  38. <!-- 非chrome浏览器 -->
  39. <div class="head-area expire" v-if="status == 'no-chrome'">
  40. <div class="txt">Get Giveaways</div>
  41. <div class="titme">with chrome</div>
  42. </div>
  43. <!-- 领取成功 -->
  44. <div class="head-area head-money" v-if="status == 'open' || status == 'opened'">
  45. <div class="txt">AWESOME! YOU Will GET</div>
  46. <div class="head-money-area">
  47. <img :src="currencyIconPath" alt />
  48. <span class="money-txt" :style="{ fontSize: amount_font_size + 'px' }">{{ receiveAmount }}</span>
  49. </div>
  50. </div>
  51. </div>
  52. <!-- 领取列表 -->
  53. <div class="luck-list-title">
  54. <div>{{ detail.postBizData.receiveCount || 0 }}/{{ detail.postBizData.totalCount || 0 }} Winners
  55. </div>
  56. <div v-if="isMoneyPrize"> {{ detail.postBizData.receiveAmountValue }} / {{
  57. detail.postBizData.amountValue || ''
  58. }} {{ detail.postBizData.currencySymbol || '' }}</div>
  59. </div>
  60. <div class="luck-list" @scroll="handleScroll($event)">
  61. <div class="luck-item" v-for="item, i in luck_list" v-bind:key="i">
  62. <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
  63. <img v-else src="/svg/icon-twitter.svg" alt />
  64. <div class="luck-content">
  65. <div class="luck-title">{{ item.simpleUserInfoVO.nickName || 'Twitter User' }}</div>
  66. <div class="luck-time">{{ formatTime(item.receiveTimestamp, 'MM-DD HH:mm') }}</div>
  67. </div>
  68. <div class="luck-money" v-if="isMoneyPrize">
  69. <img :src="item.currencyIconPath" alt />
  70. <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
  71. </div>
  72. <div class="luck-custom-prize" v-else>winner</div>
  73. <div class="luck-king" v-if="isMoneyPrize && item.maxAmount">
  74. <img src="/svg/icon-king-hat.svg" alt />
  75. <span>Luckiest Draw</span>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <template v-else>
  81. <div class="redBagCustom" v-if="detail.postBizData.posterType === 2 && detail.postBizData.customPosterInstalled">
  82. <!-- <img class="customImg" :src="detail.postBizData.customPosterInstalled" />
  83. <div class="customBottom">
  84. <div class="theme">
  85. <span class="info">Instant Giveaway</span>
  86. </div>
  87. <div class="winner-info">
  88. <span class="count">{{detail.postBizData.totalCount}} Winners</span>
  89. <span>to Share </span>
  90. <span class="prize-name">{{detail.postBizData.amountValue + ' ' + detail.postBizData.currencySymbol}}</span>
  91. </div>
  92. </div> -->
  93. <custom-card-cover
  94. :totalCount="detail.postBizData.totalCount"
  95. :amountValue="detail.postBizData.amountValue"
  96. :tokenSymbol="detail.postBizData.tokenSymbol"
  97. :currencyIconUrl="detail.postBizData.iconPath"
  98. :playType="1"
  99. :posterType="2"
  100. :customPosterInstalled="detail.postBizData.customPosterInstalled"
  101. :validity="validity"
  102. :userInfo="{
  103. nickName: detail.postBizData.postUserInfo.nickName,
  104. avatarUrl: detail.postBizData.postUserInfo.avatarUrl
  105. }"
  106. :rewardType="detail.postBizData.rewardType"
  107. :customizedReward="detail.postBizData.customizedReward"
  108. :showBottomInfo="true"
  109. ></custom-card-cover>
  110. </div>
  111. <div class="redBag" :class="{'auto-height': !isMoneyPrize}" v-else>
  112. <!-- 货币类型 -->
  113. <template v-if="isMoneyPrize">
  114. <img src="/subject/001-card.png" alt="">
  115. <img class="open-gif" src="/subject/001.gif" />
  116. <div class="title" v-if="detail.postBizData.postUserInfo">
  117. <img :src="detail.postBizData.postUserInfo.avatarUrl" alt />
  118. <span>{{ detail.postBizData.postUserInfo.nickName || 'FutureDoctor' }}</span>
  119. </div>
  120. <div class="money-area">
  121. <div class="txt">{{ detail.postBizData.currencySymbol }} GIVEAWAY</div>
  122. <div class="coin">
  123. <img :src="detail.postBizData.currencyIconPath" alt />
  124. <font-amount :amount="detail.postBizData.amountValue"></font-amount>
  125. </div>
  126. <div class="people">{{ detail.postBizData.totalCount }} WINNERS TO SHARE</div>
  127. </div>
  128. </template>
  129. <template v-else>
  130. <custom-card-cover
  131. :totalCount="detail.postBizData.totalCount"
  132. :amountValue="detail.postBizData.amountValue"
  133. :tokenSymbol="detail.postBizData.tokenSymbol"
  134. :currencyIconUrl="detail.postBizData.iconPath"
  135. :playType="1"
  136. :validity="validity"
  137. :userInfo="{
  138. nickName: detail.postBizData.postUserInfo.nickName,
  139. avatarUrl: detail.postBizData.postUserInfo.avatarUrl
  140. }"
  141. :rewardType="detail.postBizData.rewardType"
  142. :customizedReward="detail.postBizData.customizedReward"
  143. :showBottomInfo="true"
  144. ></custom-card-cover>
  145. </template>
  146. </div>
  147. </template>
  148. <!-- 安装 -->
  149. <div class="install" v-if="status == 'nothing' || status == 'open' || status == 'opened'"
  150. :class="{ key_install: status == 'open' }">
  151. <div v-if="status == 'nothing'">
  152. <div class="title">Install Denet to Draw</div>
  153. </div>
  154. <div v-else>
  155. <div class="title">Withdraw to Wallet</div>
  156. <div class="validity">
  157. <template v-if="validity_state">
  158. <span style="color:#FFA620;">Remaining valid time </span>
  159. <span style="color: #FFA620;">{{ validity }}</span>
  160. </template>
  161. <template v-else>
  162. <span style="color: #FFA620;">Giveaways Validity</span>
  163. </template>
  164. </div>
  165. </div>
  166. <div class="flow">
  167. <div class="line"></div>
  168. <div class="area_num">
  169. <div class="num">1</div>
  170. <span>Install DeNet</span>
  171. </div>
  172. <div class="tip">Used to verify tasks and get rewards</div>
  173. <div class="install_btn" @click="installExtension">Install</div>
  174. <div class="area_num">
  175. <div class="num">2</div>
  176. <span v-if="status == 'nothing'">Complete Tasks</span>
  177. <span v-else>Complete Tasks by {{ detail.postBizData.postUserInfo.nickName }}</span>
  178. </div>
  179. <div class="tip">Complete like, retweet and follow in a simple way</div>
  180. </div>
  181. </div>
  182. <!-- 过期 -->
  183. <div class="install install-error" v-if="status == 'expire'">
  184. <div class="title">Install DeNet</div>
  185. <div class="title">Don't miss the next Giveaway</div>
  186. <div class="tip">Used to verify tasks and get rewards</div>
  187. <div class="install_btn" @click="installExtension">Install</div>
  188. </div>
  189. <!-- 非chrome 浏览器状态 -->
  190. <div class="install install-error" v-if="status == 'no-chrome'">
  191. <div class="title">Open Giveaways</div>
  192. <div class="title">with chrome</div>
  193. <div class="tip">Only supports getting Giveaways through chrome</div>
  194. <div class="install_chrome" @click="clickOpenChrome()">
  195. <img src="/svg/icon-chrome.svg" alt />
  196. Install Chrome
  197. </div>
  198. </div>
  199. <div v-if="status == 'error'"></div>
  200. </div>
  201. <div v-if="show_moblie" class="moblie">
  202. <div class="head-area">
  203. <div class="gift">
  204. <img :src=" require('../static/subject/gift.svg') " />
  205. </div>
  206. <div class="txt">
  207. <div>Complete tasks</div>
  208. <div>to Draw Prizes</div>
  209. </div>
  210. </div>
  211. <!-- 领取列表 -->
  212. <div class="luck-list" @scroll="handleScroll($event)">
  213. <div class="luck-item" v-for="item, i in luck_list" v-bind:key="i">
  214. <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
  215. <img v-else src="/svg/icon-twitter.svg" alt />
  216. <div class="luck-content">
  217. <div class="luck-title">{{ item.simpleUserInfoVO.nickName || 'Twitter User' }}</div>
  218. <div class="luck-time">{{ formatTime(item.receiveTimestamp) }}</div>
  219. </div>
  220. <div class="luck-money" v-if="isMoneyPrize">
  221. <img :src="item.currencyIconPath" alt />
  222. <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
  223. </div>
  224. <div class="luck-custom-prize" v-else>winner</div>
  225. <div class="luck-king" v-if="isMoneyPrize && item.maxAmount">
  226. <img src="/svg/icon-king-hat.svg" alt />
  227. <span>Luckiest Draw</span>
  228. </div>
  229. </div>
  230. </div>
  231. <div class="area-cp-link">
  232. <div class="area-list">
  233. <div class="item">
  234. <div class="icon"><img :src=" require('../static/subject/01.svg') " /></div>
  235. <div class="font">Complete the tasks on tweet</div>
  236. </div>
  237. <div class="item">
  238. <div class="icon"><img :src=" require('../static/subject/02.svg') " /></div>
  239. <div class="font">Open link on PC to draw</div>
  240. <div class="pc"><img :src=" require('../static/subject/pc.svg') " /></div>
  241. </div>
  242. </div>
  243. <div class="area-content">
  244. {{ cp_link }}
  245. </div>
  246. <div class="area-btn">
  247. <div class="btn" :data-clipboard-text="cp_link" @click="copyLinkHandle">Copy Link</div>
  248. </div>
  249. </div>
  250. <div class="layer" v-show="layer_show">
  251. <div class="layer-box">
  252. <div class="layer-txt">Unable to copy, please enter the link manually</div>
  253. <div class="layer-btn" @click="layer_show = false">Done</div>
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. </template>
  259. <script>
  260. import axios from 'axios';
  261. import Cookies from 'js-cookie'
  262. import { isBrowser } from '../utils/help.js'
  263. import Report from "../log-center/log"
  264. import { Toast } from 'vant';
  265. import FontAmount from '../components/FontAmount.vue';
  266. import CustomCardCover from '../components/CustomCardCover.vue'
  267. import { RewardType } from '../types';
  268. var moment = require('moment');
  269. var ClipboardJS = require('clipboard')
  270. const api = {
  271. prod: 'https://api.denetme.net',
  272. pre: 'https://preapi.denetme.net',
  273. test: 'https://testapi.denetme.net'
  274. }
  275. const page = {
  276. prod: "https://h5.denetme.net",
  277. pre: "https://preh5.denetme.net",
  278. test: 'https://testh5.denetme.net'
  279. }
  280. const jumpUrl = page[process.env.NUXT_ENV.MODE] + '/'
  281. const baseURL = api[process.env.NUXT_ENV.MODE]
  282. const appType = 1;
  283. let appVersionCode = 6;
  284. export default {
  285. name: "index",
  286. data() {
  287. return {
  288. cp_link: '',
  289. appVersionCode: appVersionCode,
  290. mid: '',
  291. show_moblie: false,
  292. show_home: false,
  293. layer_show: false,
  294. amount_font_size:46,
  295. validity: '',
  296. receiveAmount: 0,
  297. validity_state: true,
  298. detail: {
  299. postId: '',
  300. postBizData: {
  301. imagePath: '',
  302. postUserInfo: {
  303. }
  304. }
  305. },
  306. currencyIconPath: '',
  307. customCover: '',
  308. customGiveaway: '',
  309. title: 'DeNet Giveaway',
  310. metaTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
  311. jumpUrl: jumpUrl,
  312. status: '',
  313. reportStatus: 'normal',
  314. page_index: 1,
  315. page_size: 20,
  316. luck_list: [],
  317. luck_list_end: false,
  318. config: {
  319. extensionsInstallChannel: 'officeDownload', // chromeAppStore
  320. extensionsInstallUrl: ''
  321. }
  322. }
  323. },
  324. computed: {
  325. // 货币类型的奖品
  326. isMoneyPrize() {
  327. return this.detail.postBizData.rewardType === RewardType.money;
  328. }
  329. },
  330. components: {
  331. FontAmount,
  332. },
  333. head() {
  334. return {
  335. type: '',
  336. title: this.title,
  337. appVersionCode: 3,
  338. meta: [
  339. // facebook
  340. {
  341. name: 'og:url',
  342. content: this.jumpUrl + this.detail.postId
  343. },
  344. {
  345. name: 'og:title',
  346. content: this.metaTitle
  347. },
  348. {
  349. name: 'og:image',
  350. content: this.detail.postBizData.imagePath || this.detail.postBizData.customPosterUninstalled || ''
  351. },
  352. // twitter
  353. {
  354. name: 'twitter:card',
  355. content: 'summary_large_image'
  356. },
  357. {
  358. name: 'twitter:url',
  359. content: this.jumpUrl + this.detail.postId
  360. },
  361. {
  362. name: 'twitter:title',
  363. content: this.metaTitle
  364. },
  365. {
  366. name: 'twitter:image',
  367. content: this.detail.postBizData.imagePath || this.detail.postBizData.customPosterUninstalled || ''
  368. }
  369. ]
  370. }
  371. },
  372. methods: {
  373. copyLinkHandle() {
  374. Report.reportLog({
  375. baseInfo: {
  376. appVersionCode: this.appVersionCode,
  377. mid: this.mid,
  378. pageSource: Report.pageSource.mobileLandingPage,
  379. appType,
  380. machineCode: this.mid
  381. },
  382. params: {
  383. eventData: {
  384. businessType: Report.businessType.buttonClick,
  385. objectType: Report.objectType.copyLinkButton,
  386. postId: this.detail.postId,
  387. srcContentId: this.detail.srcContentId,
  388. senderId: this.detail.srcUserId,
  389. redPacketType: 0,
  390. customCover: this.customCover,
  391. }
  392. }
  393. })
  394. },
  395. clickOpenChrome() {
  396. window.open('https://www.google.com/chrome')
  397. let extParams = this.isMobile() ? {} : { status: this.reportStatus }
  398. Report.reportLog({
  399. baseInfo: {
  400. appVersionCode: this.appVersionCode,
  401. mid: this.mid,
  402. pageSource: Report.pageSource.newUserLandingPage,
  403. appType,
  404. machineCode: this.mid
  405. },
  406. params: {
  407. eventData: {
  408. businessType: Report.businessType.buttonClick,
  409. objectType: Report.objectType.installButton,
  410. postId: this.detail.postId,
  411. srcContentId: this.detail.srcContentId,
  412. senderId: this.detail.srcUserId,
  413. redPacketType: 0,
  414. customCover: this.customCover,
  415. },
  416. extParams: extParams
  417. }
  418. })
  419. },
  420. isMobile() {
  421. 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);
  422. return flag;
  423. },
  424. installExtension() {
  425. let { extensionsInstallChannel, extensionsInstallUrl } = this.config;
  426. let url = extensionsInstallUrl;
  427. let extParams = this.isMobile() ? {} : { status: this.reportStatus }
  428. Report.reportLog({
  429. baseInfo: {
  430. appVersionCode: this.appVersionCode,
  431. mid: this.mid,
  432. pageSource: Report.pageSource.newUserLandingPage,
  433. appType,
  434. machineCode: this.mid
  435. },
  436. params: {
  437. eventData: {
  438. businessType: Report.businessType.buttonClick,
  439. objectType: Report.objectType.installButton,
  440. postId: this.detail.postId,
  441. srcContentId: this.detail.srcContentId,
  442. senderId: this.detail.srcUserId,
  443. redPacketType: 0,
  444. customCover: this.customCover,
  445. },
  446. extParams: extParams,
  447. }
  448. })
  449. switch (extensionsInstallChannel) {
  450. case "officeDownload":
  451. location.href = url;
  452. this.$router.push({
  453. path: '/install'
  454. })
  455. break;
  456. case "chromeAppStore":
  457. window.open(extensionsInstallUrl)
  458. break;
  459. }
  460. },
  461. formatTime(time, _type = 'MM-DD HH:mm:ss') {
  462. return moment(time).format(_type)
  463. },
  464. guid() {
  465. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  466. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  467. return v.toString(16);
  468. });
  469. },
  470. handleScroll(e) {
  471. e = e.target
  472. if (this.luck_list_end) {
  473. return
  474. }
  475. if ((e.clientHeight + e.scrollTop) / e.scrollHeight > .8) {
  476. this.luck_list_end = false
  477. this.page_index++
  478. this.getReceivedList()
  479. }
  480. },
  481. getFontSize(amount) {
  482. let _num = parseInt(360 / amount.length);
  483. this.amount_font_size = _num < 46 ? _num : 46;
  484. },
  485. setCookieMid() {
  486. let _cookie_mid_arr = Cookies.get('mid') || []
  487. if (_cookie_mid_arr.length > 0) {
  488. this.mid = JSON.parse(_cookie_mid_arr)[0].mid
  489. } else {
  490. this.mid = this.guid()
  491. Cookies.set('mid', JSON.stringify([{ mid: this.mid }]), { expires: 1000 })
  492. }
  493. },
  494. async getRedPacket() {
  495. this.currencyIconPath = this.detail.postBizData.currencyIconPath
  496. let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/receiveLuckdrop`, {
  497. baseInfo: {
  498. appVersionCode: this.appVersionCode,
  499. mid: this.mid
  500. },
  501. params: {
  502. postId: this.detail.postId || ''
  503. }
  504. })
  505. this.show_home = true
  506. switch (data.code.toString()) {
  507. case '0':
  508. this.getDetail()
  509. if (data.data.receiveAmount == '0') {
  510. this.reportStatus = 'empty'
  511. this.status = 'nothing'
  512. } else {
  513. if (data.data.newReceived) {
  514. this.status = 'not-open'
  515. setTimeout(() => {
  516. this.status = 'open'
  517. }, 3000)
  518. this.receiveAmount = data.data.receiveAmount
  519. } else {
  520. this.status = 'opened'
  521. }
  522. }
  523. this.getValidity(data.data.endTimestamp)
  524. this.receiveAmount = data.data.receiveAmount
  525. this.getFontSize(this.receiveAmount)
  526. break;
  527. case '2003':
  528. // this.status = 'expire'
  529. this.reportStatus = 'empty'
  530. this.getDetail()
  531. this.status = 'nothing'
  532. break
  533. // 红包被领完了
  534. case '2008':
  535. this.reportStatus = 'empty'
  536. this.getDetail()
  537. this.status = 'nothing'
  538. break
  539. case '2029':
  540. // 推文未发布
  541. this.status = 'error'
  542. break
  543. default:
  544. console.log('getRedPacket', data)
  545. // this.show_home = false
  546. this.reportStatus = 'empty'
  547. this.getDetail()
  548. this.status = 'nothing'
  549. break;
  550. }
  551. // 领取列表分页
  552. this.getReceivedList()
  553. },
  554. async getReceivedList() {
  555. let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/getReceivedList`, {
  556. baseInfo: {
  557. appVersionCode: this.appVersionCode,
  558. mid: this.mid
  559. },
  560. params: {
  561. pageNum: this.page_index,
  562. pageSize: this.page_size,
  563. postId: this.detail.postId || ''
  564. }
  565. })
  566. if (data.code == 0) {
  567. if (data.data.length > 0) {
  568. this.luck_list = this.luck_list.concat(data.data)
  569. this.luck_list_end = false
  570. } else {
  571. this.luck_list_end = true
  572. }
  573. } else {
  574. console.log('getReceivedList', data)
  575. }
  576. },
  577. getValidity(end_time) {
  578. let _d1, _d2, _d3, _h, _m, _s
  579. let timer = setInterval(() => {
  580. let _time = new Date().getTime()
  581. _d3 = end_time - _time
  582. if (_d3 > 0) {
  583. _d1 = moment(end_time)
  584. _d2 = moment(_time)
  585. _h = moment.duration(_d1.diff(_d2)).hours()
  586. _m = moment.duration(_d1.diff(_d2)).minutes()
  587. _s = moment.duration(_d1.diff(_d2)).seconds()
  588. if (_h < 10) {
  589. _h = '0' + _h
  590. }
  591. if (_m < 10) {
  592. _m = '0' + _m
  593. }
  594. if (_s < 10) {
  595. _s = '0' + _s
  596. }
  597. this.validity = `${_h}:${_m}:${_s}`
  598. } else {
  599. clearInterval(timer)
  600. }
  601. }, 1000)
  602. },
  603. setPickupInfo() {
  604. let pickupInfo = {
  605. srcContentId: this.detail.srcContentId || '',
  606. postNickName: this.detail.postBizData.postUserInfo.nickName || '',
  607. createTime: Date.now(),
  608. jump_type: 'red_packet',
  609. };
  610. Cookies.set('jump_info', JSON.stringify(pickupInfo), { expires: 100 });
  611. },
  612. async getDetail() {
  613. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  614. baseInfo: {
  615. appVersionCode: this.appVersionCode,
  616. mid: this.mid
  617. },
  618. params: {
  619. postId: this.detail.postId
  620. }
  621. })
  622. if (data.code == 0) {
  623. this.detail.postBizData = JSON.parse(data.data.postBizData)
  624. this.customCover = this.detail.postBizData && this.detail.postBizData.posterType == 2 ? 1 : 0;
  625. this.customGiveaway = this.detail.postBizData && this.detail.postBizData.rewardType == 2 ? 1 : 0;
  626. }
  627. },
  628. async getConfig() {
  629. let { data } = await axios.post(`${baseURL}/denet/base/config/getFrontConfig`, {
  630. baseInfo: {
  631. appVersionCode: this.appVersionCode,
  632. mid: this.mid
  633. },
  634. params: {
  635. }
  636. })
  637. if (data.code == 0) {
  638. this.config = data.data;
  639. }
  640. },
  641. },
  642. async asyncData(params) {
  643. let { route } = params;
  644. let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
  645. baseInfo: {
  646. appVersionCode: appVersionCode,
  647. mid: function () {
  648. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  649. var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
  650. return v.toString(16);
  651. });
  652. }()
  653. },
  654. params: {
  655. postId: route.params.id || ''
  656. }
  657. })
  658. if (data.code == 0) {
  659. if (data.data && data.data.postBizData && typeof data.data.postBizData == 'string') {
  660. data.data.postBizData = JSON.parse(data.data.postBizData)
  661. }
  662. if(data.data.postBizData === null) {
  663. data.data.postBizData = {
  664. postUserInfo: {
  665. }
  666. }
  667. }
  668. return {
  669. detail: data.data,
  670. }
  671. }
  672. },
  673. mounted() {
  674. this.getConfig()
  675. if (!this.detail.postId) {
  676. return
  677. }
  678. console.log(this.detail)
  679. //改变font-size
  680. // (function (doc, win) {
  681. // var docEI = doc.documentElement,
  682. // resizeEvt = 'orientationchange' in window ? 'orientataionchange' : 'resize',
  683. // recalc = function () {
  684. // var clientWidth = docEI.clientWidth;
  685. // if (!clientWidth) return;
  686. // //100是字体大小,1510是开发时浏览器窗口的宽度,等比计算
  687. // docEI.style.fontSize = 10 * (clientWidth / 1510) + 'px';
  688. // }
  689. // if (!doc.addEventListener) return;
  690. // win.addEventListener(resizeEvt, recalc, false);
  691. // doc.addEventListener('DOMContentLoaded', recalc, false);
  692. // })(document, window);
  693. document.documentElement.style.fontSize = '62.5%'
  694. if (this.isMobile()) {
  695. this.setCookieMid();
  696. setTimeout(() => {
  697. Report.reportLog({
  698. baseInfo: {
  699. appVersionCode: this.appVersionCode,
  700. mid: this.mid,
  701. pageSource: Report.pageSource.mobileLandingPage,
  702. appType,
  703. machineCode: this.mid
  704. },
  705. params: {
  706. eventData: {
  707. businessType: Report.businessType.pageView,
  708. postId: this.detail.postId,
  709. srcContentId: this.detail.srcContentId,
  710. senderId: this.detail.srcUserId,
  711. redPacketType: 0,
  712. customCover: this.customCover,
  713. }
  714. }
  715. })
  716. }, 500)
  717. this.show_moblie = true
  718. this.cp_link = window.location.href
  719. // 复制链接
  720. var clipboard = new ClipboardJS('.btn');
  721. clipboard.on('success', function (e) {
  722. Toast('copy success');
  723. console.info('Action:', e.action);
  724. console.info('Text:', e.text);
  725. console.info('Trigger:', e.trigger);
  726. e.clearSelection();
  727. });
  728. clipboard.on('error', function (e) {
  729. this.layer_show = true
  730. console.error('Action:', e.action);
  731. console.error('Trigger:', e.trigger);
  732. });
  733. // 领取列表分页
  734. this.getReceivedList()
  735. } else if (isBrowser() == 'chrome') {
  736. // 领取任务红包
  737. this.setCookieMid()
  738. // 是否被领完
  739. if(this.detail.postBizData.receiveCount < this.detail.postBizData.totalCount){
  740. this.getRedPacket()
  741. }else{
  742. this.show_home = true
  743. this.status = 'nothing'
  744. this.reportStatus = 'empty'
  745. }
  746. this.setPickupInfo()
  747. setTimeout(() => {
  748. Report.reportLog({
  749. baseInfo: {
  750. appVersionCode: this.appVersionCode,
  751. mid: this.mid,
  752. pageSource: Report.pageSource.newUserLandingPage,
  753. appType,
  754. machineCode: this.mid
  755. },
  756. params: {
  757. eventData: {
  758. businessType: Report.businessType.pageView,
  759. postId: this.detail.postId,
  760. srcContentId: this.detail.srcContentId,
  761. senderId: this.detail.srcUserId,
  762. redPacketType: 0,
  763. customCover: this.customCover,
  764. },
  765. extParams: {
  766. status: this.reportStatus,
  767. }
  768. }
  769. });
  770. }, 1000)
  771. } else {
  772. this.show_home = true
  773. this.status = 'no-chrome'
  774. this.reportStatus = 'not-chrome'
  775. Report.reportLog({
  776. baseInfo: {
  777. appVersionCode: this.appVersionCode,
  778. mid: this.mid,
  779. pageSource: Report.pageSource.newUserLandingPage,
  780. appType,
  781. machineCode: this.mid
  782. },
  783. params: {
  784. eventData: {
  785. businessType: Report.businessType.pageView,
  786. postId: this.detail.postId,
  787. srcContentId: this.detail.srcContentId,
  788. senderId: this.detail.srcUserId,
  789. redPacketType: 0,
  790. customCover: this.customCover,
  791. },
  792. extParams: {
  793. status: this.reportStatus,
  794. }
  795. }
  796. })
  797. }
  798. }
  799. }
  800. </script>
  801. <style lang="scss" >
  802. html,
  803. body,
  804. #__nuxt,
  805. #__layout {
  806. width: 100%;
  807. height: 100%;
  808. padding: 0;
  809. margin: 0;
  810. }
  811. .moblie {
  812. display: flex;
  813. flex-wrap: wrap;
  814. height: 100%;
  815. align-content: flex-start;
  816. flex-direction: column;
  817. .layer {
  818. position: fixed;
  819. width: 100%;
  820. height: 100%;
  821. top: 0;
  822. left: 0;
  823. background: rgba(0, 0, 0, .5);
  824. .layer-box {
  825. width: 30rem;
  826. height: 17rem;
  827. background: #FFFFFF;
  828. border-radius: 11px;
  829. opacity: 1;
  830. position: absolute;
  831. top: 25rem;
  832. left: 50%;
  833. margin-left: -15rem;
  834. .layer-txt {
  835. margin: 3rem 0;
  836. width: 100%;
  837. padding: 0 2.7rem;
  838. font-weight: 600;
  839. font-size: 1.8rem;
  840. text-align: center;
  841. }
  842. .layer-btn {
  843. width: 19rem;
  844. height: 4rem;
  845. background: #389AFF;
  846. border-radius: 100px;
  847. margin: 0 auto;
  848. text-align: center;
  849. line-height: 4rem;
  850. color: #fff;
  851. font-weight: 600;
  852. font-size: 1.8rem;
  853. }
  854. }
  855. }
  856. .head-area {
  857. width: 100%;
  858. height: 11rem;
  859. text-align: center;
  860. letter-spacing: 0.3px;
  861. font-size: 2rem;
  862. text-align: center;
  863. color: #fff;
  864. background: #389AFF;
  865. border-radius: 0 586px 586px/0 0 104px 104px;
  866. display: flex;
  867. align-items: center;
  868. justify-content: center;
  869. .gift {
  870. margin-right: 1.4rem;
  871. img {
  872. width: 5.2rem;
  873. }
  874. }
  875. .txt {
  876. font-size: 1.8rem;
  877. text-align: left;
  878. }
  879. }
  880. .luck-list-title {
  881. /* margin-top: 47px;*/
  882. margin: 0 16px;
  883. padding: 14px 0 11px 0;
  884. background: #fff;
  885. display: flex;
  886. justify-content: space-between;
  887. color: #B0B0B0;
  888. border-bottom: 1px solid #D1D1D1;
  889. }
  890. .luck-list {
  891. flex: 1;
  892. width: 100%;
  893. overflow-y: auto;
  894. .luck-item {
  895. display: flex;
  896. padding: 12px 0;
  897. margin: 0 16px;
  898. border-bottom: 1px solid #F2F2F2;
  899. justify-content: space-between;
  900. position: relative;
  901. img:first-child {
  902. border-radius: 50%;
  903. }
  904. .luck-king {
  905. position: absolute;
  906. top: 36px;
  907. right: 0px;
  908. display: flex;
  909. align-items: center;
  910. img {
  911. width: 22px;
  912. height: 19px;
  913. margin: 0;
  914. }
  915. span {
  916. font-weight: 500;
  917. font-size: 12px;
  918. line-height: 14px;
  919. letter-spacing: 0.3px;
  920. color: #f5b945;
  921. }
  922. }
  923. img {
  924. width: 42px;
  925. height: 42px;
  926. margin-right: 12px;
  927. }
  928. .luck-content {
  929. flex: auto;
  930. .luck-title {
  931. font-weight: 500;
  932. font-size: 16px;
  933. letter-spacing: 0.3px;
  934. color: #444444;
  935. }
  936. .luck-time {
  937. font-weight: 400;
  938. font-size: 12px;
  939. line-height: 14px;
  940. color: #9b9b9b;
  941. }
  942. }
  943. .luck-money {
  944. display: flex;
  945. height: 17px;
  946. align-items: center;
  947. img {
  948. width: 14px;
  949. height: 14px;
  950. margin-right: 6px;
  951. }
  952. .luck-money-txt {
  953. font-weight: 500;
  954. font-size: 14px;
  955. /* identical to box height */
  956. text-align: right;
  957. letter-spacing: 0.3px;
  958. color: #444444;
  959. }
  960. }
  961. .luck-custom-prize {
  962. font-weight: 500;
  963. font-size: 14px;
  964. letter-spacing: 0.3px;
  965. color: #F5B945;
  966. }
  967. }
  968. .luck-item:last-child {
  969. border: 0;
  970. }
  971. }
  972. .area-cp-link {
  973. background: #fff;
  974. width: 100%;
  975. flex-wrap: wrap;
  976. height: 20rem;
  977. box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
  978. border-top-left-radius: 1rem;
  979. border-top-right-radius: 1rem;
  980. .area-list {
  981. width: 34.3rem;
  982. margin: 1.5rem auto;
  983. .item {
  984. clear: both;
  985. overflow: hidden;
  986. margin: 0.7rem 0;
  987. font-size: 1.6rem;
  988. font-weight: 500;
  989. .icon {
  990. float: left;
  991. margin-right: 0.8rem;
  992. }
  993. .font {
  994. float: left;
  995. margin-right: 0.8rem;
  996. }
  997. .pc {
  998. float: left;
  999. }
  1000. }
  1001. }
  1002. .area-content {
  1003. background: #F4F4F4;
  1004. padding: 0.7rem 1rem;
  1005. margin: 0 auto 1rem;
  1006. width: 34.3rem;
  1007. font-size: 1.3rem;
  1008. border-radius: 0.5rem;
  1009. word-break: break-all;
  1010. }
  1011. .area-btn {
  1012. flex: 1;
  1013. display: flex;
  1014. justify-content: center;
  1015. .btn {
  1016. width: 34.3rem;
  1017. height: 4rem;
  1018. background: #389AFF;
  1019. border-radius: 100px;
  1020. font-size: 1.8rem;
  1021. color: #FFFFFF;
  1022. }
  1023. }
  1024. }
  1025. }
  1026. .content {
  1027. width: 100%;
  1028. height: 100%;
  1029. background-size: 100%;
  1030. background-repeat: no-repeat;
  1031. position: relative;
  1032. font-family: "SF Pro Display";
  1033. font-style: normal;
  1034. font-weight: 600;
  1035. .head-in-custom {
  1036. position: absolute;
  1037. top: 9rem;
  1038. left: 30rem;
  1039. background: #fff;
  1040. display: flex;
  1041. align-items: center;
  1042. font-weight: 500;
  1043. font-size: 15px;
  1044. color: #000;
  1045. height: 54px;
  1046. img {
  1047. width: 30px;
  1048. height: 30px;
  1049. border-radius: 50%;
  1050. margin-right: 10px;
  1051. }
  1052. }
  1053. .not-open {
  1054. display: flex;
  1055. align-items: center;
  1056. justify-content: center;
  1057. width: 100%;
  1058. height: 100%;
  1059. img {
  1060. width: 20rem;
  1061. height: 20rem;
  1062. }
  1063. }
  1064. .logo {
  1065. position: absolute;
  1066. left: 4rem;
  1067. top: 1.5rem;
  1068. img {
  1069. width: 10.7rem;
  1070. height: 3.4rem;
  1071. }
  1072. }
  1073. .key_packet {
  1074. animation: key_packet 3s;
  1075. animation-delay: 0s;
  1076. animation-fill-mode: forwards;
  1077. }
  1078. .redBagCustom {
  1079. display: flex;
  1080. justify-content: flex-start;
  1081. flex-direction: column;
  1082. position: absolute;
  1083. top: 16rem;
  1084. left: 30.6rem;
  1085. width: 37.5rem;
  1086. border-radius: 2rem;
  1087. overflow-y: hidden;
  1088. box-shadow: 0 0.3rem 2rem rgba(0, 0, 0, 0.2);
  1089. background: #fff;
  1090. .customImg {
  1091. width: 100%;
  1092. min-height: 373px;
  1093. }
  1094. .customBottom {
  1095. width: 100%;
  1096. background:#111214;
  1097. padding: 10px 16px;
  1098. font-weight: 500;
  1099. font-size: 12px;
  1100. line-height: 14px;
  1101. letter-spacing: 0.3px;
  1102. color: #838383;
  1103. line-height: 20px;
  1104. .theme {
  1105. display: flex;
  1106. height: 20px;
  1107. align-items: center;
  1108. justify-content: flex-start;
  1109. .icon {
  1110. width: 12px;
  1111. }
  1112. .time {
  1113. margin: 0 4px;
  1114. color: #1D9BF0;
  1115. }
  1116. }
  1117. .winner-info {
  1118. display: flex;
  1119. height: 20px;
  1120. align-items: center;
  1121. justify-content: flex-start;
  1122. .count{
  1123. color: #1D9BF0;
  1124. margin-right: 4px;
  1125. }
  1126. .prize-name {
  1127. color: #1D9BF0;
  1128. margin-left: 4px;
  1129. }
  1130. }
  1131. }
  1132. }
  1133. .redBag {
  1134. display: flex;
  1135. justify-content: flex-start;
  1136. flex-direction: column;
  1137. position: absolute;
  1138. top: 14rem;
  1139. left: 30.6rem;
  1140. width: 37.5rem;
  1141. height: 50rem;
  1142. border-radius: 2rem;
  1143. overflow-y: hidden;
  1144. box-shadow: 0 0 5px #888888;
  1145. background: #fff;
  1146. &.auto-height {
  1147. height: auto;
  1148. }
  1149. .money-area {
  1150. width: 100%;
  1151. position: absolute;
  1152. top: 65px;
  1153. display: flex;
  1154. flex-wrap: wrap;
  1155. align-items: center;
  1156. justify-content: center;
  1157. .txt {
  1158. font-weight: 800;
  1159. font-size: 16px;
  1160. text-align: center;
  1161. letter-spacing: 0.3px;
  1162. color: #FFFFFF;
  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>