闫增涛
2025-03-28 b97bfcb85b2ded3b1f380e9a98b54b836faabba5
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -165,9 +165,7 @@
    // 跳转音视频播放器
    goPlayer(e) {
      // 检查登录状态
      console.log(e.currentTarget.dataset.item)
      const token = wx.getStorageSync(app.config.tokenKey);
      if (!token) return false
      const goPlayerFun = () => {
      const item = e.currentTarget.dataset.item;
      const parent = e.currentTarget.dataset.parent;
      const parentProductLinkPath = parent ?
@@ -195,17 +193,10 @@
        })
      }
      if (item.selectType == 'zip' || item.learnSelectType == 'zip') {
        // if (this.properties.applyState == 'Normal') {
        return wx.showToast({
          icon: 'error',
          title: '请前往PC端下载',
        })
        // } else {
        //   return wx.showToast({
        //     icon: 'error',
        //     title: '请先申请下载',
        //   })
        // }
      }
      if (this.properties.tab == "jsek_teachingResources" && (item.file || item.freeFile)) {
        let file = item.fileMap[item.file] ? item.fileMap[item.file] : item.fileMap[item.freeFile]
@@ -217,7 +208,6 @@
        }
      }
      if (this.properties.tab == "jsek_cloudLearning") {
        // 1.找出所有父级目录和本身(有销售方式) 和 云学习本身(有销售方式) 放到一个数组  为空则暂未开放销售
        let learn = []
        if (this.properties.isCloundHaveSaleMethod) {
@@ -250,7 +240,6 @@
            });
          }
        }
      }
      let url;
      if (item.selectType == "video" || item.learnSelectType == "video") {
@@ -268,6 +257,16 @@
      wx.navigateTo({
        url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`,
      });
      }
      const token = wx.getStorageSync(app.config.tokenKey);
      if (!token && this.data.tab != 'jsek_teachingResources') {
        loginInfo(app, (data) => {
          if (data) goPlayerFun()
        })
      } else {
        goPlayerFun()
      }
    },
    // 拿到所有项