闫增涛
2024-09-18 c96612e8a63ecef9590be0f8b5199277ec94e5b9
pages/digitalCourses/digitalCoursesDetails/index.js
@@ -174,9 +174,10 @@
    this.digitalCoursesDetailsGet(options.id)
    this.getPlayerList()
    this.getType()
    // this.setData({
    //   userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name,
    // })
    this.setData({
      userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name,
    })
    console.log('1', options.id);
  },
  /**
@@ -190,6 +191,10 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    if (this.data.tabValue == 2) {
      this.getPlayerList()
      this.getResource()
    }
  },
@@ -481,7 +486,6 @@
        res.datas.cmsDatas[0].datas.forEach((item) => {
          if (item.type == 'questionBankFolder' || item.type == 'questionBankItem') {
            test.push(item)
          } else if (item.type != "resourceItem") {
            this.data.playerList.forEach(pItem => {
              if (pItem.cmsItemId == item.id) {
@@ -493,9 +497,7 @@
          if (item.type == 'productItem') {
            learnItemList.push(item)
          }
        })
        if (this.data.selectActive === 'learn') {
          let list = []
          // 测试 6位// 正式 5位//  测试调用传20,内部7  正式调用传17 内部传6
@@ -514,6 +516,7 @@
              learnList: list,
              openTeachids: result,
            });
            console.log(1, this.data.learnList, this.data.playerList)
          }
        } else {
          const data = test.filter(
@@ -878,6 +881,7 @@
            })
            .then((res) => {
              if (res) {
                this.digitalCoursesDetailsGet(this.data.digitalsData.id);
                wx.showToast({
                  title: "领取成功",
                  icon: "none",