From cb15c57d0ff984f5a100cf25d560fb0a69c00984 Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期二, 16 四月 2024 18:21:05 +0800 Subject: [PATCH] 音频bug4 --- packageBookService/pages/bookServices/detail/components/tree/index.js | 83 +++++++++++++++++++++++++++++++++++++++++ pages/bibliographyList/index.wxml | 2 - packageDomain/pages/resourceDetails/myAudio/index.js | 4 +- pages/retrievalPage/index.js | 2 - pages/bookExhibitionDetails/index.wxml | 2 + pages/cart/index.wxss | 6 +- pages/cart/index.wxml | 2 7 files changed, 90 insertions(+), 11 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index 5d4a08b..ef5aa5a 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -165,6 +165,8 @@ wx.navigateTo({ 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}`, }); + + if (item.selectType == "document" || item.selectType == "pdf") { const fileLink = app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file; @@ -173,7 +175,7 @@ util.showLoading(); // 鍗曟涓嬭浇鍏佽鐨勬渶澶ф枃浠朵负 200MB wx.downloadFile({ - url: fileLink, // 鍦板潃宸叉墦鐮侊紝鑷繁鎹釜鍏朵粬鐨勫湴鍧�锛�"https://www.xxxxx.com/file/娴嬭瘯閫氱煡.pdf"锛� + url: fileLink, success: function (res) { console.log(res, "wx.downloadFile success res"); if (res.statusCode != 200) { @@ -196,6 +198,84 @@ }, }); } + + + + + + + + + + + + + + + + + + + + + + + + // 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(); + // }, + // }); + // } + + + + + if (item.selectType == "webpage") { this.setData({ webpageSrc: item.jsek_link, @@ -204,6 +284,7 @@ } } }, + // 鎷垮埌鎵�鏈夐」 getAllChildren(id) { let result = []; diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js index 9a00794..f8a4e1d 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.js +++ b/packageDomain/pages/resourceDetails/myAudio/index.js @@ -283,7 +283,7 @@ showDataUrl = app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + datas.protectedFile + '&token=' + wx.getStorageSync(app.config.tokenKey); } else { console.log(datas); - showDataUrl = app.config.requestCtx + '/file/api/ApiDownload?md5=' + datas.file; + showDataUrl = datas.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + datas.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + datas.freeFile } titleName = datas.name; } @@ -326,7 +326,7 @@ } else { 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 }) this.pubulicPlayFun() } diff --git a/pages/bibliographyList/index.wxml b/pages/bibliographyList/index.wxml index 1e1c12a..d0cbda9 100644 --- a/pages/bibliographyList/index.wxml +++ b/pages/bibliographyList/index.wxml @@ -22,8 +22,6 @@ <view class="example-search"> <t-search model:value="{{value}}" placeholder="璇疯緭鍏ヤ功鐩悕绉�" bind:submit="onSearchSubmit"> - - </t-search> <!-- <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" /> --> diff --git a/pages/bookExhibitionDetails/index.wxml b/pages/bookExhibitionDetails/index.wxml index 17c5865..1a3528d 100644 --- a/pages/bookExhibitionDetails/index.wxml +++ b/pages/bookExhibitionDetails/index.wxml @@ -9,7 +9,9 @@ <view> <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> </view> + <view class="navbar-title">{{subtitleName}}</view> + </view> <view class="headBox"> diff --git a/pages/cart/index.wxml b/pages/cart/index.wxml index 1a15a72..8d664f4 100644 --- a/pages/cart/index.wxml +++ b/pages/cart/index.wxml @@ -72,7 +72,7 @@ <view class="settlementBox"> <view class="totalPrice">鎬讳环:<text class="totalPriceText">锟{totalPrice}}</text></view> <view class="buttonBox"> - <t-button class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage">鍘荤粨绠�({{selectedCount}})</t-button> + <t-button class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage"> <view >鍘荤粨绠�({{selectedCount}})</view> </t-button> </view> </view> </view> diff --git a/pages/cart/index.wxss b/pages/cart/index.wxss index 0b2b1df..b5877c9 100644 --- a/pages/cart/index.wxss +++ b/pages/cart/index.wxss @@ -186,9 +186,9 @@ padding: 0 !important; } -.t-button--default { - /* background-color: #FF6C00 !important; */ -} +/* .t-button--default { + background-color: #FF6C00 !important; +} */ .noDataBox { width: 100%; diff --git a/pages/retrievalPage/index.js b/pages/retrievalPage/index.js index 659db87..3ea3558 100644 --- a/pages/retrievalPage/index.js +++ b/pages/retrievalPage/index.js @@ -62,7 +62,6 @@ this.bibliographyGet() let event = { detail: { - value: "0" } } @@ -142,7 +141,6 @@ tabValue: value, isMore: false }) - } else if (value === '1') { console.log(value, 'tab'); this.setData({ -- Gitblit v1.9.1