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