Browse Source

修改合约保证金为2位小数点、以及合约价格问题

master
liaoxinyu 1 year ago
parent
commit
b0be05003e
  1. 7
      src/views/contract/exchange-store.vue
  2. 2
      src/views/contract/handicap.vue
  3. 5
      src/views/contract/index.vue

7
src/views/contract/exchange-store.vue

@ -97,6 +97,8 @@
class="form-control"
v-model="margin"
:placeholder="tips"
@input="inputEnter"
title=""
/>
<!-- <div class="input-group-append">
<span class="input-group-text">{{ $t("contract.e2") }}</span>
@ -343,6 +345,11 @@ export default {
}
},
methods: {
inputEnter() {
this.margin = this.margin
.replace(/[^\d.]/g, "") //
.replace(/^(\d*\.?\d{0,2}).*$/, "$1"); //
},
//
contractAccount(boo) {
if (!this.isLogin) return;

2
src/views/contract/handicap.vue

@ -206,6 +206,7 @@ export default {
// }
this.newPriceObj.price = msg.close;
this.$emit("input", this.newPriceObj);
localStorage.setItem("price",this.newPriceObj.price)
// console.log(this.newPriceObj.price, 'this.newPriceObj.price-----')
// const closeStr = msg.close.toString();
// this.newPriceObj.price = this.symbol === 'BTC' ? closeStr.slice(0, closeStr.indexOf('.') + 2) : closeStr.slice(0, closeStr.indexOf('.') + 4);
@ -228,6 +229,7 @@ export default {
this.newPriceObj = this.tradeList[0];
// }
this.$emit("input", this.newPriceObj);
localStorage.setItem("price",this.newPriceObj.price)
});
},
//

5
src/views/contract/index.vue

@ -47,7 +47,7 @@
<div style="font-weight: 500;color: #000;">{{ item.symbol }}/{{ parent.coin_name }}</div>
</td>
<td class="w-7/24 " :class="item.increase < 0 ? 'decreace' : 'increace'" style="font-weight: bold;">
{{ item.price }}
{{item.symbol == activeSymbol ? price1 : item.price}}
</td>
<td class="w-7/24" :class="item.increase < 0 ? 'decreace' : 'increace'" style="font-weight: bold;">
{{ item.increaseStr }}
@ -60,7 +60,8 @@
</el-popover>
</div>
<div class="price border-right" style="padding: 0px 30px;" :class="{ decreace: activeContract.increase < 0, increace: activeContract.increase >= 0 }">
<div class="current">{{ activeContract.price }}$</div>
<!-- <div class="current">{{ activeContract.price }}$</div> -->
<div class="current">{{ price1 }}$</div>
<div class="zf">{{ activeContract.increaseStr }}</div>
</div>
<!-- 币种价值数据 -->

Loading…
Cancel
Save