1
zzzz
2024-04-07 74bcf0374dad94d352b68f10e2e3d6e0ebc2c9dc
src/page/list/tradingList/data.list.vue
@@ -76,9 +76,9 @@
            <div style="text-align: right">
              <div
                class="tp right_bs"
                :class="`${item.hcrate > 0 ? 'green' : 'red'}`"
                :class="`${item.color > 0 ? 'green' : 'red'}`"
              >
                <span class="price_color">{{ item.hcrate }}</span>
                <span class="price_color">{{ item.hcrateP }}</span>
              </div>
            </div>
          </van-col>
@@ -106,6 +106,10 @@
      default: "",
    },
    tabsList: {
      type: Array,
      default: [],
    },
    zxtabsList: {
      type: Array,
      default: [],
    },
@@ -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() {},
  },