闫增涛
2024-09-19 d7e794685c439cb820259813b5e826a0ea218914
packageBookService/pages/bookServices/detail/components/learnResource/learnResource.js
@@ -18,7 +18,11 @@
    },
    isGoBuyResource: {
      type: Boolean
    }
    },
    isShowBuyCloundMenu: {
      type: Boolean,
      default: false
    },
  },
  /**
@@ -63,6 +67,19 @@
      this.setData({
        buy: type
      })
    },
    goLearnTask() {
      wx.navigateTo({
        url: `/packageBookService/pages/bookServices/detail/components/learnTask/index?bookId=${this.properties.bookId}`,
      })
    },
    buyCloudLearnClass() {
      var myEventDetail = {} // detail对象,提供给事件监听函数
      var myEventOption = {
        bubbles: true,
        composed: true
      } // 触发事件的选项
      this.triggerEvent('buyCloudLearnClass', myEventDetail, myEventOption)
    }
  }
})