litian
2024-09-12 bbba5d26e9e26c910ed337dcb65f462752ee6dce
pages/bookServices/assort/index.js
@@ -25,6 +25,37 @@
    bookList: [],
    loading: false,
    listLoding: false,
    stairListLoading: false,
    rowCol: [{
        width: '50%',
      },
      {
        width: '100%'
      },
      {
        width: '80%'
      },
      {
        width: '100%'
      }, {
        width: '100%'
      },
      {
        width: '100%'
      },
      {
        width: '50%'
      },
      {
        width: '100%'
      },
      {
        width: '80%'
      },
      {
        width: '100%'
      },
    ],
  },
  /**
@@ -82,11 +113,12 @@
   * 用户点击右上角分享
   */
  onShareAppMessage() {},
  onShareTimeline() {},
  // 获取侧边栏列表
  getAssortList() {
    this.setData({
      loading: true,
      listLoding: true,
    });
    const query = {
      path: "*",
@@ -134,7 +166,8 @@
  // 获取一级分类
  getStairList(path) {
    this.setData({
      listLoding: true,
      stairListLoading: true,
      startList: []
    });
    const query = {
      path,
@@ -157,14 +190,16 @@
      for (let index = 0; index < res.datas.length; index++) {
        const item = res.datas[index];
        item.icon ?
          (item.icon = getPublicImage(item.icon, 500)) :
          (item.icon = getPublicImage(item.icon, 150)) :
          (item.icon = item.icon);
        item.children = await this.getSecondList(item);
      }
      // 一级分类赋值
      this.setData({
        startList: res.datas,
        listLoding: false,
        stairListLoading: false,
        "startCheck.id": res.datas[0].id,
        "startCheck..code": "",
      });
@@ -197,7 +232,7 @@
    await app.MG.store.getStoreChannelList(query).then((res) => {
      for (let index = 0; index < res.datas.length; index++) {
        const element = res.datas[index];
        if (element.icon) element.icon = getPublicImage(element.icon, 500);
        if (element.icon) element.icon = getPublicImage(element.icon, 150);
      }
      datas = res.datas;
    });