法币钱包充值功能修改

master
钟海欣 5 years ago
parent 44768496f4
commit 780759cf9a
  1. 263
      src/components/balances/bibi-balances/bibi-balances-table.vue

@ -8,17 +8,27 @@
<div class="total_inner">
<!-- 总资产 -->
<span>{{ $t('balances.table.taotal') }}</span>
<span class="total_inner-many">{{tatolPrice | formatV}} USDT</span>
<span class="total_inner-many"
>{{ tatolPrice | formatV }} USDT</span
>
<!-- <span>USDT</span> -->
<span class="total_secondary-text">
<span class="total_symbol"></span>
<!-- 切换汇率 -->
<!-- <span>{{tatolPrice * usdAmount | formatV}} USD</span> -->
<span v-if="!currentrate">{{tatolPrice * usdAmount | formatV}} USD</span>
<span v-else-if="currentrate == 'HKD'">{{tatolPrice * hkdAmount | formatV}} HKD</span>
<span v-else-if="currentrate == 'USD'">{{tatolPrice * usdAmount | formatV}} USD</span>
<span v-else-if="currentrate == 'CNY'">{{tatolPrice * cnyAmount | formatV}} CNY</span>
<span v-else>{{tatolPrice * eurAmount | formatV}} EUR</span>
<span v-if="!currentrate"
>{{ (tatolPrice * usdAmount) | formatV }} USD</span
>
<span v-else-if="currentrate == 'HKD'"
>{{ (tatolPrice * hkdAmount) | formatV }} HKD</span
>
<span v-else-if="currentrate == 'USD'"
>{{ (tatolPrice * usdAmount) | formatV }} USD</span
>
<span v-else-if="currentrate == 'CNY'"
>{{ (tatolPrice * cnyAmount) | formatV }} CNY</span
>
<span v-else>{{ (tatolPrice * eurAmount) | formatV }} EUR</span>
</span>
</div>
</div>
@ -35,7 +45,11 @@
</el-row>
<!-- 内容 -->
<el-row class="cec-table gundong" stripe v-if="btcMoney!='' || ethMoney!=''||eosMoney!=''">
<el-row
class="cec-table gundong"
stripe
v-if="btcMoney != '' || ethMoney != '' || eosMoney != ''"
>
<!-- btc钱包内容 -->
<el-col
class="cec-title"
@ -44,16 +58,22 @@
>
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">{{ itembtc.tokenSymbol }}</span>
<span type="text" style="cursor: default;">{{
itembtc.tokenSymbol
}}</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">{{ itembtc.freeBalance | formatV }}</span>
<span type="text" class="white size">{{
itembtc.freeBalance | formatV
}}</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">{{ itembtc.freezeBalance | formatV }}</span>
<span type="text" class="white size">{{
itembtc.freezeBalance | formatV
}}</span>
</div>
<div>
<!-- 充值 -->
@ -61,26 +81,40 @@
class="blue"
@click="handleTableActionClick('deposit', itembtc)"
type="text"
>{{ $t('balances.table.header_last_recharge') }}</span>
>{{ $t('balances.table.header_last_recharge') }}</span
>
<!-- 提币 -->
<!-- <span
<span
@click="handleTableActionClick('withdrawal', itembtc)"
type="text"
>{{ $t('balances.table.header_last_mention') }}</span>-->
>{{ $t('balances.table.header_last_mention') }}</span
>
<!-- 划转 -->
<span
<!-- <span
@click="handleTableActionClick('transfer', itembtc)"
type="text"
>{{ $t('balances.table.header_last_hua') }}</span>
>{{ $t('balances.table.header_last_hua') }}</span
> -->
<!-- 交易 -->
<a href="./exchange">
<span type="text">{{ $t('balances.table.header_last_deal') }}</span>
<span type="text">{{
$t('balances.table.header_last_deal')
}}</span>
</a>
<!-- 财务记录 -->
<a
:href="'./balancesRecord/otcRecord?id=' + itembtc.tokenSymbol +'&addr='+ itembtc.addr + '&tokenId=' +itembtc.tokenId"
:href="
'./balancesRecord/otcRecord?id=' +
itembtc.tokenSymbol +
'&addr=' +
itembtc.addr +
'&tokenId=' +
itembtc.tokenId
"
>
<span type="text">{{ $t('balances.table.header_last_financial') }}</span>
<span type="text">{{
$t('balances.table.header_last_financial')
}}</span>
</a>
</div>
</el-col>
@ -94,15 +128,21 @@
>
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">{{ itemOtcETH.tokenSymbol }}</span>
<span type="text" style="cursor: default;">{{
itemOtcETH.tokenSymbol
}}</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">{{ itemOtcETH.freeBalance | formatV }}</span>
<span type="text" class="white size">{{
itemOtcETH.freeBalance | formatV
}}</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">{{ itemOtcETH.freezeBalance | formatV }}</span>
<span type="text" class="white size">{{
itemOtcETH.freezeBalance | formatV
}}</span>
</div>
<div>
@ -110,72 +150,109 @@
<span
@click="handleTableActionClick('deposit', itemOtcETH)"
type="text"
>{{ $t('balances.table.header_last_recharge') }}</span>
>{{ $t('balances.table.header_last_recharge') }}</span
>
<!-- 提币 -->
<!-- <span
<span
@click="handleTableActionClick('withdrawal', itemOtcETH)"
type="text"
>{{ $t('balances.table.header_last_mention') }}</span>-->
>{{ $t('balances.table.header_last_mention') }}</span
>
<!-- 划转 -->
<span
<!-- <span
@click="handleTableActionClick('transfer',itemOtcETH)"
type="text"
>{{ $t('balances.table.header_last_hua') }}</span>
>{{ $t('balances.table.header_last_hua') }}</span> -->
<!-- 交易 -->
<a href="./exchange">
<span type="text">{{ $t('balances.table.header_last_deal') }}</span>
<span type="text">{{
$t('balances.table.header_last_deal')
}}</span>
</a>
<!-- 财务记录 -->
<a
:href="'./balancesRecord/otcRecord?id=' + itemOtcETH.tokenSymbol +'&addr='+itemOtcETH.addr+'&tokenAddrOtc='+itemOtcETH.tokenAddr"
:href="
'./balancesRecord/otcRecord?id=' +
itemOtcETH.tokenSymbol +
'&addr=' +
itemOtcETH.addr +
'&tokenAddrOtc=' +
itemOtcETH.tokenAddr
"
>
<span type="text">{{ $t('balances.table.header_last_financial') }}</span>
<span type="text">{{
$t('balances.table.header_last_financial')
}}</span>
</a>
</div>
</el-col>
<!-- eos钱包内容 -->
<el-col class="cec-title" v-for="(item, indexEos) in eosMoney" :key="indexEos">
<el-col
class="cec-title"
v-for="(item, indexEos) in eosMoney"
:key="indexEos"
>
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">{{ item.tokenSymbol }}</span>
<span type="text" style="cursor: default;">{{
item.tokenSymbol
}}</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">{{ item.freeBalance | formatV }}</span>
<span type="text" class="white size">{{
item.freeBalance | formatV
}}</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">{{ item.freezeBalance | formatV }}</span>
<span type="text" class="white size">{{
item.freezeBalance | formatV
}}</span>
</div>
<div>
<!-- 充值 -->
<span
@click="handleTableActionClick('deposit', item)"
type="text"
>{{ $t('balances.table.header_last_recharge') }}</span>
>{{ $t('balances.table.header_last_recharge') }}</span
>
<!-- 提币 -->
<!-- <span
<span
@click="handleTableActionClick('withdrawal', item)"
type="text"
>{{ $t('balances.table.header_last_mention') }}</span>-->
>{{ $t('balances.table.header_last_mention') }}</span
>
<!-- 划转 -->
<span
<!-- <span
@click="handleTableActionClick('transfer', item)"
type="text"
>{{ $t('balances.table.header_last_hua') }}</span>
>{{ $t('balances.table.header_last_hua') }}</span
> -->
<!-- 交易 -->
<a href="./exchange">
<span type="text">{{ $t('balances.table.header_last_deal') }}</span>
<span type="text">{{
$t('balances.table.header_last_deal')
}}</span>
</a>
<!-- 财务记录 -->
<a
:href="'./balancesRecord/otcRecord?id=' + item.tokenSymbol
+'&addr='+item.userOpenId +'&addrId='+item.id+'&tokenName='+item.tokenName"
:href="
'./balancesRecord/otcRecord?id=' +
item.tokenSymbol +
'&addr=' +
item.userOpenId +
'&addrId=' +
item.id +
'&tokenName=' +
item.tokenName
"
>
<span type="text">{{ $t('balances.table.header_last_financial') }}</span>
<span type="text">{{
$t('balances.table.header_last_financial')
}}</span>
</a>
</div>
</el-col>
@ -203,42 +280,45 @@
</el-dialog>
<!-- 提币 -->
<!-- <el-dialog
<el-dialog
:title="$t('balances.table.header_last_mention')"
width="745px"
:visible.sync="ctrl.withdrawalDialogVisible"
v-if="ctrl.withdrawalDialogVisible"
>
<BibiBalancesWithdrawal :tiInfo="titoo"></BibiBalancesWithdrawal>
</el-dialog>-->
</el-dialog>
<!-- 划转 -->
<el-dialog
<!-- <el-dialog
:title="$t('balances.table.header_between')"
width="745px"
:visible.sync="ctrl.transferDialogVisible"
@close="closeTrans"
>
<div>
<p>{{$t("balances.table.header_betweenBibi")}}</p>
<p>{{ $t('balances.table.header_betweenBibi') }}</p>
<div class="transfer-form">
<el-form :model="form" label-position="top">
<el-form :model="form" label-position="top"> -->
<!-- 币种 -->
<el-form-item :label="$t('balances.table.header_pair')">
<!-- <el-form-item :label="$t('balances.table.header_pair')">
<el-input v-model="form.bi" :disabled="true"></el-input>
</el-form-item>
</el-form-item> -->
<!-- -->
<el-form-item :label="$t('balances.table.header_cong')">
<!-- <el-form-item :label="$t('balances.table.header_cong')">
<el-input v-model="form.get" :disabled="true"></el-input>
</el-form-item>
</el-form-item> -->
<!-- 转至 -->
<el-form-item :label="$t('balances.table.header_zhuan')">
<!-- <el-form-item :label="$t('balances.table.header_zhuan')">
<el-input v-model="form.out" :disabled="true"></el-input>
</el-form-item>
</el-form-item> -->
<!-- 金额 -->
<el-form-item :label="$t('balances.table.header_many')">
<el-input v-model="form.amount" :change="check_amount()"></el-input>
<!-- <el-form-item :label="$t('balances.table.header_many')">
<el-input
v-model="form.amount"
:change="check_amount()"
></el-input>
</el-form-item>
</el-form>
@ -248,16 +328,17 @@
class="btn-widget"
@click="handletransfer()"
:loading="loading"
>{{$t('balances.table.header_liji')}}</el-button>
>{{ $t('balances.table.header_liji') }}</el-button
>
<el-button
@click="ctrl.transferDialogVisible = false"
class="btn-widgetq"
>{{$t('balances.table.header_dele')}}</el-button>
>{{ $t('balances.table.header_dele') }}</el-button
>
</div>
</div>
</div>
<!-- <BanlancesTransfer></BanlancesTransfer> -->
</el-dialog>
</el-dialog> -->
</div>
</template>
@ -277,11 +358,18 @@ import {
chargeOTCBtc,
chargeOTCUsdt,
transferBtc,
addBtc,
} from '@/api/btc.js';
import {getOTCEth, chargeOTCEth, transferEth} from '@/api/eth.js';
import {getOTCEth, chargeOTCEth, transferEth, addEth} from '@/api/eth.js';
import {getOTCEos, upOTCEosAddr, chargeOTCEos, transferEos} from '@/api/eos.js';
import {
getOTCEos,
upOTCEosAddr,
chargeOTCEos,
transferEos,
addEos,
} from '@/api/eos.js';
import {getLeftPrice} from '@/api/currency.js';
@ -385,9 +473,56 @@ export default {
// return;
// }
//
this.ctrl.depositDialogVisible = true;
// this.ctrl.depositDialogVisible = true;
this.tatoo = name;
// console.log(this.tatoo);
if (name.tokenSymbol == 'EOS') {
addEos({
addr: name.addr,
tokenId: name.tokenSymbol,
walletType: 'OTC',
}).then(res => {
console.log(name.tokenSymbol);
console.log(name.addr);
if (res.data.code === 200) {
//
this.$message.success(this.$t('balances.table.add'));
// location.reload(); //
} else {
this.$message.error(res.data.msg);
}
});
} else if (name.tokenSymbol == 'BTC' || name.tokenSymbol == 'USDT') {
addBtc({
addr: name.addr,
tokenId: name.tokenSymbol,
walletType: 'OTC',
}).then(res => {
console.log(name.tokenSymbol);
console.log(name.addr);
if (res.data.code === 200) {
this.$message.success(this.$t('balances.table.add'));
// location.reload(); //
} else {
this.$message.error(res.data.msg);
}
});
} else {
addEth({
addr: name.addr,
tokenId: name.tokenSymbol,
walletType: 'OTC',
}).then(res => {
console.log(name.tokenSymbol);
console.log(name.addr);
if (res.data.code === 200) {
this.$message.success(this.$t('balances.table.add'));
// location.reload(); //
} else {
this.$message.error(res.data.msg);
}
});
}
break;
case 'withdrawal':

Loading…
Cancel
Save