|
|
|
@ -26,7 +26,8 @@ |
|
|
|
> |
|
|
|
<view class="col"> |
|
|
|
<view class="num fn-26 color-light"> |
|
|
|
{{ activeCoin.price }} |
|
|
|
<!-- {{ activeCoin.price }} --> |
|
|
|
{{ price1 }} |
|
|
|
</view> |
|
|
|
<view class="d-flex"> |
|
|
|
<view |
|
|
|
@ -72,7 +73,7 @@ |
|
|
|
</van-tab> |
|
|
|
</van-tabs> |
|
|
|
<view class="chart-box"> |
|
|
|
<iframe |
|
|
|
<iframe |
|
|
|
class="chart-tradingview" |
|
|
|
:src="`${mobileBase}static/tradingview.html?${setQuery( |
|
|
|
iframeQuery |
|
|
|
@ -218,6 +219,9 @@ export default { |
|
|
|
isLoad: false, |
|
|
|
isShow: true, |
|
|
|
price_cny: 0, |
|
|
|
newPriceObj: {}, |
|
|
|
price1:"", |
|
|
|
intervalId:'', |
|
|
|
app |
|
|
|
}; |
|
|
|
}, |
|
|
|
@ -355,6 +359,12 @@ export default { |
|
|
|
division:math.division, |
|
|
|
setQuery: qs.stringify, |
|
|
|
omitTo: math.omitTo, |
|
|
|
startWatchingPrice(){ |
|
|
|
this.intervalId = setInterval(() => { |
|
|
|
let newPrice = uni.getStorageSync('price'); |
|
|
|
this.price1 = newPrice; |
|
|
|
}, 100); // 每秒检查一次 |
|
|
|
}, |
|
|
|
// 页面通知图形 |
|
|
|
tabInterval(idx) { |
|
|
|
// if (this.isLoad) return; |
|
|
|
@ -495,6 +505,8 @@ export default { |
|
|
|
if (sub == `${this.ajax.trade}${symbol}`) { |
|
|
|
this.tradeList.unshift(data); |
|
|
|
this.tradeList.pop(); |
|
|
|
this.newPriceObj = data; |
|
|
|
uni.setStorageSync("price",this.newPriceObj.price) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
@ -511,6 +523,7 @@ export default { |
|
|
|
this.getCollect(); |
|
|
|
this.socketMessage(); |
|
|
|
this.getCurrencyExCny(); |
|
|
|
this.startWatchingPrice() |
|
|
|
}, |
|
|
|
destroyed() { |
|
|
|
this.ws.send({ |
|
|
|
|