index.vue 37 KB

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