Browse Source

修改合约实时价格获取

master
luyisha 3 years ago
parent
commit
a759006a5c
  1. 18
      pages/exchange/open-position.vue

18
pages/exchange/open-position.vue

@ -297,7 +297,12 @@
:max="6"
:contract="1"
>
<view class="fn-lg color-buy">{{ newPrice.price }}</view>
<!-- 合约页面的买卖列表中间的实时价格 -->
<view class="fn-lg color-buy">{{newPrice.price}}
<!-- <span class="color-buy" v-if="newPrice.price>100">{{omitTo(newPrice.price,2)}}</span>
<span class="color-buy" v-if="newPrice.price>1&&newPrice.price<100">{{omitTo(newPrice.price,4)}}</span>
<span class="color-buy" v-if="newPrice.price<1">{{omitTo(newPrice.price,6)}}</span> -->
</view>
</sell-and-buy>
</view>
</view>
@ -1431,9 +1436,18 @@ export default {
case `swapTradeList_${symbol}`:
this.tradeList.unshift(data);
this.tradeList.pop();
this.newPrice = data;
// this.newPrice = data;
// console.log(this.newPrice, 898989898988)
break;
case `swapMarketList`:
let arr = data[0].marketInfoList;
for(let i=0;i<arr.length;i++){
if(arr[i].symbol == symbol){
this.newPrice = arr[i]
}
}
// console.log(this.newPrice, '----------')
break;
}
});
},

Loading…
Cancel
Save