123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362 |
- <!-- 红包玩法落地页 -->
- <template>
- <div class="content">
- <template v-if="isLoading">
- <img class="loading" src="../static/svg/icon-loading.svg" />
- </template>
- <template v-else>
- <!-- 手机端 -->
- <MobileGuidePage v-if="isMobile" :playType="PlayType.lottery" :detail="detail" :postBizData="detail.postBizData" :postUserInfo="detail.postBizData.postUserInfo"> </MobileGuidePage>
- <!-- PC端 -->
- <template v-else>
- <div class="logo">
- <img src="/img/icon-logo.png" />
- </div>
- <div class="show">
- <div class="center">
- <div class="head-in-custom" v-if="!isMoneyPrize">
- <img :src="detail.postBizData.postUserInfo.avatarUrl" />
- <span>{{ detail.postBizData.postUserInfo.nickName }}</span>
- </div>
- <div
- class="giveaway"
- :class="{
- bg: status === 'not-open',
- custom: detail.postBizData.posterType === 2 && detail.postBizData.customPosterInstalled,
- 'auto-height': !isMoneyPrize,
- }"
- >
- <div v-if="status === 'not-open'">
- <template v-if="detail.postBizData.posterType === 2 && detail.postBizData.customPosterInstalled">
- <!-- <img class="customImg" :src="detail.postBizData.customPosterInstalled" />
- <div class="customBottom">
- <div class="theme">
- <img class="icon" :src="require('../static/svg/icon-last-time.svg')"/>
- <span class="time2">{{ validity || '00:00:00' }}</span>
- <span class="info">Left</span>
- </div>
- <div class="winner-info">
- <span class="count">{{detail.postBizData.totalCount}} Winners</span>
- <span>to Share </span>
- <span class="prize-name">{{detail.postBizData.amountValue + ' ' + detail.postBizData.currencySymbol}}</span>
- </div>
- </div> -->
- <custom-card-cover
- :totalCount="detail.postBizData.totalCount"
- :amountValue="detail.postBizData.amountValue"
- :tokenSymbol="detail.postBizData.currencySymbol"
- :currencyIconUrl="detail.postBizData.iconPath"
- :playType="2"
- :posterType="2"
- :customPosterInstalled="detail.postBizData.customPosterInstalled"
- :validity="validity"
- :userInfo="{
- nickName: detail.postBizData.postUserInfo.nickName,
- avatarUrl: detail.postBizData.postUserInfo.avatarUrl,
- }"
- :rewardType="detail.postBizData.rewardType"
- :customizedReward="detail.postBizData.customizedReward"
- :showBottomInfo="true"
- >
- </custom-card-cover>
- </template>
- <template v-else>
- <!-- 旧版 样式,后续更新时在 custom-card-cover 公共组件内维护-->
- <template v-if="isMoneyPrize">
- <img class="lottery" :src="require('../static/svg/icon-luck-mark.svg')" />
- <div class="head">
- <img :src="detail.postBizData.postUserInfo.avatarUrl" />
- <span>{{ detail.postBizData.postUserInfo.nickName }}</span>
- </div>
- <div class="price">
- <div class="usdt">{{ detail.postBizData.currencySymbol }} GIVEAWAY</div>
- <div class="money">
- <img :src="detail.postBizData.currencyIconPath" />
- <font-amount :fontSize="60" :amount="detail.postBizData.amountValue"> </font-amount>
- </div>
- </div>
- <div class="time">
- <img class="img" :src="require('../static/svg/icon-time.svg')" />
- {{ validity || '00:00:00' }}
- </div>
- <div class="box">
- <img src="../static/subject/icon-box.png" />
- </div>
- </template>
- <template v-else>
- <custom-card-cover
- :totalCount="detail.postBizData.totalCount"
- :amountValue="detail.postBizData.amountValue"
- :tokenSymbol="detail.postBizData.currencySymbol"
- :currencyIconUrl="detail.postBizData.iconPath"
- :playType="2"
- :validity="validity"
- :userInfo="{
- nickName: detail.postBizData.postUserInfo.nickName,
- avatarUrl: detail.postBizData.postUserInfo.avatarUrl,
- }"
- :rewardType="detail.postBizData.rewardType"
- :customizedReward="detail.postBizData.customizedReward"
- :showBottomInfo="true"
- ></custom-card-cover>
- </template>
- </template>
- </div>
- <template v-else>
- <div class="succTop">
- <template v-if="status === 'opened'">
- <img class="img" :src="require('../static/svg/icon-luck-rabbit.svg')" />
- <p class="tips">Good Luck Next Time!</p>
- </template>
- <template v-else-if="status === 'expire'">
- <!-- <img class="img" :src=" require('../static/svg/icon-luck-complete.svg') " />
- <p class="tips">This Draw is Complete</p> -->
- <p class="expire">This Giveaways<br />expired on {{ formatTime(detail.postBizData.endTimestamp, 'MM-DD') }}</p>
- </template>
- <template v-else>
- <p class="win">🎉 Awesome! You are Winner!</p>
- <div class="win-money">
- <img :src="detail.postBizData.currencyIconPath" />
- <font-amount :fontSize="46" :amount="receiveAmount"></font-amount>
- </div>
- </template>
- </div>
- <div class="succTitle">
- <span>{{ detail.postBizData.receiveCount || 0 }}/{{ detail.postBizData.totalCount || 0 }} Winners</span>
- <span v-if="isMoneyPrize">{{ detail.postBizData.receiveAmountValue }} / {{ detail.postBizData.amountValue || '' }} {{ detail.postBizData.currencySymbol || '' }}</span>
- </div>
- <div class="luck-list" @scroll="handleScroll($event)">
- <div class="luck-item" v-for="(item, i) in luck_list" v-bind:key="i">
- <div class="userLogo">
- <img class="medal" v-if="i < 2" :src="require('../static/svg/icon-medal-' + i + '.svg')" />
- <img class="header" v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
- <img class="header" v-else src="/svg/icon-twitter.svg" alt />
- </div>
- <div class="luck-content">
- <div class="luck-title">{{ item.simpleUserInfoVO.nickName || 'Twitter User' }}</div>
- <div class="luck-time">{{ formatTime(item.receiveTimestamp, 'MM-DD HH:mm') }}</div>
- </div>
- <div class="luck-money" v-if="isMoneyPrize">
- <img :src="item.currencyIconPath" alt />
- <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
- </div>
- <div class="luck-custom-prize" v-else>winner</div>
- <div class="luck-king" v-if="isMoneyPrize && item.maxAmount">
- <img src="/svg/icon-king-hat.svg" alt />
- <span>Luckiest Draw</span>
- </div>
- </div>
- </div>
- </template>
- </div>
- <div class="desc">
- <template v-if="isChrome">
- <template v-if="status === 'not-open'">
- <div class="title">Install DeNet Plugin<br />to Draw Prizes</div>
- <div class="issue">DeNet will detect task situation to issue Giveaway</div>
- </template>
- <template v-else>
- <div class="title">Install the Denet plugin<br />to not miss the next draw</div>
- </template>
- <img class="button" @click="installExtension" src="../static/svg/icon-install-nft-plugin.svg" />
- </template>
- <template v-else>
- <div class="title">Get Giveaway<br />with chrome</div>
- <div class="issue">Only supports getting Giveaways through chrome</div>
- <img class="button" @click="clickOpenChrome" src="../static/svg/icon-install-nft-chrome.svg" />
- </template>
- </div>
- </div>
- </div>
- </template>
- </template>
- </div>
- </template>
- <script>
- import axios from 'axios';
- import Cookies from 'js-cookie';
- import { Toast } from 'vant';
- import { isBrowser, appType, appVersionCode, formatSecondsAsDaysOrTime, getDetailSSR } from '@/utils/help.js';
- import FontAmount from '@/components/FontAmount.vue';
- import CustomCardCover from '@/components/CustomCardCover.vue';
- import Report from '@/log-center/log';
- import { RewardType, PlayType } from '@/types';
- import MobileGuidePage from '@/components/MobileGuidePage.vue';
- var moment = require('moment');
- var ClipboardJS = require('clipboard');
- const api = {
- prod: 'https://api.denetme.net',
- pre: 'https://preapi.denetme.net',
- test: 'https://testapi.denetme.net',
- };
- const page = {
- prod: 'https://h5.denetme.net',
- pre: 'https://preh5.denetme.net',
- test: 'https://testh5.denetme.net',
- };
- const jumpUrl = page[process.env.NUXT_ENV.MODE] + '/';
- const baseURL = api[process.env.NUXT_ENV.MODE];
- export default {
- name: 'luckdraw',
- components: {
- FontAmount,
- CustomCardCover,
- MobileGuidePage,
- },
- head() {
- return {
- type: '',
- title: this.title,
- appVersionCode: appVersionCode,
- meta: [
- // facebook
- {
- name: 'og:url',
- content: this.jumpUrl + 'luckdraw/' + this.detail.postId,
- },
- {
- name: 'og:title',
- content: this.metaTitle,
- },
- {
- name: 'og:image',
- content: this.detail.postBizData.imagePath || this.detail.postBizData.customPosterUninstalled || '',
- },
- // twitter
- {
- name: 'twitter:card',
- content: 'summary_large_image',
- },
- {
- name: 'twitter:url',
- content: this.jumpUrl + 'luckdraw/' + this.detail.postId,
- },
- {
- name: 'twitter:title',
- content: this.metaTitle,
- },
- {
- name: 'twitter:image',
- content: this.detail.postBizData.imagePath || this.detail.postBizData.customPosterUninstalled || '',
- },
- ],
- };
- },
- data() {
- return {
- PlayType,
- detail: {
- postId: '',
- postBizData: {
- imagePath: '',
- postUserInfo: {},
- amountValue: '0',
- },
- },
- luck_list: [],
- luck_list_end: false,
- layer_show: false,
- isLoading: true,
- isMobile: false,
- isChrome: false,
- config: {},
- mid: '',
- status: '', // not-open->未打开 opened->没有抽中 success->抽中了 expire->过期
- page_index: 1,
- page_size: 20,
- validity: '',
- receiveAmount: '0',
- title: 'DeNet Giveaway',
- jumpUrl: jumpUrl,
- metaTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
- reportStatus: 'normal',
- customCover: '',
- customGiveaway: '',
- };
- },
- computed: {
- // 货币类型的奖品
- isMoneyPrize() {
- return this.detail.postBizData.rewardType === RewardType.money;
- },
- },
- mounted() {
- this.getConfig();
- this.setCookieMid();
- this.checkBrowser();
- this.handleStatusPage();
- this.isLoading = false;
- // 复制链接
- var clipboard = new ClipboardJS('.btn');
- clipboard.on('success', function (e) {
- Toast('copy success');
- e.clearSelection();
- });
- clipboard.on('error', function () {
- this.layer_show = true;
- });
- },
- async asyncData(context) {
- let { route, error } = context;
- let result = await getDetailSSR({
- context,
- params: {
- postId: route.params.id || '',
- },
- url: `${baseURL}/denet/post/getDetail`,
- });
- if (result.code == 0) {
- if (result.data && result.data.postBizData && typeof result.data.postBizData == 'string') {
- result.data.postBizData = JSON.parse(result.data.postBizData);
- }
- if (result.data.postBizData === null) {
- result.data.postBizData = {
- postUserInfo: {},
- };
- }
- return {
- detail: result.data,
- customCover: result.data.postBizData && result.data.postBizData.posterType == 2 ? 1 : 0,
- customGiveaway: result.data.postBizData && result.data.postBizData.rewardType == 2 ? 1 : 0,
- };
- } else {
- return error({
- message: result.msg,
- statusCode: 301,
- });
- }
- },
- methods: {
- checkBrowser() {
- this.linkHref = window.location.href;
- this.isChrome = isBrowser() == 'chrome';
- this.isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
- if (!this.isChrome) {
- this.status = 'no-chrome';
- } else {
- this.setPickupInfo();
- }
- // report
- setTimeout(() => {
- this.reportData();
- }, 500);
- },
- async getConfig() {
- let { data } = await axios.post(`${baseURL}/denet/base/config/getFrontConfig`, {
- baseInfo: {
- appVersionCode: appVersionCode,
- mid: this.mid,
- },
- params: {},
- });
- if (data.code == 0) {
- this.config = data.data;
- }
- },
- setCookieMid() {
- let _cookie_mid_arr = Cookies.get('mid') || [];
- if (_cookie_mid_arr.length > 0) {
- this.mid = JSON.parse(_cookie_mid_arr)[0].mid;
- } else {
- this.mid = this.guid();
- Cookies.set('mid', JSON.stringify([{ mid: this.mid }]), { expires: 1000 });
- }
- },
- guid() {
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
- var r = (Math.random() * 16) | 0,
- v = c == 'x' ? r : (r & 0x3) | 0x8;
- return v.toString(16);
- });
- },
- clickOpenChrome() {
- window.open('https://www.google.com/chrome');
- let extParams = this.isMobile ? {} : { status: this.reportStatus };
- Report.reportLog({
- baseInfo: {
- appVersionCode: appVersionCode,
- mid: this.mid,
- pageSource: Report.pageSource.newUserLandingPage,
- appType,
- machineCode: this.mid,
- },
- params: {
- eventData: {
- businessType: Report.businessType.buttonClick,
- objectType: Report.objectType.installButton,
- postId: this.detail.postId,
- srcContentId: this.detail.srcContentId,
- senderId: this.detail.srcUserId,
- redPacketType: 1,
- customCover: this.customCover,
- customGiveaway: this.customGiveaway,
- },
- extParams: extParams,
- },
- });
- },
- installExtension() {
- let { extensionsInstallChannel, extensionsInstallUrl } = this.config;
- let url = extensionsInstallUrl;
- let extParams = this.isMobile ? {} : { status: this.reportStatus };
- Report.reportLog({
- baseInfo: {
- appVersionCode: appVersionCode,
- mid: this.mid,
- pageSource: Report.pageSource.newUserLandingPage,
- appType,
- machineCode: this.mid,
- },
- params: {
- eventData: {
- businessType: Report.businessType.buttonClick,
- objectType: Report.objectType.installButton,
- postId: this.detail.postId,
- srcContentId: this.detail.srcContentId,
- senderId: this.detail.srcUserId,
- redPacketType: 1,
- customCover: this.customCover,
- customGiveaway: this.customGiveaway,
- },
- extParams: extParams,
- },
- });
- switch (extensionsInstallChannel) {
- case 'officeDownload':
- location.href = url;
- this.$router.push({
- path: '/install',
- });
- break;
- case 'chromeAppStore':
- window.open(extensionsInstallUrl);
- break;
- }
- },
- setPickupInfo() {
- let pickupInfo = {
- srcContentId: this.detail.srcContentId || '',
- postNickName: this.detail.postBizData.postUserInfo.nickName || '',
- createTime: Date.now(),
- jump_type: 'luck_draw',
- postId: this.detail.postId || '',
- };
- Cookies.set('jump_info', JSON.stringify(pickupInfo), { expires: 100 });
- },
- formatTime(time, _type = 'MM-DD HH:mm:ss') {
- return moment(time).format(_type);
- },
- getValidity(end_time) {
- let timer = setInterval(() => {
- let time = moment(new Date().getTime());
- let endTime = moment(end_time + 5000);
- let downTime = endTime - time || 0;
- if (downTime > 0) {
- this.validity = formatSecondsAsDaysOrTime(downTime / 1000);
- } else {
- this.validity = `00:00:00`;
- this.getDetail(() => {
- this.handleStatusPage();
- });
- clearInterval(timer);
- }
- }, 1000);
- },
- handleScroll(e) {
- e = e.target;
- if (this.luck_list_end) {
- return;
- }
- if ((e.clientHeight + e.scrollTop) / e.scrollHeight > 0.8) {
- this.luck_list_end = false;
- this.page_index++;
- this.getReceivedList();
- }
- },
- handleStatusPage() {
- // 如果 我领取过了
- // taskFinishStatus 任务完成状态(0:未完成,1:已完成,2:已过期)
- if (this.detail.postBizData.myReceived) {
- this.receiveAmount = this.detail.postBizData.myReceived.amountValue || 0;
- // 如果 任务完成状态 = 未完成
- if (this.detail.postBizData.myReceived.taskFinishStatus == 0) {
- // 显示任务未完成页面
- this.status = `opened`;
- } else if (this.detail.postBizData.myReceived.taskFinishStatus == 1) {
- //如果 任务完成状态 = 已经完成
- if (this.receiveAmount == 0) {
- // 领取到空红包
- this.status = `opened`;
- this.reportStatus = `empty`;
- } else {
- // 显示成功页面
- this.status = `success`;
- }
- } else {
- // 如果 任务完成状态 = 已经过期
- if (this.detail.postBizData.status == 1) {
- // 显示未打开页面
- this.status = 'not-open';
- } else {
- // 显示已经过期页面
- this.status = 'expire';
- this.reportStatus = `empty`;
- }
- }
- } else {
- // 如果 我没有领取过
- // 如果 红包状态 = 进行中
- if (this.detail.postBizData.status == 1) {
- // 如果 过了红包的领取截止时间 = true
- if (this.detail.postBizData.receiveTimeExpired) {
- // 显示过期页面
- this.status = 'expire';
- this.reportStatus = `empty`;
- } else {
- // 如果 过了红包的领取截止时间 = false
- // 显示未打开页面
- this.status = 'not-open';
- }
- } else {
- // 红包状态 = 已经结束了 | 已经终止 | 终止退款中
- // 显示过期页面
- this.status = 'expire';
- this.reportStatus = `empty`;
- }
- }
- // this.status = 'not-open'
- // getList
- if (this.status !== 'not-open') {
- this.getReceivedList();
- } else {
- this.getValidity(this.detail.postBizData.endTimestamp);
- }
- },
- async getDetail(fn) {
- let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
- baseInfo: {
- appVersionCode: appVersionCode,
- mid: this.mid,
- },
- params: {
- postId: this.detail.postId,
- },
- });
- if (data.code == 0) {
- this.detail.postBizData = JSON.parse(data.data.postBizData);
- this.customCover = this.detail.postBizData && this.detail.postBizData.posterType == 2 ? 1 : 0;
- this.customGiveaway = this.detail.postBizData && this.detail.postBizData.rewardType == 2 ? 1 : 0;
- if (fn) fn();
- }
- },
- async getReceivedList() {
- let { data } = await axios.post(`${baseURL}/denet/post/luckdrop/getReceivedList`, {
- baseInfo: {
- appVersionCode: appVersionCode,
- mid: this.mid,
- },
- params: {
- pageNum: this.page_index,
- pageSize: this.page_size,
- postId: this.detail.postId || '',
- },
- });
- if (data.code == 0) {
- if (data.data.length > 0) {
- this.luck_list = this.luck_list.concat(data.data);
- this.luck_list_end = false;
- } else {
- this.luck_list_end = true;
- }
- }
- },
- copyLinkHandle() {
- Report.reportLog({
- baseInfo: {
- appVersionCode: appVersionCode,
- mid: this.mid,
- pageSource: Report.pageSource.mobileLandingPage,
- appType,
- machineCode: this.mid,
- },
- params: {
- eventData: {
- businessType: Report.businessType.buttonClick,
- objectType: Report.objectType.copyLinkButton,
- postId: this.detail.postId || '',
- srcContentId: this.detail.srcContentId || '',
- senderId: this.detail.srcUserId || '',
- redPacketType: 1,
- customCover: this.customCover,
- customGiveaway: this.customGiveaway,
- },
- },
- });
- },
- reportData() {
- if (this.isMobile) {
- // 手机端
- Report.reportLog({
- baseInfo: {
- appVersionCode: appVersionCode,
- mid: this.mid,
- pageSource: Report.pageSource.mobileLandingPage,
- machineCode: this.mid,
- },
- params: {
- eventData: {
- businessType: Report.businessType.pageView,
- postId: this.detail.postId,
- redPacketType: 1,
- },
- },
- });
- } else if (this.isChrome) {
- // pc端
- Report.reportLog({
- baseInfo: {
- appVersionCode: appVersionCode,
- mid: this.mid,
- pageSource: Report.pageSource.newUserLandingPage,
- appType,
- machineCode: this.mid,
- },
- params: {
- eventData: {
- businessType: Report.businessType.pageView,
- postId: this.detail.postId,
- srcContentId: this.detail.srcContentId,
- senderId: this.detail.srcUserId,
- redPacketType: 1,
- customCover: this.customCover,
- customGiveaway: this.customGiveaway,
- },
- extParams: {
- status: this.reportStatus,
- },
- },
- });
- } else {
- Report.reportLog({
- baseInfo: {
- appVersionCode: appVersionCode,
- mid: this.mid,
- pageSource: Report.pageSource.newUserLandingPage,
- appType,
- machineCode: this.mid,
- },
- params: {
- eventData: {
- businessType: Report.businessType.pageView,
- postId: this.detail.postId,
- srcContentId: this.detail.srcContentId,
- senderId: this.detail.srcUserId,
- redPacketType: 1,
- customCover: this.customCover,
- customGiveaway: this.customGiveaway,
- },
- extParams: {
- status: 'not-chrome',
- },
- },
- });
- }
- },
- },
- };
- </script>
- <style lang="scss">
- html,
- body,
- #__nuxt,
- #__layout {
- width: 100%;
- height: 100%;
- padding: 0;
- margin: 0;
- }
- .content {
- width: 100%;
- height: 100%;
- background: #fff;
- .loading {
- position: absolute;
- transform: translate(-50%, -50%);
- top: 50%;
- left: 50%;
- margin: auto;
- width: 40px;
- border-radius: 50%;
- }
- .logo {
- display: flex;
- align-items: center;
- height: 70px;
- margin-left: 25px;
- img {
- width: 99px;
- height: 32px;
- }
- }
- .show {
- display: flex;
- align-items: center;
- height: calc(100% - 70px);
- .center {
- display: flex;
- margin: -50px auto 0;
- justify-content: space-between;
- width: 1000px;
- position: relative;
- .head-in-custom {
- position: absolute;
- bottom: 100%;
- left: 0;
- background: #fff;
- display: flex;
- align-items: center;
- font-weight: 500;
- font-size: 15px;
- color: #000;
- height: 54px;
- img {
- width: 30px;
- height: 30px;
- border-radius: 50%;
- margin-right: 10px;
- }
- }
- .giveaway {
- position: relative;
- overflow: hidden;
- width: 375px;
- height: 500px;
- border-radius: 20px;
- background-color: #fff;
- box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.1);
- &.bg {
- background: linear-gradient(17.98deg, #3438ff 3.69%, #8b56fc 74.32%);
- }
- &.custom {
- background: unset;
- height: auto !important;
- }
- &.auto-height {
- height: auto;
- }
- .lottery {
- position: absolute;
- top: 0;
- right: 0;
- width: 110px;
- height: 94px;
- }
- .head {
- display: flex;
- height: 50px;
- align-items: center;
- img {
- width: 20px;
- height: 20px;
- border-radius: 50%;
- margin: 0 10px 0 15px;
- border: solid 2px #fff;
- }
- span {
- color: #fff;
- font-size: 13px;
- font-weight: 700;
- line-height: 16px;
- letter-spacing: 0.005em;
- }
- }
- .price {
- text-align: center;
- .usdt {
- margin: 10px 0;
- color: #ffffff;
- font-weight: bold;
- font-size: 16px;
- line-height: 20px;
- text-align: center;
- letter-spacing: 0.3px;
- }
- .money {
- display: flex;
- align-items: center;
- justify-content: center;
- img {
- width: 46px;
- height: 46px;
- margin-right: 15px;
- border-radius: 50%;
- border: solid 3px #fff;
- }
- span {
- color: #fff;
- font-size: 60px;
- font-weight: 800;
- line-height: 76px;
- }
- }
- }
- .time {
- display: flex;
- height: 46px;
- color: #ffcc4d;
- align-items: center;
- justify-content: center;
- font-weight: bold;
- font-size: 26px;
- line-height: 33px;
- text-align: center;
- background: rgba($color: #000000, $alpha: 0.15);
- .img {
- width: 26px;
- margin-right: 10px;
- }
- }
- .box {
- margin: auto;
- width: 200px;
- height: 200px;
- margin-top: 27px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- }
- .desc {
- width: 520px;
- .title {
- color: #2c2c2c;
- font-size: 36px;
- line-height: 40px;
- font-weight: 900;
- margin-top: 90px;
- margin-bottom: 20px;
- }
- .issue {
- font-size: 15px;
- color: #a4a4a4;
- }
- .button {
- cursor: pointer;
- height: 64px;
- margin-top: 30px;
- }
- }
- }
- }
- }
- .small {
- width: 100%;
- height: 100%;
- position: relative;
- background-color: #fff;
- &.bg {
- background: linear-gradient(17.98deg, #3438ff 3.69%, #8b56fc 74.32%);
- }
- &.custom {
- background: #111214 !important;
- }
- .lottery {
- position: absolute;
- top: 0;
- right: 0;
- width: 110px;
- height: 94px;
- }
- .luck-list {
- height: calc(100% - 430px);
- }
- .head {
- display: flex;
- height: 50px;
- align-items: center;
- img {
- width: 20px;
- height: 20px;
- border-radius: 50%;
- margin: 0 10px 0 15px;
- border: solid 2px #fff;
- }
- span {
- color: #fff;
- font-size: 13px;
- font-weight: 700;
- line-height: 16px;
- letter-spacing: 0.005em;
- }
- }
- .price {
- text-align: center;
- .usdt {
- margin: 10px 0;
- color: #ffffff;
- font-weight: bold;
- font-size: 16px;
- line-height: 20px;
- text-align: center;
- letter-spacing: 0.3px;
- }
- .money {
- display: flex;
- align-items: center;
- justify-content: center;
- img {
- width: 46px;
- height: 46px;
- margin-right: 15px;
- border-radius: 50%;
- border: solid 3px #fff;
- }
- span {
- color: #fff;
- font-size: 60px;
- font-weight: 800;
- line-height: 76px;
- }
- }
- }
- .time {
- display: flex;
- height: 46px;
- color: #ffcc4d;
- align-items: center;
- justify-content: center;
- font-weight: bold;
- font-size: 26px;
- line-height: 33px;
- text-align: center;
- background: rgba($color: #000000, $alpha: 0.15);
- .img {
- width: 26px;
- margin-right: 10px;
- }
- }
- .box {
- margin: auto;
- width: 200px;
- height: 200px;
- margin-top: 27px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .area-cp-link {
- position: absolute;
- bottom: 0;
- background: #fff;
- overflow: hidden;
- width: 100%;
- flex-wrap: wrap;
- height: 238px;
- box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.1);
- border-top-left-radius: 10px;
- border-top-right-radius: 10px;
- .area-list {
- clear: both;
- margin: 15px;
- .item {
- clear: both;
- overflow: hidden;
- margin: 7px 0;
- font-size: 16px;
- font-weight: 500;
- .icon {
- float: left;
- margin-right: 8px;
- margin-top: -2px;
- }
- .font {
- float: left;
- margin-right: 8px;
- }
- .pc {
- float: left;
- margin-top: -2px;
- }
- }
- }
- .area-content {
- margin: 0 15px;
- color: #4b4b4b;
- padding: 7px 10px;
- font-size: 13px;
- border-radius: 5px;
- background: #f4f4f4;
- word-break: break-all;
- }
- .area-btn {
- flex: 1;
- display: flex;
- justify-content: center;
- .btn {
- margin: 15px 15px 0 15px;
- display: inline-block;
- width: 100%;
- height: 47px;
- font-size: 18px;
- line-height: 34px;
- color: #ffffff;
- border-radius: 100px;
- background: #389aff;
- }
- }
- }
- }
- .layer {
- position: fixed;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- background: rgba(0, 0, 0, 0.5);
- .layer-box {
- width: 300px;
- height: 170px;
- background: #ffffff;
- border-radius: 11px;
- opacity: 1;
- position: absolute;
- top: 250px;
- left: 50%;
- margin-left: -150px;
- .layer-txt {
- margin: 30px 0;
- width: 100%;
- padding: 0 27px;
- font-weight: 600;
- font-size: 18px;
- text-align: center;
- }
- .layer-btn {
- width: 190px;
- height: 40px;
- background: #389aff;
- border-radius: 100px;
- margin: 0 auto;
- text-align: center;
- line-height: 40px;
- color: #fff;
- font-weight: 600;
- font-size: 18px;
- }
- }
- }
- .luck-list {
- flex: 1;
- width: 100%;
- height: 310px;
- overflow-y: auto;
- .luck-item {
- display: flex;
- padding: 12px 0;
- margin: 0 16px;
- border-bottom: 1px solid #f2f2f2;
- justify-content: space-between;
- position: relative;
- .header {
- border-radius: 50%;
- }
- .luck-king {
- position: absolute;
- top: 36px;
- right: 0px;
- display: flex;
- align-items: center;
- img {
- width: 22px;
- height: 19px;
- margin: 0;
- }
- span {
- font-weight: 500;
- font-size: 12px;
- line-height: 14px;
- letter-spacing: 0.3px;
- color: #f5b945;
- }
- }
- .userLogo {
- position: relative;
- width: 42px;
- height: 42px;
- margin-right: 12px;
- .medal {
- position: absolute;
- right: -5px;
- bottom: -5px;
- width: 18px;
- height: 18px;
- }
- img {
- width: 100%;
- height: 100%;
- }
- }
- .luck-content {
- flex: auto;
- .luck-title {
- font-weight: 500;
- font-size: 16px;
- letter-spacing: 0.3px;
- color: #444444;
- }
- .luck-time {
- font-weight: 400;
- font-size: 12px;
- line-height: 14px;
- color: #9b9b9b;
- }
- }
- .luck-money {
- display: flex;
- height: 17px;
- align-items: center;
- img {
- width: 14px;
- height: 14px;
- margin-right: 6px;
- }
- .luck-money-txt {
- font-weight: 500;
- font-size: 14px;
- /* identical to box height */
- text-align: right;
- letter-spacing: 0.3px;
- color: #444444;
- }
- }
- .luck-custom-prize {
- font-weight: 500;
- font-size: 14px;
- letter-spacing: 0.3px;
- color: #f5b945;
- }
- }
- .luck-item:last-child {
- border: 0;
- }
- }
- .succTop {
- display: flex;
- align-items: center;
- flex-direction: column;
- justify-content: center;
- height: 150px;
- margin-bottom: 13px;
- background: #7d52fd;
- border-radius: 0 586px 586px/0 0 104px 104px;
- .img {
- height: 62px;
- }
- .expire {
- color: #ffffff;
- font-size: 22px;
- font-weight: 800;
- line-height: 36px;
- margin-top: 15px;
- text-align: center;
- }
- .tips {
- color: #ffffff;
- font-size: 22px;
- font-weight: 800;
- line-height: 26px;
- margin-top: 15px;
- }
- .win {
- font-size: 21px;
- font-weight: 800;
- color: #fff;
- }
- .win-money {
- display: flex;
- margin-top: -10px;
- align-items: center;
- justify-content: center;
- img {
- width: 44px;
- height: 44px;
- margin-right: 15px;
- border-radius: 50%;
- border: solid 3px #fff;
- }
- span {
- color: #fff;
- font-size: 60px;
- font-weight: 800;
- line-height: 76px;
- }
- }
- }
- .succTitle {
- display: flex;
- padding: 5px 0;
- justify-content: space-between;
- box-shadow: inset 0px -1px 0px #f2f2f2;
- span {
- margin: 0 16px;
- font-size: 12px;
- color: #b0b0b0;
- &:last-child {
- text-align: right;
- }
- }
- }
- .customImg {
- width: 100%;
- min-height: 373px;
- }
- .customBottom {
- width: 100%;
- background: #111214;
- padding: 10px 16px;
- font-weight: 500;
- font-size: 12px;
- line-height: 14px;
- letter-spacing: 0.3px;
- color: #838383;
- line-height: 20px;
- .theme {
- display: flex;
- height: 20px;
- align-items: center;
- justify-content: flex-start;
- .icon {
- width: 12px;
- }
- .time2 {
- margin: 0 4px;
- color: #1d9bf0;
- }
- }
- .winner-info {
- display: flex;
- height: 20px;
- align-items: center;
- justify-content: flex-start;
- .count {
- color: #1d9bf0;
- margin-right: 4px;
- }
- .prize-name {
- color: #1d9bf0;
- margin-left: 4px;
- }
- }
- }
- </style>
|