zzzz
2024-04-10 66d132b96fd30abf1d75bed49ff176a52b4101ee
src/page/list/tradingList/data.list.vue
@@ -120,7 +120,6 @@
      this.listArr = [];
      this.pageNumVal = 1;
      this.loadings = true;
      this.getStock(e, this.zxactive, 1);
    },
    zxactive(e) {
      this.finished = false;
@@ -143,6 +142,7 @@
      finished: false,
      listArr: [],
      pageNumVal: 1,
      getInterval: null,
    };
  },
@@ -150,6 +150,9 @@
    this.listArr = [];
    this.pageNumVal = 1;
    this.getStock(this.active, this.zxactive, 1);
    this.getInterval = setInterval(() => {
      this.getStock(this.active, this.zxactive, 1);
    }, 5000);
  },
  methods: {
    filterSH(val) {
@@ -188,21 +191,18 @@
    // 获取列表
    getStock: handleDt.debounce(async function (a, b, c) {
      a = this.active;
      let stockType = "";
      if (a !== "") {
        let array = this.tabsList.filter((item) => item.key === a);
        stockType = array[0].name;
      } else {
        // return this.getStockzx();
        let array = this.zxtabsList.filter((item) => item.key === b);
        stockType = array[0].name;
      }
      console.log(a, b, c, "=====");
      let pageNumVal = c || this.pageNumVal;
      let opt = {
        pageNum: pageNumVal,
        pageSize: 15,
        pageSize: 100,
        stockPlate: "",
        keyWords: this.sousuo,
        stockType: stockType,
@@ -221,9 +221,9 @@
      this.loadings = false;
      if (data.status === 0) {
        if (data.data.list.length < 15) {
          this.finished = true;
        }
        // if (data.data.list.length < 15) {
        this.finished = true;
        // }
        if (pageNumVal !== 1) {
          this.listArr = [...this.listArr, ...data.data.list];
        } else {
@@ -234,12 +234,16 @@
      }
    }, 500),
    onLoads() {
      this.pageNumVal++;
      this.loadings = true;
      this.getStock();
      // this.pageNumVal++;
      // this.loadings = true;
      // this.getStock();
    },
    optionszx() {},
  },
  destroyed() {
    clearInterval(this.getInterval);
    this.getInterval = null;
  },
};
</script>