|
@@ -9,51 +9,14 @@
|
|
v-show="showCurrencyPop || showCurrencySelect"
|
|
v-show="showCurrencyPop || showCurrencySelect"
|
|
@click.stop="showCurrencyPop = false; showCurrencySelect=false">
|
|
@click.stop="showCurrencyPop = false; showCurrencySelect=false">
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <!-- 头部 -->
|
|
|
|
- <div class="head">
|
|
|
|
- <div class="left">
|
|
|
|
- <!-- 关闭按钮 -->
|
|
|
|
- <div class="close-btn" @click="close">
|
|
|
|
- <template v-if="publishType == 'TOOL_BOX'">
|
|
|
|
- <img class="icon-close"
|
|
|
|
- :src="require('@/assets/svg/icon-close.svg')"
|
|
|
|
- v-if="toolBoxPageData.activePage == 'EDITOR'"/>
|
|
|
|
- <img class="icon-close"
|
|
|
|
- :src="require('@/assets/svg/icon-back.svg')"
|
|
|
|
- v-else/>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- <img class="icon-close"
|
|
|
|
- :src="require('@/assets/svg/icon-close.svg')"
|
|
|
|
- v-if="showComType == 'default'"/>
|
|
|
|
- <img class="icon-close"
|
|
|
|
- :src="require('@/assets/svg/icon-back.svg')"
|
|
|
|
- v-else/>
|
|
|
|
- </template>
|
|
|
|
- </div>
|
|
|
|
- <!-- 标题 -->
|
|
|
|
- <div class="title">
|
|
|
|
- {{publishType == 'REDPACKET' ? currentComData[showComType]["title"] : 'Tool Box' }}
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="right">
|
|
|
|
- <!-- 更多按钮 -->
|
|
|
|
- <img :src="require('@/assets/svg/icon-more-l.svg')"
|
|
|
|
- class="more"
|
|
|
|
- @click="showMoreOption = true">
|
|
|
|
- <div class="area-option"
|
|
|
|
- v-if="showMoreOption"
|
|
|
|
- @click="showMoreOption = false">
|
|
|
|
- <div class="option">
|
|
|
|
- <div class="item" @click="goTransactionsList()">
|
|
|
|
- <img :src="require('@/assets/svg/icon-menu.svg')">
|
|
|
|
- <span>Transaction History</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+
|
|
|
|
+ <!-- head -->
|
|
|
|
+ <give-dialog-head
|
|
|
|
+ :title="publishType == 'REDPACKET' ? currentComData[showComType]['title'] : 'Tool Box'"
|
|
|
|
+ :publishType="publishType"
|
|
|
|
+ :showComType="showComType"
|
|
|
|
+ :toolBoxPageData="toolBoxPageData"
|
|
|
|
+ @close="close"></give-dialog-head>
|
|
|
|
|
|
<!-- 内容 -->
|
|
<!-- 内容 -->
|
|
<div class="body">
|
|
<div class="body">
|
|
@@ -359,19 +322,19 @@
|
|
<div class="card-list">
|
|
<div class="card-list">
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="l">Giveaway Amount</div>
|
|
<div class="l">Giveaway Amount</div>
|
|
- <div class="r"></div>
|
|
|
|
|
|
+ <div class="r order-amount">${{finalAmountData.orderAmountValue}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="l">Balance</div>
|
|
<div class="l">Balance</div>
|
|
- <div class="r"></div>
|
|
|
|
|
|
+ <div class="r txt">${{finalAmountData.balance}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="item">
|
|
- <div class="l">Paypal charges fee ()</div>
|
|
|
|
- <div class="r"></div>
|
|
|
|
|
|
+ <div class="l">Paypal charges fee ({{finalAmountData.feeDesc}})</div>
|
|
|
|
+ <div class="r txt">${{finalAmountData.feeAmountValue}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="l">Deposit Amount</div>
|
|
<div class="l">Deposit Amount</div>
|
|
- <div class="r"></div>
|
|
|
|
|
|
+ <div class="r deposit-amount">${{finalAmountData.rechargeAmountValue}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -409,18 +372,18 @@
|
|
|
|
|
|
<!-- paypal支付按钮 -->
|
|
<!-- paypal支付按钮 -->
|
|
<div class="payment" v-show="showComType == 'preview'">
|
|
<div class="payment" v-show="showComType == 'preview'">
|
|
- <paypal-button
|
|
|
|
|
|
+ <pay-button
|
|
|
|
+ ref="payButtonDom"
|
|
v-if="isMoneyRewardCpd"
|
|
v-if="isMoneyRewardCpd"
|
|
:finalAmountData="finalAmountData"
|
|
:finalAmountData="finalAmountData"
|
|
:payConfig="{
|
|
:payConfig="{
|
|
- paypalClientId,
|
|
|
|
feeDesc: payConfig.feeDesc,
|
|
feeDesc: payConfig.feeDesc,
|
|
- paypalHtml,
|
|
|
|
amount: baseFormData.amountValue,
|
|
amount: baseFormData.amountValue,
|
|
postId
|
|
postId
|
|
}"
|
|
}"
|
|
:currentCurrencyInfo="currentCurrencyInfo"
|
|
:currentCurrencyInfo="currentCurrencyInfo"
|
|
- @payPalFinsh="payPalFinsh">
|
|
|
|
|
|
+ @showDepositMask="showDepositMessageBox = true"
|
|
|
|
+ @payFinish="payFinish">
|
|
<template v-slot:balance>
|
|
<template v-slot:balance>
|
|
<div class="balance" v-if="Number(baseFormData.amountValue) <= Number(currentCurrencyInfo.balance)">
|
|
<div class="balance" v-if="Number(baseFormData.amountValue) <= Number(currentCurrencyInfo.balance)">
|
|
<img class="icon" src="@/assets/subject/icon-balance.png" />
|
|
<img class="icon" src="@/assets/subject/icon-balance.png" />
|
|
@@ -434,7 +397,7 @@
|
|
@click="updateCurrencyBanlce"/>
|
|
@click="updateCurrencyBanlce"/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- </paypal-button>
|
|
|
|
|
|
+ </pay-button>
|
|
<div v-else class="btn-wrap" @click="payStatusHandle(1)"><div class="custom-submit">Confirm</div></div>
|
|
<div v-else class="btn-wrap" @click="payStatusHandle(1)"><div class="custom-submit">Confirm</div></div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -448,9 +411,17 @@
|
|
:dialogVisible="showMessageBox"
|
|
:dialogVisible="showMessageBox"
|
|
:title="messageBoxData.title"
|
|
:title="messageBoxData.title"
|
|
:content="messageBoxData.content"
|
|
:content="messageBoxData.content"
|
|
|
|
+ cancelTxt="Not yet"
|
|
|
|
+ confirmTxt="Deposit"
|
|
@cancel="messageBoxCancel"
|
|
@cancel="messageBoxCancel"
|
|
- @confirm="messageBoxConfirm"
|
|
|
|
- ></message-box>
|
|
|
|
|
|
+ @confirm="messageBoxConfirm"></message-box>
|
|
|
|
+
|
|
|
|
+ <!-- 预览页充值 -->
|
|
|
|
+ <message-box
|
|
|
|
+ :dialogVisible="showDepositMessageBox"
|
|
|
|
+ title="Is the Deposit Completed?"
|
|
|
|
+ @cancel="depositAchCancel"
|
|
|
|
+ @confirm="depositAchConfirm"></message-box>
|
|
|
|
|
|
<!-- 裁剪 -->
|
|
<!-- 裁剪 -->
|
|
<div class="dialog" v-if="cropperDialog">
|
|
<div class="dialog" v-if="cropperDialog">
|
|
@@ -488,11 +459,11 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref, watch, reactive, defineProps, defineEmits, onMounted, nextTick, provide, getCurrentInstance, computed } from "vue";
|
|
|
|
-import { postPublish, verifyPaypalResult, syncChainTokenRechargeRecord, getCurrencyInfoByCode } from "@/http/publishApi";
|
|
|
|
|
|
+import { ref, watch, reactive, defineProps, defineEmits, onMounted, nextTick, provide, computed } from "vue";
|
|
|
|
+import { postPublish, syncChainTokenRechargeRecord, getCurrencyInfoByCode } from "@/http/publishApi";
|
|
import { getInviteGuildInfo, getInviteGuildInfoByOpenApi, saveInviteGuildInfo } from "@/http/discordApi";
|
|
import { getInviteGuildInfo, getInviteGuildInfoByOpenApi, saveInviteGuildInfo } from "@/http/discordApi";
|
|
import { payCalcFee, getPayConfig } from "@/http/pay";
|
|
import { payCalcFee, getPayConfig } from "@/http/pay";
|
|
-import { getFrontConfig } from "@/http/account";
|
|
|
|
|
|
+import { getFrontConfig, calcRechargePayAmount } from "@/http/account";
|
|
import { uploadSignature, uploadFile } from '@/http/media';
|
|
import { uploadSignature, uploadFile } from '@/http/media';
|
|
import {setChromeStorage, getChromeStorage} from "@/uilts/chromeExtension"
|
|
import {setChromeStorage, getChromeStorage} from "@/uilts/chromeExtension"
|
|
import { debounce, getBit } from "@/uilts/help"
|
|
import { debounce, getBit } from "@/uilts/help"
|
|
@@ -504,22 +475,22 @@ import "element-plus/es/components/loading/style/css";
|
|
import 'vue-cropper/dist/index.css'
|
|
import 'vue-cropper/dist/index.css'
|
|
import { VueCropper } from "vue-cropper";
|
|
import { VueCropper } from "vue-cropper";
|
|
import {create, all} from "mathjs";
|
|
import {create, all} from "mathjs";
|
|
|
|
+import { message } from 'ant-design-vue';
|
|
|
|
|
|
import messageBox from "@/view/components/message-box.vue";
|
|
import messageBox from "@/view/components/message-box.vue";
|
|
import currencyList from "@/view/components/currency-list.vue";
|
|
import currencyList from "@/view/components/currency-list.vue";
|
|
import currencySelect from "@/view/components/currency-select.vue";
|
|
import currencySelect from "@/view/components/currency-select.vue";
|
|
import previewCard from "@/view/iframe/publish/components/preview-card";
|
|
import previewCard from "@/view/iframe/publish/components/preview-card";
|
|
import followInput from "@/view/iframe/publish/components/follow-input";
|
|
import followInput from "@/view/iframe/publish/components/follow-input";
|
|
-import paypalButton from "@/view/iframe/publish/components/paypal-button";
|
|
|
|
|
|
+import payButton from "@/view/iframe/publish/components/pay-button";
|
|
import topUp from "@/view/iframe/publish/components/top-up.vue";
|
|
import topUp from "@/view/iframe/publish/components/top-up.vue";
|
|
import topUp2 from "@/view/iframe/publish/components/top-up2.vue";
|
|
import topUp2 from "@/view/iframe/publish/components/top-up2.vue";
|
|
import toolBox from '@/view/iframe/publish/tool-box/index.vue'
|
|
import toolBox from '@/view/iframe/publish/tool-box/index.vue'
|
|
import giveawayPoster from '@/view/iframe/publish/components/giveaway-poster.vue';
|
|
import giveawayPoster from '@/view/iframe/publish/components/giveaway-poster.vue';
|
|
|
|
+import giveDialogHead from "@/view/iframe/publish/components/give-dialog-head";
|
|
import GlobalTip from '@/view/components/global-tip.vue'
|
|
import GlobalTip from '@/view/components/global-tip.vue'
|
|
import customCardCover from '@/view/components/custom-card-cover.vue'
|
|
import customCardCover from '@/view/components/custom-card-cover.vue'
|
|
|
|
|
|
-const currentInstance = getCurrentInstance();
|
|
|
|
-
|
|
|
|
import CustomizedRewardEditPopup from '@/view/iframe/publish/components/customized-reward-edit';
|
|
import CustomizedRewardEditPopup from '@/view/iframe/publish/components/customized-reward-edit';
|
|
|
|
|
|
const config = {
|
|
const config = {
|
|
@@ -531,9 +502,7 @@ const math = create(all, config);
|
|
let tempCurrentCurrencyInfo = ref({});
|
|
let tempCurrentCurrencyInfo = ref({});
|
|
let tempCurrentCurrencyList = ref([]);
|
|
let tempCurrentCurrencyList = ref([]);
|
|
|
|
|
|
-let paypalClientId = ref("");
|
|
|
|
let payConfig = ref({});
|
|
let payConfig = ref({});
|
|
-let paypalHtml = ref("");
|
|
|
|
let installStatus = ref(false);
|
|
let installStatus = ref(false);
|
|
let timer = ref(null);
|
|
let timer = ref(null);
|
|
provide('installStatus', installStatus)
|
|
provide('installStatus', installStatus)
|
|
@@ -609,15 +578,16 @@ let isBack = ref(false);
|
|
// 展示消息提示
|
|
// 展示消息提示
|
|
let showMessageBox = ref(false);
|
|
let showMessageBox = ref(false);
|
|
|
|
|
|
|
|
+let showDepositMessageBox = ref(false);
|
|
|
|
+
|
|
// 展示货币列表pop
|
|
// 展示货币列表pop
|
|
let showCurrencyPop = ref(false);
|
|
let showCurrencyPop = ref(false);
|
|
let showCurrencySelect = ref(false);
|
|
let showCurrencySelect = ref(false);
|
|
|
|
|
|
-// 展示更多按钮下的选项
|
|
|
|
-let showMoreOption = ref(false);
|
|
|
|
-
|
|
|
|
// 货币列表的dom
|
|
// 货币列表的dom
|
|
-let currencyListDom = ref('');
|
|
|
|
|
|
+let currencyListDom = ref(null);
|
|
|
|
+
|
|
|
|
+let payButtonDom = ref(null);
|
|
|
|
|
|
// 刷新按钮旋转
|
|
// 刷新按钮旋转
|
|
let refreshRotate = ref(false);
|
|
let refreshRotate = ref(false);
|
|
@@ -910,7 +880,7 @@ const selectCurrencyPopHandle = () => {
|
|
showCurrencyPop.value = true;
|
|
showCurrencyPop.value = true;
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
if(currencyListDom.value) {
|
|
if(currencyListDom.value) {
|
|
- currencyListDom.value.getCurrencyInfoList && currencyListDom.value.getCurrencyInfoList();
|
|
|
|
|
|
+ currencyListDom.value.getCurrencyInfoList && currencyListDom.value.getCurrencyInfoList({pageNum: 1});
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -924,7 +894,7 @@ const getPayAmount = async (amountValue) => {
|
|
params: {
|
|
params: {
|
|
amountValue,
|
|
amountValue,
|
|
currencyCode: currentCurrencyInfo.value.currencyCode,
|
|
currencyCode: currentCurrencyInfo.value.currencyCode,
|
|
- payChannel: 'paypal',
|
|
|
|
|
|
+ payChannel: 'ach',
|
|
},
|
|
},
|
|
});
|
|
});
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
@@ -1228,8 +1198,12 @@ const submitRequest = async () => {
|
|
|
|
|
|
// 法币支付需要计算费率
|
|
// 法币支付需要计算费率
|
|
if(formData.amountCurrencyCode == "USD") {
|
|
if(formData.amountCurrencyCode == "USD") {
|
|
- let payAmountRes = await getPayAmount(amountValue);
|
|
|
|
- formData["payAmountValue"] = payAmountRes.finalAmountValue;
|
|
|
|
|
|
+ // 获取充值金额
|
|
|
|
+ await calcRechPayAmount({
|
|
|
|
+ currencyCode: currentCurrencyInfo.value.currencyCode,
|
|
|
|
+ orderAmountValue: baseFormData.amountValue,
|
|
|
|
+ payChannel: 'ach'
|
|
|
|
+ });
|
|
}
|
|
}
|
|
let data = {
|
|
let data = {
|
|
params: {
|
|
params: {
|
|
@@ -1299,38 +1273,26 @@ const setDiscordIptTxt = ({text}) => {
|
|
formList[index]['text'] = text;
|
|
formList[index]['text'] = text;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const calcRechPayAmount = async (params) => {
|
|
|
|
+ let res = await calcRechargePayAmount({
|
|
|
|
+ params : params
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ let { feeDesc } = res.data;
|
|
|
|
+ payConfig.value.feeDesc = feeDesc;
|
|
|
|
+ finalAmountData.value = res.data;
|
|
|
|
+ }
|
|
|
|
+ return res.data;
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 支付完成回调
|
|
* 支付完成回调
|
|
*/
|
|
*/
|
|
-const payPalFinsh = (params) => {
|
|
|
|
- let {payNetwork, payStatus} = params;
|
|
|
|
- // token 支付
|
|
|
|
- if(payNetwork == 'bsc') {
|
|
|
|
- payStatusHandle(payStatus);
|
|
|
|
- } else {
|
|
|
|
- // 法币支付
|
|
|
|
- let transaction = params.transaction;
|
|
|
|
- let loadingInstance = ElLoading.service({
|
|
|
|
- background: "rgba(0,0,0,.3)",
|
|
|
|
- });
|
|
|
|
- verifyPaypalResult({
|
|
|
|
- params: {
|
|
|
|
- paypalTransactionId: transaction.id,
|
|
|
|
- postId: publishRes.postId,
|
|
|
|
- paypalClientId: paypalClientId.value,
|
|
|
|
- },
|
|
|
|
- }).then((res) => {
|
|
|
|
- loadingInstance.close();
|
|
|
|
- if (res.code == 0) {
|
|
|
|
- if (res.data) {
|
|
|
|
- payStatusHandle(res.data.payStatus)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- .catch(() => {
|
|
|
|
- loadingInstance.close();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+const payFinish = (params) => {
|
|
|
|
+ let {payStatus} = params;
|
|
|
|
+ // 余额支付
|
|
|
|
+ payStatusHandle(payStatus);
|
|
};
|
|
};
|
|
|
|
|
|
const payStatusHandle = (payStatus) => {
|
|
const payStatusHandle = (payStatus) => {
|
|
@@ -1342,22 +1304,10 @@ const payStatusHandle = (payStatus) => {
|
|
initParams();
|
|
initParams();
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
- // ElMessage({
|
|
|
|
- // message: "Pay Fail",
|
|
|
|
- // type: "warning",
|
|
|
|
- // });
|
|
|
|
break;
|
|
break;
|
|
case 3:
|
|
case 3:
|
|
- // ElMessage({
|
|
|
|
- // message: "Pay Exceptions",
|
|
|
|
- // type: "warning",
|
|
|
|
- // });
|
|
|
|
break;
|
|
break;
|
|
case 4:
|
|
case 4:
|
|
- // ElMessage({
|
|
|
|
- // message: "Pay Exceptions",
|
|
|
|
- // type: "warning",
|
|
|
|
- // });
|
|
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1545,18 +1495,6 @@ const formSwitchChange = (val, params, index) => {
|
|
closeDiscordTask(val, params, index);
|
|
closeDiscordTask(val, params, index);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-const hideTask = (params, index) => {
|
|
|
|
- formList[index]['checked'] = false;
|
|
|
|
- formList[index]['show'] = false;
|
|
|
|
- closeDiscordTask(false, {type: 7}, index)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-const clickDropdown = (params, index) => {
|
|
|
|
- formList[index]['show'] = true;
|
|
|
|
- formList[index]['checked'] = true;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
const closeDiscordTask = (val, params, index) => {
|
|
const closeDiscordTask = (val, params, index) => {
|
|
if(params.type == 7) {
|
|
if(params.type == 7) {
|
|
if(!val) {
|
|
if(!val) {
|
|
@@ -1814,7 +1752,6 @@ const setPayConfig = () => {
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
payConfig.value = res.data;
|
|
payConfig.value = res.data;
|
|
- paypalClientId.value = res.data.paypalClientId;
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
};
|
|
};
|
|
@@ -1827,7 +1764,6 @@ const setFrontConfig = () => {
|
|
params: {},
|
|
params: {},
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
- paypalHtml.value = res.data.paypalHtml;
|
|
|
|
lotteryMaxHourDuration = res.data.lotteryMaxHourDuration;
|
|
lotteryMaxHourDuration = res.data.lotteryMaxHourDuration;
|
|
toolBoxPageData.postEditorLinkInputDescImage = res.data.postEditorLinkInputDescImage;
|
|
toolBoxPageData.postEditorLinkInputDescImage = res.data.postEditorLinkInputDescImage;
|
|
toolBoxPageData.postEditorDefaultLinkTitle = res.data.postEditorDefaultLinkTitle;
|
|
toolBoxPageData.postEditorDefaultLinkTitle = res.data.postEditorDefaultLinkTitle;
|
|
@@ -1835,11 +1771,6 @@ const setFrontConfig = () => {
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
-const goTransactionsList = () => {
|
|
|
|
- window.open(`${chrome.runtime.getURL('/iframe/home.html#/transactions')}`)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 默认获取上次选中的货币信息
|
|
* 默认获取上次选中的货币信息
|
|
*/
|
|
*/
|
|
@@ -1853,23 +1784,18 @@ const getCurrencyInfo = async (_params) => {
|
|
let { loop = false} = _params || {};
|
|
let { loop = false} = _params || {};
|
|
let {accessToken = ''} = await getChromeStorage('userInfo') || {};
|
|
let {accessToken = ''} = await getChromeStorage('userInfo') || {};
|
|
if (accessToken) {
|
|
if (accessToken) {
|
|
- getChromeStorage('selectCurrencyInfo', (res) => {
|
|
|
|
- if(res && res.currencyCode) {
|
|
|
|
- getCurrencyInfoByCode({
|
|
|
|
- params: {
|
|
|
|
- currencyCode: res.currencyCode
|
|
|
|
- }
|
|
|
|
- }).then(res => {
|
|
|
|
- if(res.code == 0 && res.data) {
|
|
|
|
- currentCurrencyInfo.value = res.data;
|
|
|
|
- tempCurrentCurrencyInfo.value = res.data;
|
|
|
|
- if(!loop) {
|
|
|
|
- onIptSetErrorTxt();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ let {currencyCode = ''} = await getChromeStorage('selectCurrencyInfo') || {};
|
|
|
|
+
|
|
|
|
+ if(currencyCode) {
|
|
|
|
+ let currencyInfoRes = await getCurrencyByCode({currencyCode});
|
|
|
|
+ if(currencyInfoRes.code == 0 && currencyInfoRes.data) {
|
|
|
|
+ currentCurrencyInfo.value = currencyInfoRes.data;
|
|
|
|
+ tempCurrentCurrencyInfo.value = currencyInfoRes.data;
|
|
|
|
+ if(!loop) {
|
|
|
|
+ onIptSetErrorTxt();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ }
|
|
|
|
|
|
getChromeStorage('selectCurrencyList', (res) => {
|
|
getChromeStorage('selectCurrencyList', (res) => {
|
|
if (showCurrencySelect.value === false) {
|
|
if (showCurrencySelect.value === false) {
|
|
@@ -1879,6 +1805,15 @@ const getCurrencyInfo = async (_params) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const getCurrencyByCode = async (params) => {
|
|
|
|
+ let res = await getCurrencyInfoByCode({
|
|
|
|
+ params: {
|
|
|
|
+ currencyCode: params.currencyCode
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ return res || {};
|
|
|
|
+}
|
|
|
|
+
|
|
const selectPublishMode = (params, index) => {
|
|
const selectPublishMode = (params, index) => {
|
|
selectModeInfo.index = index;
|
|
selectModeInfo.index = index;
|
|
selectModeInfo.type = params.type;
|
|
selectModeInfo.type = params.type;
|
|
@@ -2006,6 +1941,26 @@ const submitReward = (reward) => {
|
|
onIptSetErrorTxt();
|
|
onIptSetErrorTxt();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const depositAchCancel = () => {
|
|
|
|
+ showDepositMessageBox.value = false;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const depositAchConfirm = async () => {
|
|
|
|
+ let currencyInfoRes = await getCurrencyByCode({currencyCode: currentCurrencyInfo.value.currencyCode});
|
|
|
|
+
|
|
|
|
+ if(currencyInfoRes.code == 0 && currencyInfoRes.data) {
|
|
|
|
+ showDepositMessageBox.value = false;
|
|
|
|
+ currentCurrencyInfo.value = currencyInfoRes.data;
|
|
|
|
+
|
|
|
|
+ let {balance} = currencyInfoRes.data;
|
|
|
|
+ if(balance > finalAmountData.value.orderAmountValue) {
|
|
|
|
+ // payButtonDom.value && payButtonDom.value.balancePay();
|
|
|
|
+ } else {
|
|
|
|
+ message.info('Deposit failed, please try again later');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
setFrontConfig();
|
|
setFrontConfig();
|
|
setPayConfig();
|
|
setPayConfig();
|
|
@@ -2078,88 +2033,6 @@ onMounted(() => {
|
|
z-index:900;
|
|
z-index:900;
|
|
}
|
|
}
|
|
|
|
|
|
- .head {
|
|
|
|
- border-bottom: 1px solid #ececec;
|
|
|
|
- height: 48px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- padding: 0 14px;
|
|
|
|
-
|
|
|
|
- .left {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- .title {
|
|
|
|
- font-size: 16px;
|
|
|
|
- font-weight: 500;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .close-btn {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- width: max-content;
|
|
|
|
- margin-right: 12px;
|
|
|
|
- cursor: pointer;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .right {
|
|
|
|
- .more {
|
|
|
|
- cursor: pointer;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .area-option {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- position: absolute;
|
|
|
|
- top: 0;
|
|
|
|
- left: 0;
|
|
|
|
- z-index: 111;
|
|
|
|
-
|
|
|
|
- .option {
|
|
|
|
- position: absolute;
|
|
|
|
- top: 43px;
|
|
|
|
- right: 15px;
|
|
|
|
- background: #fff;
|
|
|
|
- filter: drop-shadow(0px 3px 20px rgba(0, 0, 0, 0.2));
|
|
|
|
- width: 240px;
|
|
|
|
- border-radius: 15px;
|
|
|
|
- overflow: hidden;
|
|
|
|
-
|
|
|
|
- .item {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 50px;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- cursor: pointer;
|
|
|
|
- border-top: 1px solid #E9E9E9;
|
|
|
|
-
|
|
|
|
- img {
|
|
|
|
- margin-left: 15px;
|
|
|
|
- width: 30px;
|
|
|
|
- height: 30px;
|
|
|
|
- margin-right: 6px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- span {
|
|
|
|
- font-weight: 500;
|
|
|
|
- font-size: 14px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .item:first-child {
|
|
|
|
- border-top: 0;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .item:hover {
|
|
|
|
- background: #F5F5F5;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
.body {
|
|
.body {
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
height: calc(100% - 48px);
|
|
height: calc(100% - 48px);
|
|
@@ -2712,7 +2585,7 @@ onMounted(() => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.card-list {
|
|
.card-list {
|
|
- padding: 20px;
|
|
|
|
|
|
+ padding: 10px 20px;
|
|
border-radius: 20px;
|
|
border-radius: 20px;
|
|
border: 1px solid #E6E6E6;
|
|
border: 1px solid #E6E6E6;
|
|
.item {
|
|
.item {
|
|
@@ -2723,7 +2596,28 @@ onMounted(() => {
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
box-shadow: inset 0px -1px 0px #EAEAEA;
|
|
box-shadow: inset 0px -1px 0px #EAEAEA;
|
|
|
|
+
|
|
|
|
+ .order-amount {
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .txt {
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ color: #9A9A9A;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .deposit-amount {
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ color: #1D9BF0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .item:last-child {
|
|
|
|
+ box-shadow: none;
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|