交易所前端蓝色ui 4.5 jiem
lxf
2025-04-19 d0fd43dc856abc30b53e4ebe2258d85123f987f5
feat: 顶部热门修改
1 files modified
36 ■■■■■ changed files
src/views/market/market.vue 36 ●●●●● patch | view | raw | blame | history
src/views/market/market.vue
@@ -783,22 +783,26 @@
        this.activeList = this.jsonArray;
        //获取顶部热门
        this.topListData = [];
        this.activeList.map((val) => {
          if (this.topListData.length < 3) {
            //val.isTop=="1"
            if (val.isTop == 1) {
              this.topListData.push(val);
            }
          }
        });
        if (this.topListData.length == 0) {
          this.activeList.map((val) => {
            if (this.topListData.length < 3) {
              //val.isTop=="1"
              this.topListData.push(val);
            }
          });
        }
        const targetSymbols = ["BTC/USDT", "ETH/USDT", "DOGE/USDT"];
        this.topListData = this.activeList.filter((item) =>
          targetSymbols.includes(item.name)
        );
        // this.activeList.map((val) => {
        // if (this.topListData.length < 3) {
        //val.isTop=="1"
        // if (val.isTop == 1) {
        //   this.topListData.push(val);
        // }
        // }
        // });
        // if (this.topListData.length == 0) {
        //   this.activeList.map((val) => {
        //     if (this.topListData.length < 3) {
        //       //val.isTop=="1"
        //       this.topListData.push(val);
        //     }
        //   });
        // }
        // this.activeList = this.jsonArray
        // this.topListData = this.jsonArray.slice(0,5)
      }