1
jhzh
2025-11-12 1bd03f5c2e7b9fa9cc80c4e673e18132da411333
src/components/stock-list.vue
@@ -74,9 +74,22 @@
  watch: {},
  mounted() {
    this.init();
    this.initWebSocket();
    this.getExchange()
  },
  methods: {
    async getExchange(){
      let data = await api.getExchange();
      if (data.status === 0) {
        // Toast.success(data.msg);
        if(data.data==false){
        }else{
          this.initWebSocket();
        }
      } else {
        Toast.fail(data.msg);
      }
    },
    init() {
      this.pageNum = 1;
      this.stockList = [];
@@ -140,7 +153,7 @@
    initWebSocket() {
      console.log("initWebSocket");
      this.Trade = new WhrWebSocket({
        path: `wss://ws.huangzhongzhang.com/websocket-server `,
        path: `wss://ws.jinmanxuan.com/websocket-server `,
        onmessage: this.getTradeMessage
      });