소스 검색

Merge branch 'dev_1.1.2' of DeNet/de-net-official into master

nieyuge 2 년 전
부모
커밋
305894b36e

+ 2 - 2
log-center/logger.js

@@ -30,9 +30,9 @@ function paramsPretreatmentAndRequest(logType, params) {
         url: location.href,
         browser,
         platform,
-        ...extParams,
+        ...eventData,
     }
-    extParams = wrapObject(extData)
+    eventData = wrapObject(extData)
     params.params.logType = logType;
     params.params.eventData = JSON.stringify(eventData)
     params.params.extParams  = JSON.stringify(extParams)

+ 7 - 1
nuxt.config.js

@@ -50,7 +50,13 @@ export default {
         name: 'index',
         path: '/:id?',
         component: resolve(__dirname, 'pages/index.vue')
-      },{
+      },
+      {
+        name: 'luckdraw',
+        path: '/luckdraw/:id?',
+        component: resolve(__dirname, 'pages/luckdraw.vue')
+      },
+      {
         name: 'install',
         path: '/install',
         component: resolve(__dirname, 'pages/install.vue')

+ 40 - 24
pages/index.vue

@@ -266,6 +266,7 @@ export default {
 			metaTitle: 'DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP',
 			jumpUrl: jumpUrl,
 			status: '',
+            reportStatus: 'normal',
 			page_index: 1,
 			page_size: 20,
 			luck_list: [],
@@ -331,19 +332,36 @@ export default {
 				params: {
 					eventData: {
 						businessType: Report.businessType.buttonClick,
-						objectType: Report.objectType.copyLinkButton
-					},
-                    extParams: {
+						objectType: Report.objectType.copyLinkButton,
                         postId: this.detail.postId,
                         srcContentId: this.detail.srcContentId,
                         senderId: this.detail.srcUserId,
-                        status: this.status,
-                    }
+                        status: '',
+					},
 				}
 			})
 		},
 		clickOpenChrome() {
 			window.open('https://www.google.com/chrome')
+            Report.reportLog({
+				baseInfo: {
+					appVersionCode: this.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,
+                        status: '',
+					},
+				}
+			})
 		},
 		isMobile() {
 			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);
@@ -363,14 +381,12 @@ export default {
 				params: {
 					eventData: {
 						businessType: Report.businessType.buttonClick,
-						objectType: Report.objectType.installButton
-					},
-                    extParams: {
+						objectType: Report.objectType.installButton,
                         postId: this.detail.postId,
                         srcContentId: this.detail.srcContentId,
                         senderId: this.detail.srcUserId,
-                        status: this.status,
-                    }
+                        status: '',
+					},
 				}
 			})
 			switch (extensionsInstallChannel) {
@@ -434,6 +450,7 @@ export default {
 				case '0':
 					this.getDetail()
 					if (data.data.receiveAmount == '0') {
+                        this.reportStatus = 'empty'
 						this.status = 'nothing'
 					} else {
 						if (data.data.newReceived) {
@@ -452,11 +469,13 @@ export default {
 					break;
 				case '2003':
 					// this.status = 'expire'
+                    this.reportStatus = 'empty'
 					this.getDetail()
 					this.status = 'nothing'
 					break
 				// 红包被领完了
 				case '2008':
+                    this.reportStatus = 'empty'
 					this.getDetail()
 					this.status = 'nothing'
 					break
@@ -467,6 +486,7 @@ export default {
 				default:
 					console.log('getRedPacket', data)
 					// this.show_home = false
+                    this.reportStatus = 'empty'
 					this.getDetail()
 					this.status = 'nothing'
 					break;
@@ -631,14 +651,12 @@ export default {
                     },
                     params: {
                         eventData: {
-                            businessType: Report.businessType.pageView
-                        },
-                        extParams: {
+                            businessType: Report.businessType.pageView,
                             postId: this.detail.postId,
                             srcContentId: this.detail.srcContentId,
                             senderId: this.detail.srcUserId,
-                            status: this.status,
-                        }
+                            status: this.reportStatus,
+                        },
                     }
                 })
             }, 500)
@@ -671,6 +689,7 @@ export default {
 			}else{
 				this.show_home = true
 				this.status = 'nothing'
+                this.reportStatus = 'empty'
 			}
 			this.setPickupInfo()
             setTimeout(() => {
@@ -685,19 +704,18 @@ export default {
                     params: {
                         eventData: {
                             businessType: Report.businessType.pageView,
-                        },
-                        extParams: {
                             postId: this.detail.postId,
                             srcContentId: this.detail.srcContentId,
                             senderId: this.detail.srcUserId,
-                            status: this.status,
-                        }
+                            status: this.reportStatus,
+                        },
                     }
                 });
-            }, 500)
+            }, 1000)
 		} else {
 			this.show_home = true
 			this.status = 'no-chrome'
+            this.reportStatus = 'not-chrome'
             Report.reportLog({
 				baseInfo: {
 					appVersionCode: this.appVersionCode,
@@ -709,13 +727,11 @@ export default {
 				params: {
 					eventData: {
 						businessType: Report.businessType.pageView,
-					},
-                    extParams: {
                         postId: this.detail.postId,
                         srcContentId: this.detail.srcContentId,
                         senderId: this.detail.srcUserId,
-                        status: this.status,
-                    }
+                        status: this.reportStatus,
+					},
 				}
 			})
 		}

+ 1064 - 0
pages/luckdraw.vue

@@ -0,0 +1,1064 @@
+<template>
+    <div class="content">
+        <template v-if="isLoading">
+            <img
+                class="loading"
+                src="../static/svg/icon-loading.svg" />
+        </template>
+        <template v-else>
+            <template v-if="isMobile">
+                <!-- 手机端 -->
+                <div class="small" :class="{ bg: status === 'not-open' }">
+                    <template v-if="status === 'not-open'">
+                        <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">
+                            <span class="t">🕒 {{ validity || '00:00:00' }}</span>
+                            <span class="w">🏆 {{ detail.postBizData.totalCount }} WINNERS</span>
+                        </div>
+                        <div class="box">
+                            <img src="../static/subject/icon-box.png" />
+                        </div>
+                    </template>
+                    <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>{{ 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">
+                                    <img :src="item.currencyIconPath" alt />
+                                    <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
+                                </div>
+                                <div class="luck-king" v-if="item.maxAmount">
+                                    <img src="/svg/icon-king-hat.svg" alt />
+                                    <span>Luckiest Draw</span>
+                                </div>
+                            </div>
+                        </div>
+                    </template>
+                    <div class="area-cp-link">
+                        <div class="area-list">
+                            <div class="item">
+                                <div class="icon"><img :src=" require('../static/subject/01.svg') " /></div>
+                                <div class="font">Complete the tasks on tweet</div>
+                            </div>
+                            <div class="item">
+                                <div class="icon"><img :src=" require('../static/subject/02.svg') " /></div>
+                                <div class="font">Open link on PC to draw</div>
+                                <div class="pc"><img :src=" require('../static/subject/pc.svg') " /></div>
+                            </div>
+                        </div>
+                        <div class="area-content">
+                            {{ linkHref }}
+                        </div>
+                        <div class="area-btn">
+                            <div class="btn" :data-clipboard-text="linkHref">Copy Link</div>
+                        </div>
+                    </div>
+                    <div class="layer" v-show="layer_show">
+                        <div class="layer-box">
+                            <div class="layer-txt">Unable to copy, please enter the link manually</div>
+                            <div class="layer-btn" @click="layer_show = false">Done</div>
+                        </div>
+                    </div>
+                </div>
+                <!-- 手机端 -->
+            </template>
+            <template v-else>
+                <div class="logo">
+                    <img src="/img/icon-logo.png" />
+                </div>
+                <div class="show">
+                    <div class="center">
+                        <div class="giveaway" :class="{ bg: status === 'not-open' }">
+                            <template v-if="status === 'not-open'">
+                                <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">
+                                    <span class="t">🕒 {{ validity || '00:00:00' }}</span>
+                                    <span class="w">🏆 {{ detail.postBizData.totalCount }} WINNERS</span>
+                                </div>
+                                <div class="box">
+                                    <img src="../static/subject/icon-box.png" />
+                                </div>
+                            </template>
+                            <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>{{ 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">
+                                            <img :src="item.currencyIconPath" alt />
+                                            <div class="luck-money-txt">{{ item.amountValue || 0 }}</div>
+                                        </div>
+                                        <div class="luck-king" v-if="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, formatSecondsAsTime } from '../utils/help.js'
+import FontAmount from '../components/FontAmount.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,
+	},
+    head() {
+		return {
+			type: '',
+			title: this.title,
+			appVersionCode: 3,
+			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 || ''
+				},
+				// 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 || ''
+				}
+			]
+		}
+	},
+    data() {
+        return {
+            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',
+        }
+    },
+    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 (e) {
+            this.layer_show = true
+        });
+    },
+    async asyncData(params) {
+		let { route } = params;
+		let { data } = await axios.post(`${baseURL}/denet/post/getDetail`, {
+			baseInfo: {
+				appVersionCode: appVersionCode,
+				mid: function () {
+					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);
+					});
+				}()
+			},
+			params: {
+				postId: route.params.id || ''
+			}
+		})
+		if (data.code == 0) {
+			if (data.data && data.data.postBizData && typeof data.data.postBizData == 'string') {
+				data.data.postBizData = JSON.parse(data.data.postBizData)
+			}
+			if(data.data.postBizData === null) {
+				data.data.postBizData = {
+					postUserInfo: {}
+				}
+			}
+            console.log('detail', data.data)
+
+			return {
+				detail: data.data,
+			}
+		}
+	},
+    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()
+            }
+		},
+        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')
+		},
+        installExtension() {
+            let { extensionsInstallChannel, extensionsInstallUrl } = this.config;
+            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(),
+			};
+			Cookies.set('pickup_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 = formatSecondsAsTime(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 > .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`
+                    } else {
+                        // 显示成功页面
+                        this.status = `success`
+                    }
+                } else {
+                    // 如果 任务完成状态 = 已经过期
+                    if (this.detail.postBizData.status == 1) {
+                        // 显示未打开页面
+                        this.status = 'not-open'
+                    } else {
+                        // 显示已经过期页面
+                        this.status = 'expire'
+                    }
+                }
+            } else {
+                // 如果 我没有领取过
+                // 如果 红包状态 = 进行中
+                if (this.detail.postBizData.status == 1) {
+                    // 如果 过了红包的领取截止时间 = true
+                    if (this.detail.postBizData.receiveTimeExpired) {
+                        // 显示过期页面
+                        this.status = 'expire'
+                    } else {
+                        // 如果 过了红包的领取截止时间 = false
+                        // 显示未打开页面
+                        this.status = 'not-open'
+                    }
+                } else {
+                    // 红包状态 = 已经结束了 | 已经终止 | 终止退款中
+                    // 显示过期页面
+                    this.status = 'expire'
+                }
+            }
+
+            // 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)
+                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
+				}
+			}
+		},
+    }
+}
+</script>
+
+<style lang="scss">
+html,
+body,
+#__nuxt,
+#__layout {
+	width: 100%;
+	height: 100%;
+	padding: 0;
+	margin: 0;
+}
+
+.content {
+    overflow: hidden;
+    width: 100%;
+    height: 100%;
+    background: #F5FAFF;
+    .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;
+            .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%);
+                }
+                .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: 30px;
+                    align-items: center;
+                    justify-content: center;
+                    font-weight: bold;
+                    font-size: 17px;
+                    line-height: 22px;
+                    text-align: center;
+                    .t {
+                        color: #fff;
+                        margin-right: 8px;
+                    }
+                    .w {
+                        color: #fcc74e;
+                        margin-left: 8px;
+                    }
+                }
+                .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%);
+    }
+    .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: 30px;
+        align-items: center;
+        justify-content: center;
+        font-weight: bold;
+        font-size: 17px;
+        line-height: 22px;
+        text-align: center;
+        .t {
+            color: #fff;
+            margin-right: 8px;
+        }
+        .w {
+            color: #fcc74e;
+            margin-left: 8px;
+        }
+    }
+    .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, .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-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;
+        }
+    }
+}
+</style>

BIN
static/subject/icon-box.png


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 6 - 0
static/svg/icon-luck-complete.svg


+ 11 - 0
static/svg/icon-luck-mark.svg

@@ -0,0 +1,11 @@
+<svg width="110" height="94" viewBox="0 0 110 94" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_19980_193811)">
+<rect x="19.9258" y="-27" width="152" height="31" transform="rotate(40 19.9258 -27)" fill="#FFBB55"/>
+<path d="M44.2663 18.332L39.6822 14.4856L45.6377 7.38815L43.4629 5.56327L35.8137 14.6792L42.5725 20.3505L44.2663 18.332ZM55.6641 15.5128C52.8512 13.1525 49.1759 13.4861 46.892 16.2079C44.6082 18.9296 44.9179 22.607 47.7308 24.9673C50.5437 27.3276 54.219 26.994 56.5028 24.2723C58.7867 21.5505 58.477 17.8731 55.6641 15.5128ZM53.9157 17.5965C55.4003 18.8422 55.5482 20.8082 54.2369 22.3709C52.9256 23.9336 50.9638 24.1294 49.4792 22.8837C47.9946 21.638 47.8467 19.672 49.158 18.1092C50.4693 16.5465 52.4311 16.3507 53.9157 17.5965ZM68.4067 26.4936L60.834 20.1394L59.1402 22.1579L61.8424 24.4253L55.887 31.5227L58.0618 33.3476L64.0172 26.2502L66.713 28.5122L68.4067 26.4936ZM76.6613 33.42L69.0885 27.0658L67.3948 29.0843L70.097 31.3517L64.1416 38.4491L66.3164 40.274L72.2718 33.1766L74.9675 35.4386L76.6613 33.42ZM78.8557 47.4559L74.0503 43.4236L75.449 41.7567L79.9484 45.5321L81.5875 43.5787L77.0881 39.8033L78.4103 38.2276L83.1897 42.2379L84.8343 40.278L77.8801 34.4428L70.2309 43.5587L77.2111 49.4158L78.8557 47.4559ZM86.5798 41.7427L78.9306 50.8586L81.1054 52.6835L83.9684 49.2715L84.2875 49.5392L83.8272 54.9673L86.4187 57.1419L86.7188 51.4684C88.5717 52.5793 90.3356 52.3284 91.5485 50.8829C93.0565 49.0858 92.7982 46.9605 90.5452 45.0701L86.5798 41.7427ZM88.8637 47.0212C89.632 47.6659 89.8756 48.3806 89.3347 49.0253C88.7883 49.6764 88.0497 49.5781 87.2683 48.9225L85.5037 47.4418L87.0991 45.5405L88.8637 47.0212ZM103.351 55.8157L100.903 53.7613L95.8108 55.6911L96.8205 50.3356L94.3006 48.2212L93.0494 56.7472L90.1154 60.2438L92.2967 62.0741L95.2417 58.5645L103.351 55.8157Z" fill="white"/>
+</g>
+<defs>
+<clipPath id="clip0_19980_193811">
+<rect width="110" height="94" fill="white"/>
+</clipPath>
+</defs>
+</svg>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 8 - 0
static/svg/icon-luck-rabbit.svg


+ 21 - 0
static/svg/icon-medal-0.svg

@@ -0,0 +1,21 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="0.5" width="19" height="19" rx="9.5" fill="url(#paint0_linear_19741_219202)" stroke="white"/>
+<g filter="url(#filter0_d_19741_219202)">
+<path d="M9.83008 14H11.582V5.54492H9.82422L7.63867 7.0625V8.65625L9.79492 7.16797H9.83008V14Z" fill="white"/>
+</g>
+<defs>
+<filter id="filter0_d_19741_219202" x="7.63867" y="5.54492" width="4.44336" height="8.95508" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="0.5" dy="0.5"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_19741_219202"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_19741_219202" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_19741_219202" x1="14.4444" y1="-1.66667" x2="2.77778" y2="22.2222" gradientUnits="userSpaceOnUse">
+<stop stop-color="#FEDE24"/>
+<stop offset="1" stop-color="#DFBF00"/>
+</linearGradient>
+</defs>
+</svg>

+ 21 - 0
static/svg/icon-medal-1.svg

@@ -0,0 +1,21 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="0.5" width="19" height="19" rx="9.5" fill="url(#paint0_linear_19741_220612)" stroke="white"/>
+<g filter="url(#filter0_d_19741_220612)">
+<path d="M6.87695 8.08789V8.11719H8.51758V8.08789C8.51758 7.30859 9.12109 6.73438 9.94141 6.73438C10.7266 6.73438 11.2832 7.23828 11.2832 7.87109C11.2832 8.45703 11.0195 8.88477 10.1641 9.74023L6.97656 12.8105V14H13.123V12.5938H9.30859V12.5586L11.3711 10.5723C12.3027 9.64648 13.0059 8.85547 13.0059 7.80078C13.0059 6.38867 11.7812 5.35742 10 5.35742C8.1543 5.35742 6.87695 6.48828 6.87695 8.08789Z" fill="white"/>
+</g>
+<defs>
+<filter id="filter0_d_19741_220612" x="6.87695" y="5.35742" width="6.74609" height="9.14258" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="0.5" dy="0.5"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_19741_220612"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_19741_220612" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_19741_220612" x1="7.77778" y1="20" x2="20" y2="3.33333" gradientUnits="userSpaceOnUse">
+<stop stop-color="#AFC3D2"/>
+<stop offset="1" stop-color="#CCDBE7"/>
+</linearGradient>
+</defs>
+</svg>

+ 21 - 0
static/svg/icon-medal-2.svg

@@ -0,0 +1,21 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="0.5" width="19" height="19" rx="9.5" fill="url(#paint0_linear_19741_220611)" stroke="white"/>
+<g filter="url(#filter0_d_19741_220611)">
+<path d="M8.875 10.3086H9.91797C10.873 10.3086 11.4531 10.7773 11.4531 11.5508C11.4531 12.2656 10.832 12.7637 9.94727 12.7637C9.01562 12.7637 8.42969 12.2949 8.37695 11.5801H6.68359C6.76562 13.1387 8.01367 14.1875 9.92383 14.1875C11.875 14.1875 13.252 13.1797 13.252 11.6621C13.252 10.4902 12.4375 9.72852 11.1777 9.62305V9.58789C12.2148 9.40039 12.9238 8.65039 12.9238 7.61328C12.9238 6.25977 11.7227 5.35742 9.96484 5.35742C8.13086 5.35742 6.91211 6.37695 6.84766 7.94141H8.47656C8.52344 7.20312 9.06836 6.7168 9.88867 6.7168C10.7676 6.7168 11.2539 7.16797 11.2539 7.85352C11.2539 8.55078 10.709 9.03125 9.90039 9.03125H8.875V10.3086Z" fill="white"/>
+</g>
+<defs>
+<filter id="filter0_d_19741_220611" x="6.68359" y="5.35742" width="7.06836" height="9.33008" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="0.5" dy="0.5"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_19741_220611"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_19741_220611" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_19741_220611" x1="7.77778" y1="17.7778" x2="20" y2="3.33333" gradientUnits="userSpaceOnUse">
+<stop stop-color="#D5AD88"/>
+<stop offset="1" stop-color="#F3DCC7"/>
+</linearGradient>
+</defs>
+</svg>

+ 23 - 0
utils/help.js

@@ -68,3 +68,26 @@ export function getBrowser() {
     }
     return browser;
 }
+
+export function formatSecondsAsTime(secs) {
+    var hr = Math.floor(secs / 3600)
+    var min = Math.floor((secs - (hr * 3600)) / 60)
+    var sec = Math.floor(secs - (hr * 3600) - (min * 60))
+    var text
+    if (hr < 10) {
+        hr = "0" + hr
+    }
+    if (min < 10) {
+        min = "0" + min
+    }
+    if (sec < 10) {
+        sec = "0" + sec
+    }
+    text = hr + ':' + min + ':' + sec
+
+    return text
+}
+
+export const appVersionCode = 12;
+
+export const appType = 1;

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.