|
|
|
@ -20,7 +20,8 @@ |
|
|
|
decreace2: activeContract.increase < 0, |
|
|
|
increase: activeContract.increase >= 0 |
|
|
|
}"> |
|
|
|
{{ activeContract.price }} |
|
|
|
<!-- {{ activeContract.price }} --> |
|
|
|
{{price1}} |
|
|
|
</div> |
|
|
|
<!-- <div class="title mb-1 text-secondary"> |
|
|
|
{{ $t("contract.h6") }} |
|
|
|
@ -104,7 +105,8 @@ |
|
|
|
</div> |
|
|
|
<div class="width-32 text-right" > |
|
|
|
<!-- :class="item.increase < 0 ? 'decreace' : 'increase'" --> |
|
|
|
{{ item.price }} |
|
|
|
<!-- {{ item.price }} --> |
|
|
|
{{item.symbol == activeSymbol ? price1 : item.price}} |
|
|
|
</div> |
|
|
|
<div class="width-32 text-right":class="item.increase < 0 ? 'decreace' : 'increase'"> |
|
|
|
{{ item.increaseStr }} |
|
|
|
@ -244,7 +246,9 @@ export default { |
|
|
|
symbolDetail:{}, |
|
|
|
currentIcon: '', |
|
|
|
filterCoin: "", |
|
|
|
contractListFilter: [] |
|
|
|
contractListFilter: [], |
|
|
|
price1:0, |
|
|
|
intervalId:'' |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -314,8 +318,7 @@ export default { |
|
|
|
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.startWatchingPrice(); |
|
|
|
}, |
|
|
|
//三秒更新一次数据 |
|
|
|
mounted: function () { |
|
|
|
@ -324,6 +327,12 @@ export default { |
|
|
|
}, 2000) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
startWatchingPrice(){ |
|
|
|
this.intervalId = setInterval(() => { |
|
|
|
let newPrice = localStorage.getItem('price'); |
|
|
|
this.price1 = newPrice; |
|
|
|
}, 10); // 每秒检查一次 |
|
|
|
}, |
|
|
|
ispopover1(item){ |
|
|
|
this.activeSymbol=item; |
|
|
|
// this.$refs.popover.showPopper = false; |
|
|
|
|