|
@@ -3,31 +3,28 @@
|
|
|
<template v-if="isLogin && homeVisibility">
|
|
|
<div class="nav-bar">
|
|
|
<div class="item left">
|
|
|
- <img :src="require('../assets/svg/icon-denet-logo.svg')" />
|
|
|
+ <img :src="require('@/assets/svg/icon-denet-logo.svg')" />
|
|
|
DeNet
|
|
|
</div>
|
|
|
<div class="item right" @click="showTransactions">
|
|
|
- <img :src="require('../assets/svg/icon-option-list.svg')" />
|
|
|
+ <img :src="require('@/assets/svg/icon-option-list.svg')" />
|
|
|
Transactions
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <img
|
|
|
- :src="require('../assets/svg/icon-money.svg')"
|
|
|
- class="icon-money"
|
|
|
- />
|
|
|
+ <img :src="require('@/assets/svg/icon-money.svg')" class="icon-money" />
|
|
|
+ <div class="msg" v-show="walletWithdrawConfig.withdrawUSDPaypalFeeDesc">
|
|
|
+ ({{ walletWithdrawConfig.withdrawUSDPaypalFeeDesc }})</div>
|
|
|
<div class="amount">${{ canWithdrawBalance / 100 }}</div>
|
|
|
- <div class="withdraw-btn" @click="clickWithdraw">Withdraw</div>
|
|
|
- <div class="msg" v-show="walletWithdrawConfig.withdrawUSDPaypalFeeDesc">({{walletWithdrawConfig.withdrawUSDPaypalFeeDesc}})</div>
|
|
|
+ <div class="area-btn">
|
|
|
+ <div class="withdraw-btn" @click="clickWithdraw">Withdraw</div>
|
|
|
+ <div class="top-up-btn" @click="clickTopUp">Top Up</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="tab-bar">
|
|
|
- <div
|
|
|
- class="tab-item"
|
|
|
- :class="{ active: currentTabIndex == index }"
|
|
|
- v-for="(item, index) in tabList"
|
|
|
- :key="index"
|
|
|
- @click="clickTab(item, index)"
|
|
|
- >
|
|
|
+ <div class="tab-item" :class="{ active: currentTabIndex == index }" v-for="(item, index) in tabList"
|
|
|
+ :key="index" @click="clickTab(item, index)">
|
|
|
<img :src="item.icon" class="icon" />
|
|
|
{{ item.label }}
|
|
|
</div>
|
|
@@ -35,33 +32,21 @@
|
|
|
<div class="list-wrapper" ref="pageGiveListDom">
|
|
|
<div class="give-list" v-if="currentTabIndex == 0">
|
|
|
<template v-if="giveList.length">
|
|
|
- <div
|
|
|
- class="cell"
|
|
|
- v-for="(item, index) in giveList"
|
|
|
- :key="index"
|
|
|
- @click="clickListItem(item, index)"
|
|
|
- >
|
|
|
+ <div class="cell" v-for="(item, index) in giveList" :key="index"
|
|
|
+ @click="clickListItem(item, index)">
|
|
|
<div class="img-wrapper">
|
|
|
<!-- 收到红包 -->
|
|
|
<template v-if="item.type == 1">
|
|
|
- <img
|
|
|
- class="icon-avatar"
|
|
|
- :src="item.userInfo.avatarUrl"
|
|
|
- />
|
|
|
- <img
|
|
|
- class="icon-give"
|
|
|
- :src="
|
|
|
- require('../assets/svg/icon-giveaways.svg')
|
|
|
- "
|
|
|
- />
|
|
|
+ <img class="icon-avatar" :src="item.userInfo.avatarUrl" />
|
|
|
+ <img class="icon-give" :src="
|
|
|
+ require('@/assets/svg/icon-giveaways.svg')
|
|
|
+ " />
|
|
|
</template>
|
|
|
<!-- 发出去红包 -->
|
|
|
<template v-else-if="2">
|
|
|
- <img
|
|
|
- :src="
|
|
|
- require('../assets/svg/icon-list-big-give.svg')
|
|
|
- "
|
|
|
- />
|
|
|
+ <img :src="
|
|
|
+ require('@/assets/svg/icon-list-big-give.svg')
|
|
|
+ " />
|
|
|
</template>
|
|
|
</div>
|
|
|
<div class="info-wrapper">
|
|
@@ -87,28 +72,20 @@
|
|
|
<!-- 收到的 -->
|
|
|
<template v-if="item.type == 1">
|
|
|
<!-- 进行中-->
|
|
|
- <template
|
|
|
- v-if="item.status == 0"
|
|
|
- >
|
|
|
+ <template v-if="item.status == 0">
|
|
|
in progress
|
|
|
</template>
|
|
|
<!-- 已完成 -->
|
|
|
- <template
|
|
|
- v-else-if="item.status == 1"
|
|
|
- >
|
|
|
+ <template v-else-if="item.status == 1">
|
|
|
${{ item.amount / 100 }}
|
|
|
</template>
|
|
|
<!-- 已过期 -->
|
|
|
- <template
|
|
|
- v-else-if="item.status == 2"
|
|
|
- >
|
|
|
+ <template v-else-if="item.status == 2">
|
|
|
Timeout
|
|
|
</template>
|
|
|
</template>
|
|
|
<!-- 发出去的 -->
|
|
|
- <template
|
|
|
- v-else-if="item.type == 2"
|
|
|
- >
|
|
|
+ <template v-else-if="item.type == 2">
|
|
|
-${{ item.amount / 100 }}
|
|
|
</template>
|
|
|
</div>
|
|
@@ -119,82 +96,61 @@
|
|
|
Unpublished
|
|
|
</template>
|
|
|
<!-- 进行中 -->
|
|
|
- <template
|
|
|
- v-else-if="item.status == 1"
|
|
|
- >
|
|
|
+ <template v-else-if="item.status == 1">
|
|
|
{{
|
|
|
item.postTaskLuckdrop
|
|
|
.receivedCount
|
|
|
}}/{{
|
|
|
- item.postTaskLuckdrop
|
|
|
- .totalCount
|
|
|
- }}
|
|
|
+ item.postTaskLuckdrop
|
|
|
+ .totalCount
|
|
|
+}}
|
|
|
</template>
|
|
|
<!-- 已结束 -->
|
|
|
- <template
|
|
|
- v-else-if="item.status == 2"
|
|
|
- >
|
|
|
+ <template v-else-if="item.status == 2">
|
|
|
(Time expired)
|
|
|
{{
|
|
|
item.postTaskLuckdrop
|
|
|
.receivedCount
|
|
|
}}/{{
|
|
|
- item.postTaskLuckdrop
|
|
|
- .totalCount
|
|
|
- }}
|
|
|
+ item.postTaskLuckdrop
|
|
|
+ .totalCount
|
|
|
+}}
|
|
|
</template>
|
|
|
<!-- 红包未发出显示 -->
|
|
|
- <div
|
|
|
- v-if="item.postTaskLuckdrop.reSendAvailable"
|
|
|
- class="send-btn"
|
|
|
- @click.stop="sendTwitter(item)"
|
|
|
- >
|
|
|
+ <div v-if="item.postTaskLuckdrop.reSendAvailable" class="send-btn"
|
|
|
+ @click.stop="sendTwitter(item)">
|
|
|
Send
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 发红包,红包未发出隐藏-->
|
|
|
- <img
|
|
|
- v-if="
|
|
|
- !(
|
|
|
- item.type == 2 &&
|
|
|
- item.postTaskLuckdrop.reSendAvailable
|
|
|
- )
|
|
|
- "
|
|
|
- class="icon"
|
|
|
- :src="
|
|
|
- require('../assets/svg/icon-cell-arrow-right.svg')
|
|
|
- "
|
|
|
- />
|
|
|
+ <img v-if="
|
|
|
+ !(
|
|
|
+ item.type == 2 &&
|
|
|
+ item.postTaskLuckdrop.reSendAvailable
|
|
|
+ )
|
|
|
+ " class="icon" :src="
|
|
|
+ require('@/assets/svg/icon-cell-arrow-right.svg')
|
|
|
+" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <img
|
|
|
- class="icon-empty"
|
|
|
- :src="require('../assets/svg/icon-empty-list.svg')"
|
|
|
- />
|
|
|
+ <img class="icon-empty" :src="require('@/assets/svg/icon-empty-list.svg')" />
|
|
|
</template>
|
|
|
</div>
|
|
|
<div class="more-list" v-else>
|
|
|
- <div
|
|
|
- class="cell"
|
|
|
- v-for="(item, index) in moreTabList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
+ <div class="cell" v-for="(item, index) in moreTabList" :key="index">
|
|
|
<img class="icon" :src="item.icon" />
|
|
|
<div class="info-wrapper">
|
|
|
<div class="left">
|
|
|
{{ item.label }}
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <img
|
|
|
- class="icon"
|
|
|
- :src="
|
|
|
- require('../assets/svg/icon-cell-arrow-right.svg')
|
|
|
- "
|
|
|
- />
|
|
|
+ <img class="icon" :src="
|
|
|
+ require('@/assets/svg/icon-cell-arrow-right.svg')
|
|
|
+ " />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -205,31 +161,26 @@
|
|
|
<option-login v-if="!isLogin" @loginAction="loginAction" />
|
|
|
<template v-if="isLogin && !homeVisibility">
|
|
|
<!-- 交易列表 -->
|
|
|
- <option-transactions
|
|
|
- v-if="transactionsVisibility"
|
|
|
- @back="transactionsBack"
|
|
|
- />
|
|
|
+ <option-transactions v-if="transactionsVisibility" @back="transactionsBack" />
|
|
|
<!-- 提现页 -->
|
|
|
- <option-withdraw
|
|
|
- :amountValue="canWithdrawBalance"
|
|
|
- :walletWithdrawConfig="walletWithdrawConfig"
|
|
|
- v-if="withdrawVisibility"
|
|
|
- @back="withdrawBack"
|
|
|
- />
|
|
|
+ <option-withdraw :amountValue="canWithdrawBalance" :walletWithdrawConfig="walletWithdrawConfig"
|
|
|
+ v-if="withdrawVisibility" @back="withdrawBack" />
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-/* eslint-disable */
|
|
|
-import { ref, reactive, onMounted, watch } from "vue";
|
|
|
-import optionTransactions from "./components/options-transactions";
|
|
|
-import optionLogin from "./components/option-login.vue";
|
|
|
-import optionWithdraw from "./components/option-withdraw.vue";
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
+
|
|
|
+import optionTransactions from "@/view/components/options-transactions";
|
|
|
+import optionLogin from "@/view/components/option-login.vue";
|
|
|
+import optionWithdraw from "@/view/components/option-withdraw.vue";
|
|
|
import {
|
|
|
getChromeStorage,
|
|
|
-} from "../uilts/chromeExtension";
|
|
|
-import { getBalance, getMineLuckdropRecords, getWithdrawConfig } from "../http/account";
|
|
|
+} from "@/uilts/chromeExtension";
|
|
|
+import { getBalance, getMineLuckdropRecords, getWithdrawConfig } from "@/http/account";
|
|
|
+import router from "@/router/popup.js";
|
|
|
+
|
|
|
var moment = require("moment");
|
|
|
|
|
|
let pageWrapperDom = ref(null);
|
|
@@ -257,30 +208,30 @@ let giveReqParams = {
|
|
|
|
|
|
|
|
|
let walletWithdrawConfig = ref({
|
|
|
- withdrawUSDPaypalFee: 0,
|
|
|
- withdrawUSDPreMinAmount: 100,
|
|
|
- withdrawUSDSwitch: "",
|
|
|
- withdrawUSDPaypalFeeDesc: ''
|
|
|
- });
|
|
|
+ withdrawUSDPaypalFee: 0,
|
|
|
+ withdrawUSDPreMinAmount: 100,
|
|
|
+ withdrawUSDSwitch: "",
|
|
|
+ withdrawUSDPaypalFeeDesc: ''
|
|
|
+});
|
|
|
|
|
|
let moreTabList = ref([
|
|
|
{
|
|
|
- icon: require("../assets/svg/icon-twitter.svg"),
|
|
|
+ icon: require("@/assets/svg/icon-twitter.svg"),
|
|
|
label: "Twitter contact",
|
|
|
},
|
|
|
{
|
|
|
- icon: require("../assets/svg/icon-about.svg"),
|
|
|
+ icon: require("@/assets/svg/icon-about.svg"),
|
|
|
label: "About",
|
|
|
},
|
|
|
]);
|
|
|
|
|
|
let tabList = ref([
|
|
|
{
|
|
|
- icon: require("../assets/svg/icon-giveaways.svg"),
|
|
|
+ icon: require("@/assets/svg/icon-giveaways.svg"),
|
|
|
label: "Giveaways",
|
|
|
},
|
|
|
{
|
|
|
- icon: require("../assets/svg/icon-more.svg"),
|
|
|
+ icon: require("@/assets/svg/icon-more.svg"),
|
|
|
label: "More",
|
|
|
},
|
|
|
]);
|
|
@@ -396,8 +347,8 @@ const clickTab = (params, index) => {
|
|
|
/**
|
|
|
* 点击列表跳转到推文
|
|
|
*/
|
|
|
-const clickListItem = (params, index) => {
|
|
|
- if(!params.srcContentId) {
|
|
|
+const clickListItem = (params) => {
|
|
|
+ if (!params.srcContentId) {
|
|
|
return;
|
|
|
}
|
|
|
let url = "";
|
|
@@ -448,7 +399,7 @@ const showTransactions = () => {
|
|
|
};
|
|
|
|
|
|
const clickWithdraw = () => {
|
|
|
- if(isRequestWithdrawBalance.value) {
|
|
|
+ if (isRequestWithdrawBalance.value) {
|
|
|
homeVisibility.value = false;
|
|
|
withdrawVisibility.value = true;
|
|
|
}
|
|
@@ -489,13 +440,22 @@ const sendTwitter = (params) => {
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
+// 点击提现
|
|
|
+const clickTopUp = ()=>{
|
|
|
+ // router
|
|
|
+ console.log(router)
|
|
|
+ router.push('project');
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-html,body {
|
|
|
+html,
|
|
|
+body {
|
|
|
padding: 0 !important;
|
|
|
margin: 0 !important;
|
|
|
}
|
|
|
+
|
|
|
.page-wrapper {
|
|
|
width: 375px;
|
|
|
height: 600px;
|
|
@@ -514,6 +474,7 @@ html,body {
|
|
|
align-items: center;
|
|
|
font-size: 13px;
|
|
|
cursor: pointer;
|
|
|
+
|
|
|
img {
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
@@ -546,18 +507,38 @@ html,body {
|
|
|
font-size: 42px;
|
|
|
}
|
|
|
|
|
|
- .withdraw-btn {
|
|
|
- background: rgba(56, 154, 255, 0.01);
|
|
|
- border: 1px solid #ffb443;
|
|
|
- box-sizing: border-box;
|
|
|
- width: 120px;
|
|
|
- height: 38px;
|
|
|
- text-align: center;
|
|
|
- line-height: 38px;
|
|
|
- border-radius: 100px;
|
|
|
- color: #ffb443;
|
|
|
- display: inline-block;
|
|
|
- cursor: pointer;
|
|
|
+ .area-btn {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ font-weight: 600;
|
|
|
+ font-size: 15px;
|
|
|
+
|
|
|
+ .top-up-btn {
|
|
|
+ border: 1px solid #ffb443;
|
|
|
+ color: #fff;
|
|
|
+ background: #FFB443;
|
|
|
+ border-radius: 100px;
|
|
|
+ width: 110px;
|
|
|
+ height: 38px;
|
|
|
+ margin-left: 8px;
|
|
|
+ line-height: 38px;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .withdraw-btn {
|
|
|
+ background: rgba(56, 154, 255, 0.01);
|
|
|
+ border: 1px solid #ffb443;
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 110px;
|
|
|
+ font-size: 15px;
|
|
|
+ height: 38px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 38px;
|
|
|
+ border-radius: 100px;
|
|
|
+ color: #ffb443;
|
|
|
+ display: inline-block;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.msg {
|
|
@@ -603,9 +584,11 @@ html,body {
|
|
|
|
|
|
.list-wrapper {
|
|
|
min-height: 202px;
|
|
|
+
|
|
|
.give-list {
|
|
|
min-height: 202px;
|
|
|
position: relative;
|
|
|
+
|
|
|
.cell {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
@@ -619,17 +602,20 @@ html,body {
|
|
|
position: relative;
|
|
|
margin-right: 16px;
|
|
|
box-sizing: border-box;
|
|
|
+
|
|
|
.icon-avatar {
|
|
|
width: 34px;
|
|
|
height: 34px;
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
+
|
|
|
.icon-give {
|
|
|
position: absolute;
|
|
|
right: -4px;
|
|
|
bottom: 2px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.info-wrapper {
|
|
|
flex: 1;
|
|
|
height: 100%;
|
|
@@ -639,27 +625,32 @@ html,body {
|
|
|
border-bottom: 1px solid #d1d1d1;
|
|
|
box-sizing: border-box;
|
|
|
padding-right: 16px;
|
|
|
+
|
|
|
.left {
|
|
|
.nickname {
|
|
|
font-weight: 500;
|
|
|
font-size: 14px;
|
|
|
margin-bottom: 5px;
|
|
|
}
|
|
|
+
|
|
|
.time {
|
|
|
font-size: 12px;
|
|
|
color: #b6b6b6;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.right {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
cursor: pointer;
|
|
|
+
|
|
|
.msg {
|
|
|
.bold {
|
|
|
font-weight: 500;
|
|
|
font-size: 14px;
|
|
|
text-align: right;
|
|
|
}
|
|
|
+
|
|
|
.desc {
|
|
|
font-size: 12px;
|
|
|
color: #b6b6b6;
|
|
@@ -683,6 +674,7 @@ html,body {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.icon {
|
|
|
width: 18px;
|
|
|
height: 24px;
|
|
@@ -691,6 +683,7 @@ html,body {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.icon-empty {
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
@@ -698,6 +691,7 @@ html,body {
|
|
|
transform: translate(-50%, -50%);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.more-list {
|
|
|
.cell {
|
|
|
display: flex;
|
|
@@ -706,11 +700,13 @@ html,body {
|
|
|
height: 66px;
|
|
|
box-sizing: border-box;
|
|
|
padding-left: 20px;
|
|
|
+
|
|
|
.icon {
|
|
|
width: 42px;
|
|
|
height: 42px;
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
+
|
|
|
.info-wrapper {
|
|
|
flex: 1;
|
|
|
height: 100%;
|
|
@@ -725,10 +721,12 @@ html,body {
|
|
|
font-weight: 500;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
+
|
|
|
.right {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
cursor: pointer;
|
|
|
+
|
|
|
.icon {
|
|
|
width: 18px;
|
|
|
height: 24px;
|