| | |
| | | }, |
| | | startQuoteSocket() { |
| | | // 行情socket |
| | | if(this.symbol=='orbital'){ |
| | | this.symbol = 'mother' |
| | | } |
| | | if(this.symbol=='zyd'){ |
| | | this.symbol = 'zkp' |
| | | } |
| | | if(this.symbol=='dea'){ |
| | | this.symbol = 'dia' |
| | | } |
| | | if(this.symbol=='axfd'){ |
| | | this.symbol = 'xeta' |
| | | } |
| | | if(this.symbol=='smk'){ |
| | | this.symbol = 'og' |
| | | } |
| | | if(this.symbol=='fpp'){ |
| | | this.symbol = 'fil' |
| | | } |
| | | if(this.symbol=='ask'||this.symbol=='ASK'){ |
| | | this.symbol = 'gas' |
| | | } |
| | | if(this.symbol=='jkrt'){ |
| | | this.symbol = 'axs' |
| | | } |
| | | if(this.symbol=='egt'){ |
| | | this.symbol = 'ethw' |
| | | } |
| | | this.sockets.quotes = new WebSocket(`${WS_URL}/1/${this.symbol}`); |
| | | // socket.onopen = () => { |
| | | // console.log('open') |
| | |
| | | startDeepSocket() { |
| | | // 开启socket链接 |
| | | this.closeSocket(); |
| | | |
| | | if(this.symbol=='orbital'){ |
| | | this.symbol = 'mother' |
| | | } |
| | | if(this.symbol=='zyd'){ |
| | | this.symbol = 'zkp' |
| | | } |
| | | if(this.symbol=='dea'){ |
| | | this.symbol = 'dia' |
| | | } |
| | | if(this.symbol=='axfd'){ |
| | | this.symbol = 'xeta' |
| | | } |
| | | if(this.symbol=='smk'){ |
| | | this.symbol = 'og' |
| | | } |
| | | if(this.symbol=='fpp'){ |
| | | this.symbol = 'fil' |
| | | } |
| | | if(this.symbol=='ask'||this.symbol=='ASK'){ |
| | | this.symbol = 'gas' |
| | | } |
| | | if(this.symbol=='jkrt'){ |
| | | this.symbol = 'axs' |
| | | } |
| | | if(this.symbol=='egt'){ |
| | | this.symbol = 'ethw' |
| | | } |
| | | this.socket = new WebSocket(`${WS_URL}/3/${this.symbol}`); |
| | | |
| | | this.socket.onopen = () => { |