|
@@ -66,7 +66,7 @@ import { ref, onMounted, inject, onBeforeUnmount } from "vue";
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import Report from "@/log-center/log";
|
|
|
import { getCurrencyInfoBySymbol, syncChainTokenRechargeRecord } from "@/http/publishApi";
|
|
|
-import { setChromeStoragetoExtension, chromeExtensionUrl } from "@/uilts/chromeExtension"
|
|
|
+import { setChromeStoragetoExtension } from "@/uilts/chromeExtension"
|
|
|
import messageCenter from "@/uilts/messageCenter";
|
|
|
import MESSAGE_ENUM from "@/uilts/messageCenter/messageEnum";
|
|
|
import VHead from '@/components/v-head.vue'
|
|
@@ -114,7 +114,6 @@ const selectCurrency = (params) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-let withdraw_info = inject('withdraw_info')
|
|
|
// 点击提现
|
|
|
const clickWithdraw = () => {
|
|
|
Report.reportLog({
|
|
@@ -132,24 +131,15 @@ const clickWithdraw = () => {
|
|
|
}
|
|
|
|
|
|
const withdrawHandle = (_params) => {
|
|
|
- withdraw_info.chainInfo = _params.chainInfo;
|
|
|
- withdraw_info.source = 'home'
|
|
|
- withdraw_info.balance = _params.balance
|
|
|
- withdraw_info.token_symbol = _params.tokenSymbol || ''
|
|
|
- withdraw_info.currency_name = _params.currencyName || ''
|
|
|
- withdraw_info.token_chain = _params.tokenChain || ''
|
|
|
- withdraw_info.currency_code = _params.currencyCode
|
|
|
- withdraw_info.icon_token = _params.iconPath || ''
|
|
|
- withdraw_info.icon_net = require('@/assets/svg/icon-BNB.svg')
|
|
|
-
|
|
|
- if (_params.currencyCode == 'USD') {
|
|
|
- withdraw_info.currency_code = _params.currencyCode
|
|
|
- withdraw_info.paypal.amount_value = _params.balance
|
|
|
- router.push('/withdraw/paypal')
|
|
|
- } else {
|
|
|
- console.log(withdraw_info.chainInfo.iconPath)
|
|
|
- router.push('/withdraw/info')
|
|
|
- }
|
|
|
+ messageCenter.send({
|
|
|
+ info: {
|
|
|
+ actionType: MESSAGE_ENUM.IFRAME_WITHDRAW,
|
|
|
+ iframeId: iframeId,
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ params: _params
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
let top_up_info = inject('top_up_info');
|
|
@@ -244,24 +234,19 @@ const showSendGiveawayDialog = (params = {}) => {
|
|
|
showCurrencySelect.value = true;
|
|
|
currencyOpertionType = "SEND";
|
|
|
} else {
|
|
|
- setLocalSelectCurrencyInfo(params)
|
|
|
- setTimeout(() => {
|
|
|
- messageCenter.send({
|
|
|
- info: {
|
|
|
- actionType: MESSAGE_ENUM.POPUP_SHOW_DENET_PUBLISH_DIALOG,
|
|
|
- iframeId: iframeId
|
|
|
- },
|
|
|
- data: {}
|
|
|
- })
|
|
|
- }, 600)
|
|
|
+ messageCenter.send({
|
|
|
+ info: {
|
|
|
+ actionType: MESSAGE_ENUM.POPUP_SHOW_DENET_PUBLISH_DIALOG,
|
|
|
+ iframeId: iframeId
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ params
|
|
|
+ }
|
|
|
+ })
|
|
|
currencyOpertionType = '';
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const setLocalSelectCurrencyInfo = (params = {}) => {
|
|
|
- setChromeStoragetoExtension({ selectCurrencyInfo: JSON.stringify(params) })
|
|
|
-}
|
|
|
-
|
|
|
const cancelDeposit = () => {
|
|
|
showDepositInput.value = false;
|
|
|
}
|
|
@@ -274,23 +259,15 @@ const confirmDeposit = () => {
|
|
|
showDepositInput.value = false;
|
|
|
depositDesc.value = '';
|
|
|
|
|
|
- let achPayInfo = {
|
|
|
- amountValue: finalAmountData.value.finalAmountValue
|
|
|
- };
|
|
|
- let guideUrl = chromeExtensionUrl + ('iframe/ach-cashier.html');
|
|
|
- setChromeStoragetoExtension({ achPayInfo: JSON.stringify(achPayInfo) });
|
|
|
- let str = window.location.hash + '&refresh=true';
|
|
|
- let path = str.substring(1, str.length);
|
|
|
- setChromeStoragetoExtension({
|
|
|
- achPayData: JSON.stringify({
|
|
|
- form: 'popupPage',
|
|
|
- path
|
|
|
- })
|
|
|
- });
|
|
|
-
|
|
|
- chrome.tabs.create({
|
|
|
- url: guideUrl
|
|
|
- });
|
|
|
+ messageCenter.send({
|
|
|
+ info: {
|
|
|
+ actionType: MESSAGE_ENUM.IFRAME_ACH_PAYMENT,
|
|
|
+ iframeId: iframeId,
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ amountValue: finalAmountData.value.finalAmountValue,
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const onDepositAmountInput = async (params = {}) => {
|