| | |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | isBuyBank: { |
| | | type: Boolean |
| | | }, |
| | | bankSaleData: { |
| | | type: Object |
| | | }, |
| | | list: { |
| | | type: Array, |
| | | value: [], |
| | |
| | | }, |
| | | }); |
| | | } |
| | | if (!this.data.isBuyBank) return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请先购买题库', |
| | | }) |
| | | wx.showLoading({ |
| | | title: "加载中", |
| | | }); |
| | | // 获取章节下是否有题目 |
| | | let idPathList = []; |
| | | |
| | | if (this.properties.storeInfo || this.properties.jslx) { |
| | | idPathList.push({ |
| | | id: this.properties.bookInfo.id, |
| | |
| | | size: 999, |
| | | }, |
| | | }; |
| | | console.log(value.childrenFolderCount, 1234578) |
| | | if (value.childrenFolderCount == 0) { |
| | | wx.hideLoading(); |
| | | return wx.showToast({ |
| | |
| | | type: item.type, |
| | | }); |
| | | }); |
| | | console.log(idPathList, 123413456578) |
| | | } |
| | | } |
| | | wx.hideLoading(); |
| | |
| | | loading: type, |
| | | }); |
| | | }, |
| | | // 题库购买 |
| | | buyBank() { |
| | | var myEventDetail = {} // detail对象,提供给事件监听函数 |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true |
| | | } // 触发事件的选项 |
| | | this.triggerEvent('buyBank', myEventDetail, myEventOption) |
| | | } |
| | | }, |
| | | }); |