Browse Source

修改合约用户权益和可用的值不相同

master
liaoxinyu 2 years ago
parent
commit
2053a89c9c
  1. 6
      pages/exchange/open-position.vue

6
pages/exchange/open-position.vue

@ -1457,8 +1457,10 @@ export default {
}; };
Contract.contractAccount(data, {loading: !boo, toast: false}).then((res) => { Contract.contractAccount(data, {loading: !boo, toast: false}).then((res) => {
// console.info(res) // console.info(res)
res.data.account_equity = (parseInt(res.data.account_equity)).toFixed(2) // res.data.account_equity = Number(res.data.account_equity).toFixed(2)
res.data.usable_balance = (res.data.usable_balance).toFixed(2) // res.data.usable_balance = (res.data.usable_balance).toFixed(2)
res.data.account_equity = Math.floor(Number(res.data.account_equity) * 100) / 100;
res.data.usable_balance = Math.floor(res.data.usable_balance * 100) / 100;
this.accountInfo = res.data; this.accountInfo = res.data;
if (!boo) { if (!boo) {
// this.form.lever_rate = res.data.lever_rate; // this.form.lever_rate = res.data.lever_rate;

Loading…
Cancel
Save