| | |
| | | titleName: '', |
| | | pdfDatA: [], |
| | | startTime: "", //进入页面当前时间 |
| | | pauseTime: 0 //暂停时间 |
| | | pauseTime: 0, //暂停时间 |
| | | applyState: '', |
| | | deadline: '', |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | wx.setNavigationBarTitle({ |
| | | title: '资源详情' |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | console.log(options); |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | |
| | | cmsId: options.cmsId, |
| | | parentName: options.parentName, |
| | | parentProductLinkPath: options.parentProductLinkPath, |
| | | productLinkPath: options.productLinkPath |
| | | productLinkPath: options.productLinkPath, |
| | | applyState: options.applyState, |
| | | deadline: options.deadline |
| | | }) |
| | | this.resourceDetailsData() |
| | | }, |
| | |
| | | //zpi文件下载 |
| | | onDownloadButton() { |
| | | const item = this.data.zipData; |
| | | if (this.data.applyState !== 'Normal') { |
| | | return wx.showToast({ |
| | | icon: 'none', |
| | | title: '请先申请下载', |
| | | }) |
| | | } else { |
| | | const flag = new Date(this.data.deadline) > new Date() |
| | | if (!flag) return wx.showToast({ |
| | | icon: 'none', |
| | | title: '请先申请下载', |
| | | }) |
| | | } |
| | | if (!item || !item.file) { |
| | | wx.showToast({ |
| | | title: '文件信息缺失', |
| | |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | const downloadUrl = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file; |
| | | wx.showLoading({ |
| | | title: '正在下载...', |
| | |
| | | //刚进来的时候调用 |
| | | handleTeachData(item) { |
| | | //图片 |
| | | console.log(item, 'item11111'); |
| | | if (item.selectType == 'picture') { |
| | | this.setData({ |
| | | showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file, |
| | | |
| | | showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile, |
| | | |
| | | }) |
| | | } |