| | |
| | | // this.getResourceClass(); // 获取资源所属分类 |
| | | const token = wx.getStorageSync(app.config.tokenKey); |
| | | if (token) { |
| | | |
| | | this.getShoppingCartProductGet(); |
| | | this.getApplyInfo(options.id); |
| | | this.getAlreadyPBookList(); |
| | | this.getAlreadyEBookList(); |
| | |
| | | }; |
| | | app.MG.store.getProductDetail(query).then(async (res) => { |
| | | console.log(res.datas, 'res.datas'); |
| | | wx.setNavigationBarTitle({ |
| | | title: res.datas.name, |
| | | }) |
| | | this.setData({ |
| | | bookDetail: res.datas, |
| | | buyIdList: res.datas.purchasedSaleMethodIdList, |
| | |
| | | expire: false, |
| | | }); |
| | | } |
| | | } |
| | | if (!this.data.buy && this.data.bookDetail.isSell == '1') { |
| | | this.getShoppingCartProductGet(); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | size: 999 |
| | | }, |
| | | } |
| | | app.MG.store.getProductDetail(query).then((res) => { |
| | | app.MG.store.getProductDetailNoChildren(query).then((res) => { |
| | | if (!res.datas.cmsDatas[0].datas.length) { |
| | | return this.setData({ |
| | | noResources: true, |
| | | loading: false, |
| | | }); |
| | | } |
| | | console.log(res.datas.cmsDatas[0].datas, "资源") |
| | | let list = [] |
| | | // 测试 6位// 正式 5位// 测试调用传20,内部7 正式调用传17 内部传6 |
| | | //教学资源 云学习 |
| | |
| | | }) |
| | | } |
| | | } |
| | | const addNum = query.cmsPath.length > 11 ? 7 : query.cmsPath.length > 13 ? 8 : 6 |
| | | const addNum = query.cmsPath.length > 12 ? 7 : query.cmsPath.length > 14 ? 8 : 6 |
| | | const num = query.cmsPath.length + addNum |
| | | this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\', addNum) |
| | | list = this.ensureTreeConsistency(list) |
| | |
| | | if (data.length > 0) { |
| | | let list = [] |
| | | // 测试 6位// 正式 5位// 测试调用传20,内部7 正式调用传17 内部传6 |
| | | const addNum = query.cmsPath.length > 11 ? 7 : query.cmsPath.length > 13 ? 8 : 6 |
| | | const addNum = query.cmsPath.length > 12 ? 7 : query.cmsPath.length > 14 ? 8 : 6 |
| | | const num = query.cmsPath.length + addNum |
| | | this.getTreeList(data, num, list, '\\', addNum) |
| | | list = this.ensureTreeConsistency(list) |
| | |
| | | for (let i = 0; i < data.length; i++) { |
| | | if (index < 3) { |
| | | const item = data[i] |
| | | if (item.childrenFolderCount > 0) { |
| | | if (item.children && item.children.length > 0) { |
| | | result.push(item.id) |
| | | if (item.children) { |
| | | for (let j = 0; j < item.children.length; j++) { |