闫增涛
2024-04-12 672575a32ecd7f8e0bcd76152040657e9e57328a
pages/bookServices/assort/index.js
@@ -1,5 +1,7 @@
// pages/bookServices/assort/index.js
import { getPublicImage } from "../../../assets/js/middleGround/tool";
import {
  getPublicImage
} from "../../../assets/js/middleGround/tool";
const app = getApp();
Page({
  /**
@@ -88,18 +90,19 @@
    });
    const query = {
      path: "*",
      filterList: [
        {
          value: "Normal",
          field: "state",
        },
      ],
      filterList: [{
        value: "Normal",
        field: "state",
      }, ],
      queryType: "\\",
      searchList: [],
      size: "30",
      start: "0",
      storeRefCode: app.config.goodsStore,
      sort: { type: "Asc", field: "LinkOrder" },
      sort: {
        type: "Asc",
        field: "LinkOrder"
      },
    };
    app.MG.store.getStoreChannelList(query).then((res) => {
      const list = res.datas.filter(
@@ -135,29 +138,29 @@
    });
    const query = {
      path,
      filterList: [
        {
          value: "Normal",
          field: "state",
        },
      ],
      filterList: [{
        value: "Normal",
        field: "state",
      }, ],
      queryType: "\\",
      searchList: [],
      size: "30",
      start: "0",
      storeRefCode: app.config.goodsStore,
      sort: { type: "Asc", field: "LinkOrder" },
      sort: {
        type: "Asc",
        field: "LinkOrder"
      },
    };
    app.MG.store.getStoreChannelList(query).then(async (res) => {
      // 获取二级分类
      for (let index = 0; index < res.datas.length; index++) {
        const item = res.datas[index];
        item.icon
          ? (item.icon = getPublicImage(item.icon, 500))
          : (item.icon = item.icon);
        item.icon ?
          (item.icon = getPublicImage(item.icon, 500)) :
          (item.icon = item.icon);
        item.children = await this.getSecondList(item);
      }
      console.log(res.datas);
      // 一级分类赋值
      this.setData({
        startList: res.datas,
@@ -174,12 +177,10 @@
    let datas;
    const query = {
      path,
      filterList: [
        {
          value: "Normal",
          field: "state",
        },
      ],
      filterList: [{
        value: "Normal",
        field: "state",
      }, ],
      coverSize: {
        width: 500,
      },
@@ -188,7 +189,10 @@
      size: "30",
      start: "0",
      storeRefCode: app.config.goodsStore,
      sort: { type: "Asc", field: "LinkOrder" },
      sort: {
        type: "Asc",
        field: "LinkOrder"
      },
    };
    await app.MG.store.getStoreChannelList(query).then((res) => {
      for (let index = 0; index < res.datas.length; index++) {
@@ -205,7 +209,6 @@
      "startCheck.id": data.id,
      "startCheck.code": data.refCode,
    });
    console.log(data);
  },
  // 跳转列表页
  goPageList(e) {
@@ -231,4 +234,4 @@
      url: `/packageBookService/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck.code}&searchValue=${e.detail.value}`,
    });
  },
});
});