index.vue 37 KB

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