Browse Source

修改合约价格

master
liaoxinyu 1 year ago
parent
commit
28e3f0f2ff
  1. 17
      pages/exchange/index.vue

17
pages/exchange/index.vue

@ -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({

Loading…
Cancel
Save