bug
闫增涛
2024-09-09 7eea32a9a7a034e951468bea279688e8db5c1c98
pages/digitalCourses/index.js
@@ -20,6 +20,7 @@
    active: 0,
    activeItem: null,
    loading: false,
    contentLoading: false,
    shoppingCartGetId: [],
    sorter: {
      value: "*",
@@ -46,7 +47,6 @@
      ],
    },
    sortActive: '',
    otherType: null
  },
  /**
@@ -120,6 +120,9 @@
  },
  onTabsChange(event) {
    const value = event.detail.value
    this.setData({
      contentLoading: true
    })
    this.getCourseList(this.data.tabList[value])
  },
@@ -148,10 +151,6 @@
      }
    }
    app.MG.store.getStoreChannelList(data).then((res) => {
      // 去除数组最后一个元素
      // 找出其他分类的path,用于排除其他分类里的数据
      this.data.otherType = res.datas.find(item => item.refCode == "jsek_dCOther")
      res.datas = res.datas.filter(item => item.state == 'Normal')
      const newData = res.datas.slice(0, res.datas.length - 1)
      newData.unshift({
        name: "全部",
@@ -181,8 +180,8 @@
    if (this.data.searchValue) {
      searchObj = {
        'Name*': this.data.searchValue.trim(),
        '||isbn*': searchInputValue.value.trim(),
        '||courseLeader*': searchInputValue.value.trim()
        '||isbn*': this.data.searchValue.trim(),
        '||courseLeader*': this.data.searchValue.trim()
      }
    }
@@ -237,7 +236,8 @@
      })
      // 排除其他分类里的数据
      this.setData({
        courseList: res.datas.filter(item => item.productLinkInfo[0].LinkPath != this.data.otherType.pathList[0] + '\\' + this.data.otherType.id)
        courseList: res.datas,
        contentLoading: false,
      })
    })
  },
@@ -248,7 +248,6 @@
    this.setData({
      "sortActive": e.detail.value,
    });
    console.log(e)
    this.getCourseList(this.data.activeItem);
  },
  courseDetail(e) {
@@ -256,7 +255,7 @@
    setNewView('productId', item.id)
    this.getCourseTypeListList()
    wx.navigateTo({
      url: '/pages/digitalCourses/digitalCoursesDetails/index?id=' + item.id + '&path=' + item.idPath,
      url: '/pages/digitalCourses/digitalCoursesDetails/index?id=' + item.id + '&path=' + item.idPath
    })
  },