|
|
@ -130,6 +130,7 @@ |
|
|
:wsUrl="wsUrl" |
|
|
:wsUrl="wsUrl" |
|
|
:ws="ws" |
|
|
:ws="ws" |
|
|
class="mr-2" |
|
|
class="mr-2" |
|
|
|
|
|
ref="handicap" |
|
|
/> |
|
|
/> |
|
|
<!-- 交易 --> |
|
|
<!-- 交易 --> |
|
|
<exchange-store |
|
|
<exchange-store |
|
|
@ -263,6 +264,7 @@ export default { |
|
|
this.ws.on("open", () => { |
|
|
this.ws.on("open", () => { |
|
|
this.swapMarketList(); |
|
|
this.swapMarketList(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
console.info(this.$refs) |
|
|
}, |
|
|
}, |
|
|
//三秒更新一次数据 |
|
|
//三秒更新一次数据 |
|
|
mounted: function () { |
|
|
mounted: function () { |
|
|
@ -296,9 +298,15 @@ export default { |
|
|
this.ws.on('close',()=>{ |
|
|
this.ws.on('close',()=>{ |
|
|
this.ws= new Socket(this.Globals.Server.Path.WS1), |
|
|
this.ws= new Socket(this.Globals.Server.Path.WS1), |
|
|
console.log('链接关闭'); |
|
|
console.log('链接关闭'); |
|
|
this.swapMarketList(); |
|
|
this.wsOpen(); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
wsOpen(){ |
|
|
|
|
|
this.ws.on("open", () => { |
|
|
|
|
|
this.swapMarketList(); |
|
|
|
|
|
this.$refs.handicap.linkSocket() |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
// 获取合约市场 |
|
|
// 获取合约市场 |
|
|
getMarketList() { |
|
|
getMarketList() { |
|
|
Contract.getMarketList().then(res => { |
|
|
Contract.getMarketList().then(res => { |
|
|
|