|
@@ -7,8 +7,10 @@
|
|
<div class="pop-mask"
|
|
<div class="pop-mask"
|
|
v-show="showCurrencyPop"
|
|
v-show="showCurrencyPop"
|
|
@click.stop="showCurrencyPop = false"></div>
|
|
@click.stop="showCurrencyPop = false"></div>
|
|
|
|
+ <!-- 头部 -->
|
|
<div class="head">
|
|
<div class="head">
|
|
<div class="left">
|
|
<div class="left">
|
|
|
|
+ <!-- 关闭按钮 -->
|
|
<div class="close-btn" @click="close">
|
|
<div class="close-btn" @click="close">
|
|
<img class="icon-close"
|
|
<img class="icon-close"
|
|
:src="require('../../assets/svg/icon-close.svg')"
|
|
:src="require('../../assets/svg/icon-close.svg')"
|
|
@@ -17,11 +19,13 @@
|
|
:src="require('../../assets/svg/icon-back.svg')"
|
|
:src="require('../../assets/svg/icon-back.svg')"
|
|
v-else/>
|
|
v-else/>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 标题 -->
|
|
<div class="title">
|
|
<div class="title">
|
|
{{ currentComData[showComType]["title"] }}
|
|
{{ currentComData[showComType]["title"] }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="right">
|
|
<div class="right">
|
|
|
|
+ <!-- 更多按钮 -->
|
|
<img :src="require('@/assets/svg/icon-more-l.svg')"
|
|
<img :src="require('@/assets/svg/icon-more-l.svg')"
|
|
class="more"
|
|
class="more"
|
|
@click="showMoreOption = true">
|
|
@click="showMoreOption = true">
|
|
@@ -37,9 +41,14 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 内容 -->
|
|
<div class="body">
|
|
<div class="body">
|
|
|
|
+ <img src="@/assets/gif/icon-guide-select.gif"
|
|
|
|
+ class="icon-guide-select"
|
|
|
|
+ v-if="!currentCurrencyInfo.currencyCode && showComType == 'default'">
|
|
<!-- 充值组件 -->
|
|
<!-- 充值组件 -->
|
|
<top-up v-if="showComType == 'topUp'"
|
|
<top-up v-if="showComType == 'topUp'"
|
|
|
|
+ :asyncIng="asyncIng"
|
|
:currentCurrencyInfo="tempCurrentCurrencyInfo"
|
|
:currentCurrencyInfo="tempCurrentCurrencyInfo"
|
|
@topUpDone="topUpDone"></top-up>
|
|
@topUpDone="topUpDone"></top-up>
|
|
<!-- 表单填写容器 -->
|
|
<!-- 表单填写容器 -->
|
|
@@ -65,26 +74,27 @@
|
|
<div class="form-wrapper" v-if="showComType == 'default'">
|
|
<div class="form-wrapper" v-if="showComType == 'default'">
|
|
<img
|
|
<img
|
|
class="img-mode"
|
|
class="img-mode"
|
|
- src="../../assets/img/img-mode.png"
|
|
|
|
|
|
+ :src="require('@/assets/svg/img-mode.svg')"
|
|
/>
|
|
/>
|
|
<!-- 金额、数量 -->
|
|
<!-- 金额、数量 -->
|
|
<div class="form-base">
|
|
<div class="form-base">
|
|
<div class="item currency-select-wrapper">
|
|
<div class="item currency-select-wrapper">
|
|
<div
|
|
<div
|
|
class="label currency-select"
|
|
class="label currency-select"
|
|
|
|
+ :class="{'selected': currentCurrencyInfo.currencyCode}"
|
|
@click="showCurrencyPop = true"
|
|
@click="showCurrencyPop = true"
|
|
>
|
|
>
|
|
- <img
|
|
|
|
|
|
+ <img v-if="currentCurrencyInfo.iconPath"
|
|
class="icon"
|
|
class="icon"
|
|
- :src="currentCurrencyInfo.iconPath || require('../../assets/svg/icon-currency.svg')"
|
|
|
|
|
|
+ :src="currentCurrencyInfo.iconPath"
|
|
/>
|
|
/>
|
|
<div class="text">
|
|
<div class="text">
|
|
- {{currentCurrencyInfo.currencyCode == 'USD' ? 'USD' : currentCurrencyInfo.tokenSymbol || 'Currency'}}
|
|
|
|
|
|
+ {{currentCurrencyInfo.currencyCode == 'USD' ? 'USD' : currentCurrencyInfo.tokenSymbol || 'Select a Reward'}}
|
|
</div>
|
|
</div>
|
|
<img
|
|
<img
|
|
class="arrow"
|
|
class="arrow"
|
|
- :src="
|
|
|
|
- require('../../assets/svg/icon-form-arrow-down.svg')
|
|
|
|
|
|
+ :src="currentCurrencyInfo.currencyCode ?
|
|
|
|
+ require('../../assets/svg/icon-form-arrow-down.svg') : require('../../assets/svg/icon-form-white-arrow-down.svg')
|
|
"
|
|
"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
@@ -206,27 +216,17 @@
|
|
<el-switch v-model="openAntiBot" />
|
|
<el-switch v-model="openAntiBot" />
|
|
</div>
|
|
</div>
|
|
<!-- 提示 -->
|
|
<!-- 提示 -->
|
|
- <div class="tips-wrapper">
|
|
|
|
- <div class="title">TIPS</div>
|
|
|
|
- <div class="row">
|
|
|
|
- 1. Only after the user completes the
|
|
|
|
- tasks you set, they can claim your red
|
|
|
|
- envelopes
|
|
|
|
- </div>
|
|
|
|
- <div class="row">
|
|
|
|
- 2. Each user can only receive one red
|
|
|
|
- envelope
|
|
|
|
- </div>
|
|
|
|
- <div class="row">
|
|
|
|
- 3. The red envelope issued is valid for
|
|
|
|
- 7 days. Please promote your red envelope
|
|
|
|
- as much as possible within the validity
|
|
|
|
- period. After the red envelope expires,
|
|
|
|
- the red envelope will be returned to
|
|
|
|
- your DeNet wallet.
|
|
|
|
- </div>
|
|
|
|
- <div class="more">More</div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <ul class="tips-wrapper">
|
|
|
|
+ <li class="row">
|
|
|
|
+ Rewards can only be claimed after the target user completes all tasks you set.
|
|
|
|
+ </li>
|
|
|
|
+ <li class="row">
|
|
|
|
+ Each user can only receive a reward once per task
|
|
|
|
+ </li>
|
|
|
|
+ <li class="row">
|
|
|
|
+ The reward will expire in 7 days once issued. Please promote it as much as possible within this period. After experiment, remaining rewards will be returned to your DeNet Wallet.
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
|
|
<div class="submit-btn-wrapper">
|
|
<div class="submit-btn-wrapper">
|
|
<div class="submit-btn"
|
|
<div class="submit-btn"
|
|
@@ -288,8 +288,8 @@ import { postPublish, verifyPaypalResult, syncChainTokenRechargeRecord } from "@
|
|
import { payCalcFee, getPayConfig } from "@/http/pay";
|
|
import { payCalcFee, getPayConfig } from "@/http/pay";
|
|
import { getFrontConfig } from "@/http/account";
|
|
import { getFrontConfig } from "@/http/account";
|
|
import { throttle } from "@/uilts/help"
|
|
import { throttle } from "@/uilts/help"
|
|
-import { ElMessage, ElLoading } from "element-plus";
|
|
|
|
-import "element-plus/es/components/message/style/css";
|
|
|
|
|
|
+import { ElLoading } from "element-plus";
|
|
|
|
+import { message } from 'ant-design-vue';
|
|
|
|
|
|
import {create, all} from "mathjs";
|
|
import {create, all} from "mathjs";
|
|
|
|
|
|
@@ -353,6 +353,8 @@ let previewFontSize = ref(56);
|
|
|
|
|
|
let postId = ref('');
|
|
let postId = ref('');
|
|
|
|
|
|
|
|
+let asyncIng = ref(false);
|
|
|
|
+
|
|
let messageBoxData = ref({
|
|
let messageBoxData = ref({
|
|
title: "",
|
|
title: "",
|
|
content: "",
|
|
content: "",
|
|
@@ -541,6 +543,17 @@ const messageBoxBlock = ({ title = "", content = "" }) => {
|
|
messageBoxData.value.content = content;
|
|
messageBoxData.value.content = content;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 确定
|
|
|
|
+ */
|
|
|
|
+const messageBoxConfirm = () => {
|
|
|
|
+ showMessageBox.value = false;
|
|
|
|
+ showComType.value = "topUp";
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 取消
|
|
|
|
+ */
|
|
const messageBoxCancel = () => {
|
|
const messageBoxCancel = () => {
|
|
currentCurrencyInfo.value = tempCurrentCurrencyInfo.value;
|
|
currentCurrencyInfo.value = tempCurrentCurrencyInfo.value;
|
|
showMessageBox.value = false;
|
|
showMessageBox.value = false;
|
|
@@ -550,11 +563,6 @@ const messageBoxCancel = () => {
|
|
onIptSetErrorTxt();
|
|
onIptSetErrorTxt();
|
|
};
|
|
};
|
|
|
|
|
|
-const messageBoxConfirm = () => {
|
|
|
|
- showMessageBox.value = false;
|
|
|
|
- showComType.value = "topUp";
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 去充值
|
|
* 去充值
|
|
*/
|
|
*/
|
|
@@ -567,7 +575,9 @@ const goTopUp = () => {
|
|
*/
|
|
*/
|
|
const topUpDone = () => {
|
|
const topUpDone = () => {
|
|
currentCurrencyInfo.value = tempCurrentCurrencyInfo.value;
|
|
currentCurrencyInfo.value = tempCurrentCurrencyInfo.value;
|
|
|
|
+ asyncIng.value = true;
|
|
asyncTokenRechRecord((res) => {
|
|
asyncTokenRechRecord((res) => {
|
|
|
|
+ asyncIng.value = false;
|
|
showCurrencyPop.value = false;
|
|
showCurrencyPop.value = false;
|
|
showComType.value = 'default';
|
|
showComType.value = 'default';
|
|
if(res.code == 0 && res.data && res.data.length) {
|
|
if(res.code == 0 && res.data && res.data.length) {
|
|
@@ -579,6 +589,9 @@ const topUpDone = () => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 更新货币余额
|
|
|
|
+ */
|
|
const updateCurrencyBanlce = () => {
|
|
const updateCurrencyBanlce = () => {
|
|
if(!refreshRotate.value) {
|
|
if(!refreshRotate.value) {
|
|
refreshRotate.value = true;
|
|
refreshRotate.value = true;
|
|
@@ -736,22 +749,13 @@ const payStatusHandle = (payStatus) => {
|
|
initParams();
|
|
initParams();
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
- ElMessage({
|
|
|
|
- message: "Pay Fail",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
|
|
+ message.error('Pay Fail');
|
|
break;
|
|
break;
|
|
case 3:
|
|
case 3:
|
|
- ElMessage({
|
|
|
|
- message: "Pay Exceptions",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
|
|
+ message.error('Pay Exceptions');
|
|
break;
|
|
break;
|
|
case 4:
|
|
case 4:
|
|
- ElMessage({
|
|
|
|
- message: "Pay Exceptions",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
|
|
+ message.error('Pay Exceptions');
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -901,19 +905,19 @@ const setIsEmptyTxt = () => {
|
|
const onIptSetErrorTxt = (params) => {
|
|
const onIptSetErrorTxt = (params) => {
|
|
if(!currentCurrencyInfo.value.currencyCode) {
|
|
if(!currentCurrencyInfo.value.currencyCode) {
|
|
iptErrMsgTxt.value = "Please select a currency"
|
|
iptErrMsgTxt.value = "Please select a currency"
|
|
- } else if (!baseFormData.amountValue) {
|
|
|
|
|
|
+ } else if (!baseFormData.amountValue || baseFormData.amountValue == '0') {
|
|
iptErrMsgTxt.value = "Please enter the ‘reward’ amount";
|
|
iptErrMsgTxt.value = "Please enter the ‘reward’ amount";
|
|
- } else if (!baseFormData.totalCount) {
|
|
|
|
|
|
+ } else if (!baseFormData.totalCount || baseFormData.totalCount == '0') {
|
|
iptErrMsgTxt.value = "Please enter the ‘winners’ amount";
|
|
iptErrMsgTxt.value = "Please enter the ‘winners’ amount";
|
|
} else if(+baseFormData.amountValue < +currentCurrencyInfo.value.balance) {
|
|
} else if(+baseFormData.amountValue < +currentCurrencyInfo.value.balance) {
|
|
let res = calcIptValue();
|
|
let res = calcIptValue();
|
|
if (!res.flag) {
|
|
if (!res.flag) {
|
|
- iptErrMsgTxt.value = `Please reduce the ‘winners’ amount to ${res.count}`;
|
|
|
|
|
|
+ iptErrMsgTxt.value = `Please enter at least ${baseFormData.amountValue} ${currentCurrencyInfo.value.tokenSymbol} for ${res.count} winners`;
|
|
} else {
|
|
} else {
|
|
iptErrMsgTxt.value = "";
|
|
iptErrMsgTxt.value = "";
|
|
}
|
|
}
|
|
} else if(currentCurrencyInfo.value.currencyCode != 'USD') {
|
|
} else if(currentCurrencyInfo.value.currencyCode != 'USD') {
|
|
- iptErrMsgTxt.value = `Insufficient ${currentCurrencyInfo.value.currencyName} balance, please recharge`;
|
|
|
|
|
|
+ iptErrMsgTxt.value = `Insufficient ${currentCurrencyInfo.value.tokenSymbol} balance, please recharge`;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1087,6 +1091,14 @@ onMounted(() => {
|
|
display: flex;
|
|
display: flex;
|
|
position: relative;
|
|
position: relative;
|
|
|
|
|
|
|
|
+ .icon-guide-select {
|
|
|
|
+ width: 40px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 78px;
|
|
|
|
+ left: 25px;
|
|
|
|
+ z-index: 1000;
|
|
|
|
+ }
|
|
|
|
+
|
|
.body-content {
|
|
.body-content {
|
|
display:flex;
|
|
display:flex;
|
|
width:100%;
|
|
width:100%;
|
|
@@ -1119,7 +1131,7 @@ onMounted(() => {
|
|
|
|
|
|
.gift-pack-wrapper {
|
|
.gift-pack-wrapper {
|
|
width: 100%;
|
|
width: 100%;
|
|
- height: 54px;
|
|
|
|
|
|
+ height: 55px;
|
|
background: #f5f5f5;
|
|
background: #f5f5f5;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -1148,8 +1160,7 @@ onMounted(() => {
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
|
|
.img-mode {
|
|
.img-mode {
|
|
- width: 553px;
|
|
|
|
- margin-left: -20px;
|
|
|
|
|
|
+ margin-left: -18px;
|
|
}
|
|
}
|
|
|
|
|
|
.form-base-help {
|
|
.form-base-help {
|
|
@@ -1191,13 +1202,12 @@ onMounted(() => {
|
|
}
|
|
}
|
|
.currency-operation {
|
|
.currency-operation {
|
|
position: relative;
|
|
position: relative;
|
|
- height: 45px;
|
|
|
|
|
|
+ height: 36px;
|
|
border: 1px solid #EAEAEA;
|
|
border: 1px solid #EAEAEA;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 10px;
|
|
padding: 10px;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- justify-content: space-around;
|
|
|
|
border-radius: 100px;
|
|
border-radius: 100px;
|
|
|
|
|
|
.balance,
|
|
.balance,
|
|
@@ -1220,6 +1230,7 @@ onMounted(() => {
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
font-size: 13px;
|
|
font-size: 13px;
|
|
color: #4e4e4e;
|
|
color: #4e4e4e;
|
|
|
|
+ margin-left: 5px;
|
|
img {
|
|
img {
|
|
margin-left: 5px;
|
|
margin-left: 5px;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
@@ -1256,12 +1267,12 @@ onMounted(() => {
|
|
width: 250px;
|
|
width: 250px;
|
|
height: 50px;
|
|
height: 50px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
- border-radius: 12px;
|
|
|
|
|
|
+ border-radius: 14px;
|
|
|
|
+ border: 1px solid #D1D9DD;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
padding: 16px 14px;
|
|
padding: 16px 14px;
|
|
- box-shadow: 0px 2px 10px 0px #0000001A;
|
|
|
|
|
|
|
|
input {
|
|
input {
|
|
width: 102px;
|
|
width: 102px;
|
|
@@ -1292,22 +1303,25 @@ onMounted(() => {
|
|
padding-right: 14px;
|
|
padding-right: 14px;
|
|
}
|
|
}
|
|
.currency-select {
|
|
.currency-select {
|
|
- max-width: 124px;
|
|
|
|
|
|
+ max-width: 136px;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
- background: #F4F4F4;
|
|
|
|
|
|
+ background: #389AFF;
|
|
margin-left: 6px;
|
|
margin-left: 6px;
|
|
- padding: 10px;
|
|
|
|
|
|
+ padding: 6px 10px;
|
|
border-radius: 12px;
|
|
border-radius: 12px;
|
|
|
|
+ color: #fff;
|
|
.text {
|
|
.text {
|
|
- // max-width: 68px;
|
|
|
|
- // overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
- text-overflow: ellipsis;
|
|
|
|
|
|
+ zoom: 0.85;
|
|
}
|
|
}
|
|
.arrow {
|
|
.arrow {
|
|
margin-left: 5px;
|
|
margin-left: 5px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .selected {
|
|
|
|
+ background: #F4F4F4 !important;
|
|
|
|
+ color: #000 !important;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1322,7 +1336,7 @@ onMounted(() => {
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border-radius: 15px;
|
|
border-radius: 15px;
|
|
margin-top: 12px;
|
|
margin-top: 12px;
|
|
- box-shadow: 0px 3px 27px 0px #0000001a;
|
|
|
|
|
|
+ border: 1px solid #D1D9DD;
|
|
|
|
|
|
.form-item {
|
|
.form-item {
|
|
min-height: 50px;
|
|
min-height: 50px;
|
|
@@ -1351,6 +1365,9 @@ onMounted(() => {
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .form-item:last-child {
|
|
|
|
+ border-bottom: none !important;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1364,7 +1381,7 @@ onMounted(() => {
|
|
border-radius: 15px;
|
|
border-radius: 15px;
|
|
padding: 0 18px;
|
|
padding: 0 18px;
|
|
margin-top: 14px;
|
|
margin-top: 14px;
|
|
- box-shadow: 0px 3px 27px 0px #0000001a;
|
|
|
|
|
|
+ border: 1px solid #D1D9DD;
|
|
|
|
|
|
.label {
|
|
.label {
|
|
display: flex;
|
|
display: flex;
|
|
@@ -1388,17 +1405,17 @@ onMounted(() => {
|
|
}
|
|
}
|
|
|
|
|
|
.tips-wrapper {
|
|
.tips-wrapper {
|
|
- margin-top: 23px;
|
|
|
|
|
|
+ margin: 16px 0 0 12px !important;
|
|
|
|
+ padding: 0px !important;
|
|
.title,
|
|
.title,
|
|
.row {
|
|
.row {
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
- font-size: 13px;
|
|
|
|
- color: rgba(0, 0, 0, 0.3);
|
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ color: #A39F9F;
|
|
}
|
|
}
|
|
|
|
|
|
.row {
|
|
.row {
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
- padding-left: 4px;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.more {
|
|
.more {
|