| | |
| | | fileList: [], |
| | | isShowUp: true, |
| | | protocolShow: false, |
| | | protocolTxt: '' |
| | | protocolTxt: '', |
| | | learnMenu: null, |
| | | md5List: [] |
| | | }, |
| | | |
| | | resetTree: function (e) { |
| | |
| | | this.setData({ |
| | | resourceCodeList: res.datas.cmsDatas[0].datas, |
| | | learnTaskData: res.datas.cmsDatas[0].datas.filter((item) => item.refCode == 'jsek_learningTasks')[0] |
| | | }) |
| | | if (res.datas.cmsDatas[0].datas.length) this.setData({ |
| | | learnMenu: res.datas.cmsDatas[0].datas.find(item => item.refCode == 'jsek_cloudLearning') |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | cloundSaleMethod && |
| | | new Date().getTime() <= new Date(cloundSaleMethod.EndDate).getTime() && |
| | | new Date().getTime() >= new Date(cloundSaleMethod.BeginDate).getTime() |
| | | let md5s = [] |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | // 云学习上有销售方式,去掉云学习下所有销售方式 |
| | | if (this.data.tabValue == "jsek_teachingResources") { |
| | | |
| | | if (item.file || item.freeFile) { |
| | | let md5 = item.file ? item.file : item.freeFile |
| | | md5s.push(md5) |
| | | } |
| | | this.setData({ |
| | | md5List: md5s, |
| | | }); |
| | | } |
| | | if (flags) item.saleMethod = [] |
| | | item.checked = false; |
| | | if (item.sysType == 'CmsItem') { |
| | |
| | | new Date(item.saleMethod.find((citem) => citem.SaleType == 'Normal').BeginDate).getTime() <= new Date().getTime() |
| | | ) || (flags && cloundSaleMethod.Price == 0) |
| | | // 判断云学习全部购买按钮是否显示 |
| | | let isShowBuyCloundMenu = flags && cloundSaleMethod.Price >= 0 |
| | | let isShowBuyCloundMenu = flags && cloundSaleMethod.Price >= 0 && !this.data.buyIdList.includes(cloundSaleMethod.Id) |
| | | // 判断资源购买按钮是否显示 |
| | | let isShowBuyCloundBtn = res.datas.cmsDatas[0].datas.some(citem => citem.saleMethod.length != 0) || type.saleMethod.length |
| | | let isShowBuyCloundBtn = !flags && res.datas.cmsDatas[0].datas.some(citem => citem.saleMethod.length != 0) |
| | | // 判断购物车按钮和锁按钮是否显示 |
| | | this.handleTreeData(list).forEach(item => { |
| | | item.isbuy = this.resourceIsBuy(item); |
| | |
| | | app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | wx.showToast({ |
| | | icon: "success", |
| | | title: "请上传资源文件", |
| | | title: "上传成功", |
| | | }); |
| | | this.closeDialog() |
| | | }) |