|
|
|
@ -59,7 +59,7 @@ |
|
|
|
class="w-7/24 " |
|
|
|
:class="item.increase < 0 ? 'decreace' : 'increace'" |
|
|
|
> |
|
|
|
{{ item.price }} |
|
|
|
{{item.symbol == activeSymbol ? price1 : item.price}} |
|
|
|
</td> |
|
|
|
<td |
|
|
|
class="w-7/24" |
|
|
|
@ -81,7 +81,8 @@ |
|
|
|
increace: activeContract.increase >= 0 |
|
|
|
}" |
|
|
|
> |
|
|
|
<span class="current">{{ activeContract.price }}$</span> |
|
|
|
<!-- <span class="current">{{ activeContract.price }}$</span> --> |
|
|
|
<span class="current">{{price1}}$</span> |
|
|
|
|
|
|
|
<span class="zf">{{ activeContract.increaseStr }}</span> |
|
|
|
</div> |
|
|
|
@ -231,6 +232,8 @@ export default { |
|
|
|
contractOpen: false, |
|
|
|
contractAgreement: {}, |
|
|
|
symbolDetail:{}, |
|
|
|
price1:0, |
|
|
|
intervalId:'' |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -277,6 +280,7 @@ export default { |
|
|
|
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price |
|
|
|
}) |
|
|
|
}); |
|
|
|
this.startWatchingPrice(); |
|
|
|
}, |
|
|
|
//三秒更新一次数据 |
|
|
|
mounted: function () { |
|
|
|
@ -286,6 +290,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; |
|
|
|
|