闫增涛
12 小时以前 d7b7435558c15789e9a2c650389cd28ce88d443b
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) {