|
|
|
@ -199,8 +199,9 @@ export default { |
|
|
|
this.linkSocket(); |
|
|
|
} |
|
|
|
bus.$on('collapse', msg => { |
|
|
|
// this.newPriceObj.price =this.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3); |
|
|
|
// this.newPriceObj.price = msg.close; |
|
|
|
this.newPriceObj.price =this.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3); |
|
|
|
this.newPriceObj.price = msg.close; |
|
|
|
localStorage.setItem("price",this.newPriceObj.price) |
|
|
|
// this.$emit("input", this.newPriceObj); |
|
|
|
// console.log(this.newPriceObj.price, 'this.newPriceObj.price-----') |
|
|
|
}); |
|
|
|
@ -217,10 +218,11 @@ export default { |
|
|
|
this.sellList = res.swapSellList; |
|
|
|
this.buyList = res.swapBuyList; |
|
|
|
this.tradeList = res.swapTradeList; |
|
|
|
if(this.tradeList.length>0){ |
|
|
|
// if(this.tradeList.length>0){ |
|
|
|
this.newPriceObj = this.tradeList[0]; |
|
|
|
} |
|
|
|
// } |
|
|
|
this.$emit("input", this.newPriceObj); |
|
|
|
localStorage.setItem("price",this.newPriceObj.price) |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 计算深度 |
|
|
|
@ -272,8 +274,8 @@ export default { |
|
|
|
// console.log('if (sub == this.msg.trade)', this.msg.trade) |
|
|
|
this.tradeList.unshift(data); |
|
|
|
this.tradeList.pop(); |
|
|
|
this.newPriceObj = data; |
|
|
|
this.$emit("input", this.newPriceObj); |
|
|
|
// this.newPriceObj = data; |
|
|
|
// this.$emit("input", this.newPriceObj); |
|
|
|
} else if (type == "ping" ||cmd == "ping") { |
|
|
|
this.ws.send({ |
|
|
|
cmd: "pong" |
|
|
|
|