1
jhzh
2024-10-21 153962b949e70fb7a694f7d14ec630d6bdafa1aa
src/page/trade/index.vue
@@ -355,6 +355,7 @@
         });
      },
      mounted() {
         this.GET_UERS_KYC();
         let symbol = this.$route.params.symbol;
         let type = this.$route.params.aa;
@@ -379,12 +380,12 @@
         ...mapActions("user", ["GET_UERS_KYC"]),
         typeclick(e) {
            this.typeindex = e
            if(e==0){
               this.initParama(this.symbol)
            }else{
               // this.symbol = 'wld'
               this.initParam(this.symbol)
            }
            // if(e==0){
            //    this.initParama(this.symbol)
            // }else{
            //    // this.symbol = 'wld'
            //    this.initParam(this.symbol)
            // }
            this.$forceUpdate()
         },
         onUpdate(symbol,name) {
@@ -600,6 +601,7 @@
         },
         fetchDeepData(symbol) {
           console.log("sd");
           this.typeclick(0)
           _getDeepData(symbol).then((data) => {
             // 获取深度
             console.log(data);
@@ -644,7 +646,10 @@
           }else{
              this.closeSocket();
           }
            if(this.symbol=="jkrt"){
               this.symbol = 'axs'
            }
           this.socket = new WebSocket(`${WS_URL}/3/${this.symbol}`);
         
           this.socket.onopen = () => {
@@ -674,6 +679,9 @@
            console.log("symbol", this.symbol);
            if (!this.symbol) {
               return;
            }
            if(this.symbol=="jkrt"){
               this.symbol = 'axs'
            }
            this.socket = new WebSocket(`${WS_URL}/1/${this.symbol}`);
            this.socket.onmessage = (evt) => {
@@ -891,6 +899,9 @@
      },
      startQuoteSocket() {
        // 行情socket
        if(this.symbol=="jkrt"){
           this.symbol = 'axs'
        }
        this.sockets.quotes = new WebSocket(`${WS_URL}/1/${this.symbol}`);
        // socket.onopen =  () => {
        //     console.log('open')