diff --git a/src/components/balances/banlanes-tabds.vue b/src/components/balances/banlanes-tabds.vue index 2f9dc92..aeca8d6 100644 --- a/src/components/balances/banlanes-tabds.vue +++ b/src/components/balances/banlanes-tabds.vue @@ -78,19 +78,19 @@ o.oooooo -->
- + + > --> +
- + + >--> +
- + + >--> +

微信

-

初始资金:{{ userTimeMoneyDto.wxPayInit }}

-

余额:{{ userTimeMoneyDto.wxPay }}CNY

+

初始资金:{{ userTimeMoneyDto.wxPayInit}} CNY

+

余额:{{ userTimeMoneyDto.wxPay }} CNY

@@ -31,16 +31,16 @@
余额:{{ userTimeMoneyDto.btc }}余额:{{ userTimeMoneyDto.btc }}

总额≈:{{tatolPrice}} CNY

地址:{{userTimeMoneyDto.assessUserId}} 余额:{{ userTimeMoneyDto.usdt }}余额:{{ userTimeMoneyDto.usdt }}

总额≈:{{tatolPrice}} CNY

地址:{{userTimeMoneyDto.assessUserId}} 余额:{{ userTimeMoneyDto.eos }}余额:{{ userTimeMoneyDto.eos }}

总额≈:{{tatolPrice}} CNY

地址:{{userTimeMoneyDto.assessUserId}} 余额:{{ userTimeMoneyDto.eth }}余额:{{ userTimeMoneyDto.eth }}

总额≈:{{tatolPrice}} CNY

地址:{{userTimeMoneyDto.assessUserId}}
@@ -52,22 +52,81 @@ import NavHeader from '@/components/common/header'; import Footer from '@/components/common/footer'; import {getUserTimeMoneyDto} from '@/api/yyyf'; +import {getLeftPrice} from '@/api/currency.js'; export default { name: 'entry', data() { return { activeName: 'BTC', userTimeMoneyDto: {}, + tatolPrice:0 }; }, components: { NavHeader, Footer, }, + methods:{ + getUSDTPrie() { + getLeftPrice().then(res => { + this.USDTPrie = res.data.data; + // console.log(this.USDTPrie); + + // 获取币种汇率 + let cnyAmount = this.USDTPrie[0].cnyAmount; + let btcCount=0; + let usdtCount=this.userTimeMoneyDto.usdt; + let eosCount=0; + let ethCount=0; + + for (let i = 0; i < this.USDTPrie.length; i++) { + // 获取btc转usdt资产 + if (this.USDTPrie[i].currencyPair == 'BTC-USDT') { + // console.log(this.USDTPrie[i].amount); + // + btcCount = this.userTimeMoneyDto.btc * this.USDTPrie[i].amount; + // console.log('btc'+this.btcPrice); + } + // return this.btcPrice; + } + for (let i = 0; i < this.USDTPrie.length; i++) { + // 获取btc转usdt资产 + if (this.USDTPrie[i].currencyPair == 'EOS-USDT') { + // console.log(this.USDTPrie[i].amount); + // + eosCount = this.userTimeMoneyDto.eos * this.USDTPrie[i].amount; + // console.log('btc'+this.btcPrice); + } + // return this.btcPrice; + } + + for (let i = 0; i < this.USDTPrie.length; i++) { + // 获取btc转usdt资产 + if (this.USDTPrie[i].currencyPair == 'ETH-USDT') { + // console.log(this.USDTPrie[i].amount); + // + ethCount = this.userTimeMoneyDto.eth * this.USDTPrie[i].amount; + // console.log('btc'+this.btcPrice); + } + // return this.btcPrice; + } + + let digitWallet= (btcCount+usdtCount+eosCount+ethCount)*cnyAmount; + + let total=digitWallet+this.userTimeMoneyDto.aliPay+this.userTimeMoneyDto.wxPay+this.userTimeMoneyDto.bankCard; + // 获取总资产 + this.tatolPrice =Math.floor(total*10) / 10; + + // console.log(this.tatolPrice); + }); + } + }, created() { getUserTimeMoneyDto().then(res => { if (res.data.code === 200) { this.userTimeMoneyDto = res.data.data; + this.getUSDTPrie(); + } else { this.$message.warning({ message: res.data.msg,