|
@@ -4,20 +4,27 @@
|
|
|
<div class="list-wrapper" ref="pageGiveListDom">
|
|
|
<div class="give-list" v-if="currentTabIndex == 0">
|
|
|
<template v-if="giveList.length">
|
|
|
- <div class="cell" :class="{ 'cell-center': item.type == 1 || item.type == 3 }"
|
|
|
+ <div class="cell" :class="{ 'cell-center': item.type == 1 || item.type == 3 || item.type == 5 }"
|
|
|
v-for="(item, index) in giveList" :key="index" @click="clickListItem(item, index)">
|
|
|
<red-dot class="red-dots" v-if="item.unReadMsgCount > 0 && isReadMsg"></red-dot>
|
|
|
|
|
|
<div class="img-wrapper">
|
|
|
<!-- 收到红包 -->
|
|
|
- <template v-if="item.type == 1 || item.type == 3">
|
|
|
+ <template v-if="item.type == 1 || item.type == 3 || item.type == 5">
|
|
|
<img class="icon-avatar" :src="item.userInfo.avatarUrl" />
|
|
|
- <img class="icon-give" :src="require('@/assets/svg/icon-get-giveaways-s.svg')" />
|
|
|
+ <img class="icon-give" v-if="item.type == 5" :src="require('@/assets/svg/icon-small-treasure.svg')" />
|
|
|
+ <img class="icon-give" v-else :src="require('@/assets/svg/icon-get-giveaways-s.svg')" />
|
|
|
</template>
|
|
|
<!-- 发出去红包 -->
|
|
|
<template v-else-if="item.type == 2">
|
|
|
- <img class="icon-big-give" :src="require('@/assets/svg/icon-send-giveaways-s.svg')" />
|
|
|
- <img class="icon-mark-give" :src="require('@/assets/svg/icon-send-giveaways-mark.svg')" />
|
|
|
+ <template v-if="item.postTaskLuckdrop.luckdropType === PlayType.treasure">
|
|
|
+ <img class="icon-big-give" :src="require('@/assets/svg/icon-big-treasure.svg')" />
|
|
|
+ <img class="icon-mark-give" :src="require('@/assets/svg/icon-send-giveaways-mark.svg')" />
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <img class="icon-big-give" :src="require('@/assets/svg/icon-send-giveaways-s.svg')" />
|
|
|
+ <img class="icon-mark-give" :src="require('@/assets/svg/icon-send-giveaways-mark.svg')" />
|
|
|
+ </template>
|
|
|
</template>
|
|
|
<!-- 转出NFT记录 -->
|
|
|
<template v-else-if="item.type == 4">
|
|
@@ -34,14 +41,22 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <div class="info-wrapper" :class="{ 'info-center': item.type == 1 }">
|
|
|
+ <div class="info-wrapper" :class="{ 'info-center': item.type == 1 || item.type == 5 }">
|
|
|
<div class="left">
|
|
|
<div class="nickname">
|
|
|
<template v-if="item.type == 1">
|
|
|
Get Giveaway
|
|
|
</template>
|
|
|
<template v-else-if="item.type == 2">
|
|
|
- {{ item.postTaskLuckdrop.luckdropType === 1 ? 'Send Giveaway' : 'Lottery Giveaway' }}
|
|
|
+ <template v-if="item.postTaskLuckdrop.luckdropType === PlayType.common">
|
|
|
+ Send Giveaway
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.postTaskLuckdrop.luckdropType === PlayType.lottery">
|
|
|
+ Lottery Giveaway
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.postTaskLuckdrop.luckdropType === PlayType.treasure">
|
|
|
+ Treasure Hunt
|
|
|
+ </template>
|
|
|
</template>
|
|
|
<template v-else-if="item.type == 3">
|
|
|
Lottery
|
|
@@ -49,6 +64,9 @@
|
|
|
<template v-else-if="item.type == 4">
|
|
|
Transfer NFT
|
|
|
</template>
|
|
|
+ <template v-else-if="item.type == 5">
|
|
|
+ Treasure Hunt
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<div class="time">
|
|
|
{{ moment(item.timestamp).format("MM-DD HH:mm:ss") }}
|
|
@@ -59,11 +77,11 @@
|
|
|
<div class="bold" :class="{
|
|
|
'align-content':
|
|
|
(item.type == 2 ||
|
|
|
- (item.type == 1 && item.status == 1)) &&
|
|
|
+ (item.type == 1 && item.status == 1 || item.type == 5 && item.status == 1)) &&
|
|
|
item?.amount?.length + item?.currencySymbol?.length > 12,
|
|
|
'custom-bold': item.rewardType === RewardType.custom
|
|
|
}">
|
|
|
- <!-- 收到的 -->
|
|
|
+ <!-- 领取的普通红包 -->
|
|
|
<template v-if="item.type == 1">
|
|
|
<!-- 进行中-->
|
|
|
<template v-if="item.status == 0">
|
|
@@ -120,6 +138,7 @@
|
|
|
|
|
|
</template>
|
|
|
</template>
|
|
|
+ <!-- 抽奖 -->
|
|
|
<template v-else-if="item.type == 3">
|
|
|
<template v-if="item.status == 1">In Progress</template>
|
|
|
<template v-else-if="item.status == 2">
|
|
@@ -156,12 +175,38 @@
|
|
|
Giveaway Expired
|
|
|
</template>
|
|
|
</template>
|
|
|
+ <!-- NFT 转出记录 -->
|
|
|
<template v-else-if="item.type == 4">
|
|
|
<template v-if="item.status == 0 || item.status == 1">Transferring</template>
|
|
|
<template v-else-if="item.status == 2">Successful</template>
|
|
|
<template v-else-if="item.status == 3">Transfe Failed</template>
|
|
|
</template>
|
|
|
+ <!-- 领取的夺宝红包 -->
|
|
|
+ <template v-else-if="item.type == 5">
|
|
|
+ <!-- 进行中-->
|
|
|
+ <template v-if="item.status == 0">
|
|
|
+ In Progress
|
|
|
+ </template>
|
|
|
+ <!-- 已完成 -->
|
|
|
+ <template v-else-if="item.status == 2">
|
|
|
+ <span class="blance">
|
|
|
+ <a-tooltip :title="item.amount">
|
|
|
+ {{ getBit(item.amount) }}</a-tooltip>
|
|
|
+ </span>
|
|
|
+ <div class="coin-type-wrapper">
|
|
|
+ <span class="coin-type">{{
|
|
|
+ item.currencySymbol || ""
|
|
|
+ }}</span>
|
|
|
+ <img :src="item.currencyIconPath" alt="" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 已过期 -->
|
|
|
+ <template v-else-if="item.status == 3">
|
|
|
+ Giveaway Expired
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
+
|
|
|
<!-- 发出的红包显示 -->
|
|
|
<div class="desc" v-if="item.type == 2">
|
|
|
<!-- 未发送-->
|
|
@@ -170,7 +215,7 @@
|
|
|
</template>
|
|
|
<!-- 进行中 -->
|
|
|
<template v-else-if="item.status == 1">
|
|
|
- <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 2">
|
|
|
+ <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == PlayType.lottery">
|
|
|
{{ item.downTime || '' }}
|
|
|
</template>
|
|
|
<template v-else>
|
|
@@ -179,12 +224,13 @@
|
|
|
}}
|
|
|
</template>
|
|
|
</template>
|
|
|
+
|
|
|
<!-- 2:已结束; 3:提前终止-->
|
|
|
<template v-else-if="item.status == 2 || item.status == 3">
|
|
|
<!-- 普通红包 -->
|
|
|
- <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1">
|
|
|
+ <template v-if="item.postTaskLuckdrop.luckdropType == PlayType.common || item.postTaskLuckdrop.luckdropType == PlayType.treasure">
|
|
|
<template v-if="item.status == 2">
|
|
|
- (Time expired)
|
|
|
+ {{item.postTaskLuckdrop.luckdropType == PlayType.common ? '(Time expired)': 'Complete'}}
|
|
|
</template>
|
|
|
<template v-if="item.status == 3">
|
|
|
{{ item.srcContentId ? '(Termination)' : 'Termination' }}
|
|
@@ -208,8 +254,7 @@
|
|
|
}}
|
|
|
</template>
|
|
|
|
|
|
- <!-- 进行中或者未发送成功时显示
|
|
|
- v-if="item.status == 1 || item.postTaskLuckdrop.reSendAvailable"-->
|
|
|
+ <!-- 进行中或者未发送成功时显示 -->
|
|
|
<div class="desc-bottom-bar">
|
|
|
<!-- 没有终止红包时显示 -->
|
|
|
<div v-if="item.postTaskLuckdrop.terminatedAvailable" class="btn"
|
|
@@ -259,7 +304,7 @@ import { terminatedLuckdrop } from "@/http/redPacket";
|
|
|
import { readAllMsgByType, getAllMessageInfo } from "@/http/messageApi"
|
|
|
import { setBadgeInfo, hideBadge } from "@/logic/background/twitter";
|
|
|
import { getChromeStorage } from "@/uilts/chromeExtension";
|
|
|
-import { RewardType } from "@/types";
|
|
|
+import { PlayType, RewardType } from '@/types';
|
|
|
|
|
|
var moment = require("moment");
|
|
|
|
|
@@ -412,13 +457,22 @@ const terminaHandler = (params, index) => {
|
|
|
terminaTask.index = index;
|
|
|
|
|
|
// set font
|
|
|
- if (params && params.postTaskLuckdrop && params.postTaskLuckdrop.luckdropType == 2) {
|
|
|
- modalTitle.value = `Early Termination of Lottery?`
|
|
|
- modalContent.value = `This operation will terminate the lottery process and refund the lottery prizes.`
|
|
|
+ if(params && params.postTaskLuckdrop) {
|
|
|
+ if (params.postTaskLuckdrop.luckdropType == PlayType.lottery) {
|
|
|
+ modalTitle.value = `Early Termination of Lottery?`
|
|
|
+ modalContent.value = `This operation will terminate the lottery process and refund the lottery prizes.`
|
|
|
+ } else if(params.postTaskLuckdrop.luckdropType == PlayType.treasure) {
|
|
|
+ modalTitle.value = `Early Termination of treasure Hunt?`
|
|
|
+ modalContent.value = `This operation will stop the treasure hunt and refund the remaining amount within 2 days`
|
|
|
+ } else{
|
|
|
+ modalTitle.value = `Early termination of Giveaway?`
|
|
|
+ modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
|
|
|
+ }
|
|
|
} else {
|
|
|
modalTitle.value = `Early termination of Giveaway?`
|
|
|
modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
|
|
|
}
|
|
|
+
|
|
|
modalVisible.value = true;
|
|
|
};
|
|
|
|