zzzz
2024-04-02 ab0704f2238e9159d13c66a19e830bcb249b36b9
src/page/list/tradingList/data.list.vue
@@ -109,6 +109,10 @@
      type: Array,
      default: [],
    },
    zxtabsList: {
      type: Array,
      default: [],
    },
  },
  watch: {
    active(e) {
@@ -180,14 +184,21 @@
        },
      });
    },
    // 获取列表
    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,
@@ -197,10 +208,19 @@
        stockType: stockType,
        orderBy: "",
      };
      let data = await api.getStockByType(opt);
      // console.log();
      // api.positionzx;
      let data;
      if (a !== "") {
        data = await api.getStockByType(opt);
      } else {
        // 自选
        data = await api.positionzx(opt);
      }
      this.loadings = false;
      if (data.status === 0) {
        console.log(data.data.list.length < 15);
        if (data.data.list.length < 15) {
          this.finished = true;
        }
@@ -214,12 +234,9 @@
      }
    }, 500),
    onLoads() {
      console.log(333333);
      // if (!this.loading) {
      this.pageNumVal++;
      this.loadings = true;
      this.getStock();
      // }
    },
    optionszx() {},
  },