| | |
| | | import assetsHead from "@/components/Transform/assets-head/index.vue"; |
| | | import BarScan from '@/components/Transform/scan/scan.vue'; |
| | | import { _getAllWallet } from "@/service/fund.api"; |
| | | import { _getSyspara } from '@/service/trade.api.js' |
| | | export default { |
| | | name: "withdrawPage", |
| | | components: { |
| | |
| | | data() { |
| | | return { |
| | | tip: '', |
| | | value: 'USDT', //选中的币种 |
| | | value: 'USDC', //选中的币种 |
| | | show: false, |
| | | showSymbol: false, |
| | | actions: [{ name: 'USDT' }, { name: 'BTC' }, { name: 'ETH' }], |
| | | actions: [{ name: 'USDC' }], |
| | | blockList: [], |
| | | blockchainIndex: "", |
| | | usdtBalance: "", //余额 |
| | |
| | | percent: 0, |
| | | numLenth: 3, |
| | | routerType: '', |
| | | // 获取最低限额接口时需要的参数 |
| | | xeList: { |
| | | "USDT": 'withdraw_limit', |
| | | "BTC": 'withdraw_limit_btc', |
| | | "ETH": 'withdraw_limit_eth', |
| | | "USDC": 'withdraw_limit_usdc', |
| | | }, |
| | | minXE: 0, // 最小提现限额 |
| | | } |
| | | }, |
| | | created() { |
| | | this.getBlock(this.value); |
| | | this.getAvailable(this.actions[0].name); |
| | | |
| | | this.getXE(); |
| | | |
| | | Axios.getRechargeTips({ |
| | | language: this.$i18n.locale, |
| | |
| | | }) |
| | | _withdrawFee({ |
| | | amount: 1, |
| | | channel: this.value + '_' + this.blockName |
| | | channel: this.value + '_' + this.blockName, |
| | | type: 'cryptos' // 加密货币提取时传cryptos |
| | | }).then((res) => { |
| | | this.withdraw_fee_type = res.withdraw_fee_type |
| | | if (this.withdraw_fee_type == 'rate') { |
| | |
| | | console.log(this.$route.query.type); |
| | | this.routerType === 'exchange' ? this.$router.push('/Record/DepositAndWithdrawal') : this.goRouter('/cryptos/assetsCenter/rechargeWithdrawRecord'); |
| | | }, |
| | | |
| | | getwei(value, numLenth) { |
| | | console.log(numLenth) |
| | | let str = value.toString(); |
| | |
| | | showToast(this.$t('金额不足')) |
| | | return |
| | | } |
| | | if (this.amount < this.minXE) { |
| | | showToast(this.$t('提现不得小于限额') + ' ' + this.minXE) |
| | | return |
| | | } |
| | | this.show = true; |
| | | }, |
| | | goRouter(params) { |
| | |
| | | this.withdraw_fee_type = '' |
| | | this.getBlock(item.name); |
| | | this.getAvailable(item.name) |
| | | this.getXE(item.name) |
| | | if (item.name == 'BTC' || item.name == 'ETH') { |
| | | this.numLenth = 7 |
| | | _withdrawFee({ |
| | | amount: 1, |
| | | channel: this.value + '_' + this.blockName |
| | | channel: this.value + '_' + this.blockName, |
| | | type: 'cryptos' // 加密货币提取时传cryptos |
| | | }).then((res) => { |
| | | this.withdraw_fee_type = res.withdraw_fee_type |
| | | if (this.withdraw_fee_type == 'fixed') { |
| | |
| | | } else { |
| | | this.numLenth = 3 |
| | | } |
| | | }, |
| | | // 根据币种获取最低提现限额 |
| | | async getXE(name = "USDC") { |
| | | let code = this.xeList[name] |
| | | let res = await _getSyspara({ code }) |
| | | this.minXE = res[code] |
| | | }, |
| | | //根据币种获取链地址 |
| | | getBlock(symbol) { |
| | |
| | | if (this.withdraw_fee_type == 'part') { |
| | | _withdrawFee({ |
| | | amount: this.amount, |
| | | channel: this.value + '_' + this.blockName |
| | | channel: this.value + '_' + this.blockName, |
| | | type: 'cryptos' // 加密货币提取时传cryptos |
| | | }).then((res) => { |
| | | console.log(res) |
| | | this.fee = res.fee; |