QYF-GitLab1
20 小时以前 8f3c61c740322c6a9eb5314a05e43016a5f2191c
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -59,6 +59,12 @@
    },
    isCloundHaveSaleMethod: {
      type: Boolean
    },
    activeId: {
      type: String
    },
    source: {
      type: String
    }
  },
  data: {
@@ -71,7 +77,27 @@
    canExecute: true,
    purchaseList: []
  },
  ready() {},
  ready() {
    var query = this.createSelectorQuery()
    const that = this
    try {
      if (this.data.activeId)
        setTimeout(() => {
          query.select('.cms-' + this.data.activeId).boundingClientRect(function (res) {
            if (res && res.top > 0) {
              var myEventDetail = {
                top: res.top
              };
              var myEventOption = {
                bubbles: true,
                composed: true,
              };
              that.triggerEvent("handleScrollTop", myEventDetail, myEventOption);
            }
          }).exec()
        }, 500)
    } catch (err) {}
  },
  onLoad() {},
  observers: {
    treeList: function (newValue) {
@@ -85,7 +111,6 @@
      const flag = list.findIndex((item) => item.checked == true);
    },
  },
  methods: {
    handleList(tree) {
      for (let index = 0; index < tree.length; index++) {
@@ -255,7 +280,8 @@
          url = "/packageDomain/pages/resourceDetails/document/index";
        }
        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}`,
          // 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}`,
          url: '/packageDomain/pages/resourceDetails/myVideo/index?formPath=jsek_cloudLearning&parentName=mingxing&cmsId=161796&productLinkPath=161796\\161798\\165396\\162299&activeId=162299&parentProductLinkPath=161798\\165396&source=qrcode&bookName=&bookId=7129'
        });
      }
      const token = wx.getStorageSync(app.config.tokenKey);
@@ -267,7 +293,6 @@
        goPlayerFun()
      }
    },
    // 拿到所有项
    getAllChildren(id) {
      let result = [];
@@ -312,7 +337,6 @@
      });
      return result;
    },
    // 变为true
    findAndUpdateItemsByIds(tree, ids, state) {
      function findAndUpdate(node) {
@@ -330,7 +354,6 @@
      }
      return tree; // 返回修改后的完整数组
    },
    // 全选
    checkAll() {
      wx.showLoading()
@@ -367,7 +390,6 @@
      this.triggerEvent("changeCheckAll", myEventDetail, myEventOption);
      wx.hideLoading()
    },
    // 章节勾选
    checkResourceTitle(e) {
      wx.showLoading()