|
|
|
@ -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> |
|
|
|
<!-- 币种价值数据 --> |
|
|
|
@ -198,7 +199,9 @@ export default { |
|
|
|
symbolDetail:{}, |
|
|
|
currentIcon: '', |
|
|
|
imge:[], |
|
|
|
Liste:[] |
|
|
|
Liste:[], |
|
|
|
price1:0, |
|
|
|
intervalId:'' |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -245,6 +248,7 @@ export default { |
|
|
|
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price |
|
|
|
}) |
|
|
|
}); |
|
|
|
this.startWatchingPrice(); |
|
|
|
}, |
|
|
|
//三秒更新一次数据 |
|
|
|
mounted: function () { |
|
|
|
@ -254,6 +258,12 @@ export default { |
|
|
|
}, 2000) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
startWatchingPrice(){ |
|
|
|
this.intervalId = setInterval(() => { |
|
|
|
let newPrice = localStorage.getItem('price'); |
|
|
|
this.price1 = newPrice; |
|
|
|
}, 10); // 每秒检查一次 |
|
|
|
}, |
|
|
|
ispopover1(item){ |
|
|
|
this.activeSymbol=item; |
|
|
|
this.getMarketList(); |
|
|
|
|