Browse Source

修改合约价格

master
liaoxinyu 2 years ago
parent
commit
c1ff8cf985
  1. 27
      src/views/contract/index.vue

27
src/views/contract/index.vue

@ -74,7 +74,7 @@
<input type="text" :placeholder="$t('exchange.search')" v-model="filterCoin" @input="enterFilter">
</div>
<div class="bottom-box-left">
<template v-for="parent in contractListFilter">
<template v-for="parent in contractList">
<table class="table" :key="parent.coin_name + 1">
<thead>
<tr>
@ -107,7 +107,7 @@
</div>
</div>
<div class="text-right width-32">
{{ item.close }}
{{ item.price }}
</div>
<div class="text-right width-32" :class="item.increase < 0 ? 'decreace' : 'increase'">
{{ item.increaseStr }}
@ -321,6 +321,7 @@ export default {
});
// console.info(this.$refs)
bus.$on('collapse', msg => {
console.log(msg.close);
this.activeContract.price =this.activeContract.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3);
this.holdPositionList.map(item=>{
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price
@ -353,10 +354,10 @@ export default {
if (sub == msg) {
if( data.symbol=='BTC' )(data.price).toFixed(1)
this.contractList = data;
if(this.filterCoin==''){
this.contractListFilter = data;
// this.Listes();
}
// if(this.filterCoin==''){
// this.contractListFilter = data;
// // this.Listes();
// }
}else if (cmd == "ping") {
this.ws.send({
cmd: "pong"
@ -371,7 +372,7 @@ export default {
},
Listes(){
this.Liste = []
this.contractListFilter[0].marketInfoList.map(item=>{
this.contractList[0].marketInfoList.map(item=>{
this.Liste.push({
pair_name: item.pair_name,
symbol: item.symbol,
@ -392,10 +393,11 @@ export default {
if(this.activeSymbol==''){
//
this.contractList = res;
if(this.filterCoin==''){
this.contractListFilter = res;
this.Listes();
}
this.Listes();
// if(this.filterCoin==''){
// this.contractListFilter = res;
// this.Listes();
// }
//
let firstParent = res[0];
@ -471,7 +473,8 @@ export default {
// let name = symbol.coinName || symbol.pair;
// return name.search(reg) >= 0;
let name = symbol.pair_name || symbol.symbol;
return name.search(reg) >= 0;
return reg.test(name);
// return name.search(reg) >= 0;
}
// return !this.keyword || symbol.coinName.concat(symbol.pair).search(reg) >= 0;

Loading…
Cancel
Save