From 9cc35aa83764cb91436750db66e9868c99c1de90 Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期一, 29 四月 2024 13:14:50 +0800 Subject: [PATCH] 标题bug1 --- packageBookService/pages/bookServices/detail/components/tree/index.js | 82 +++------------------------------------- pages/bookExhibitionList/index.js | 19 +++------ packageDomain/pages/resourceDetails/myAudio/index.js | 1 packageBookService/pages/bookServices/detail/index.js | 1 4 files changed, 16 insertions(+), 87 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index 08238f8..379c69a 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -184,9 +184,14 @@ url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}`, }); - + console.log(item, '7899'); if (item.selectType == "document" || item.selectType == "pdf") { // freeFile + + if (item.selectType == "document") { + item.selectType = "pptx" + + } console.log(item); const fileLink = item.file ? app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file : app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.freeFile @@ -196,6 +201,7 @@ // 鍗曟涓嬭浇鍏佽鐨勬渶澶ф枃浠朵负 200MB wx.downloadFile({ url: fileLink, + // filePath: wx.env.USER_DATA_PATH + `/${item.name}.${item.selectType}`, filePath: wx.env.USER_DATA_PATH + `/${item.name}.${item.selectType}`, success: function (res) { console.log(res, "wx.downloadFile success res"); @@ -220,80 +226,6 @@ }, }); } - - - - - - - - - - - - - - - - - - - - - - - - // if (item.selectType == "document" || item.selectType == "pdf") { - // const fileLink = app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file; - - // let filePath = wx.env.USER_DATA_PATH + '/' + item.name - // console.log(filePath, 'filePath'); - // //鎻愮ず鍔犺浇涓� - // util.showLoading(); - // // 鍗曟涓嬭浇鍏佽鐨勬渶澶ф枃浠朵负 200MB - // wx.downloadFile({ - // url: fileLink, - // success: function (res) { - - // if (res.statusCode != 200) { - // util.hideLoadingWithErrorTips(); - // return false; - // } - // var Path = res.tempFilePath; //杩斿洖鐨勬枃浠朵复鏃跺湴鍧�锛岀敤浜庡悗闈㈡墦寮�鏈湴棰勮鎵�鐢� - - // wx.saveFile({ - // tempFilePath: Path, - // success: function (res) { - // var savedFilePath = res.savedFilePath; - // // 灏嗘枃浠朵繚瀛樹负 item.name - // wx.saveFile({ - // tempFilePath: savedFilePath, - // filePath: wx.env.USER_DATA_PATH + '/' + item.name, - // success: function (res) { - // wx.openDocument({ - // filePath: res.savedFilePath, - // showMenu: true, - // success: function (res) { - // util.hideLoading(); - // }, - // }); - // }, - // fail: function (err) { - // util.hideLoadingWithErrorTips(); - // } - // }); - // }, - // fail: function (err) { - // util.hideLoadingWithErrorTips(); - // } - // }); - // }, - // fail: function (err) { - // util.hideLoadingWithErrorTips(); - // }, - // }); - // } - diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js index 110d42b..ec81e90 100644 --- a/packageBookService/pages/bookServices/detail/index.js +++ b/packageBookService/pages/bookServices/detail/index.js @@ -855,6 +855,7 @@ SysType: 'CmsFolder', // 璧勬簮绫诲瀷锛岃瘯璇绘枃浠讹紝鏄惁鍏佽涓嬭浇绛夊弬鏁� selectType: [], + learnSelectType: [], freeFile: [], file: [], protectedFile: [], diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js index ca60362..acee924 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.js +++ b/packageDomain/pages/resourceDetails/myAudio/index.js @@ -268,6 +268,7 @@ jsek_resourceBrief: [], jsek_link: [], jsek_questionBank: [], + learnSelectType: [], learnSelectType: [] }, pading: { diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js index 0d31525..cdbed47 100644 --- a/pages/bookExhibitionList/index.js +++ b/pages/bookExhibitionList/index.js @@ -87,9 +87,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - this.bookExhibitionGet() - this.keyProjectsGet(this.data.newPrice) // this.setData({ // 'product.value': '*', // }); @@ -102,12 +100,12 @@ }) - watch.setWatcher(this); - let that = this; - setTimeout(function () { - that.data.name = "娴嬭瘯watch鍙樺寲浜�" - }, 500) - + // watch.setWatcher(this); + // let that = this; + // setTimeout(function () { + // that.data.name = "娴嬭瘯watch鍙樺寲浜�" + // }, 500) + // console.log(11111); }, watch: { name: function (newVal, oldVal) { @@ -129,12 +127,8 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず */ onShow() { - this.bookExhibitionGet() - this.keyProjectsGet(this.data.newPrice) - - }, /** @@ -434,6 +428,7 @@ this.bookExhibitionGet(newValue) } this.onLoad() + }, // 閲嶇偣椤圭洰 -- Gitblit v1.9.1