From 4496721cd3af3c68ed4d55218d3e83ea0664c57e Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期一, 29 四月 2024 17:53:10 +0800 Subject: [PATCH] bug3 --- packageDomain/pages/resourceDetails/document/index.wxss | 8 + packageDomain/pages/resourceDetails/document/index.wxml | 12 + pages/bookExhibitionList/index.js | 10 + pages/bookExhibitionList/index.wxml | 2 packageDomain/pages/resourceDetails/document/index.json | 4 packageDomain/pages/resourceDetails/document/index.js | 57 +++++++++++ packageDomain/pages/resourceDetails/myVideo/index.wxml | 3 packageBookService/pages/bookServices/detail/components/tree/index.js | 101 +++++++++---------- packageBookService/pages/bookServices/list/index.js | 1 pages/bibliographyList/index.wxml | 12 ++ pages/bibliographyList/index.wxss | 16 ++- packageBookService/pages/bookServices/detail/index.js | 2 pages/bibliographyList/index.js | 22 ++- 13 files changed, 168 insertions(+), 82 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index c6d26b1..b15157c 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -61,7 +61,8 @@ selectAll: [], shoppingCart: true, stop: false, - cart: true + cart: true, + canExecute: true }, ready() {}, @@ -134,13 +135,25 @@ // 璺宠浆闊宠棰戞挱鏀惧櫒 goPlayer(e) { // 妫�鏌ョ櫥褰曠姸鎬� + + + + const token = wx.getStorageSync(app.config.tokenKey); if (token) { + + + + + const item = e.currentTarget.dataset.item; const parent = e.currentTarget.dataset.parent; const parentProductLinkPath = parent ? parent.productLinkPath : wx.getStorageSync('teachResourcesPath') const parentName = parent ? parent.name : '鏁欏璧勬簮' let url; + + + if (this.properties.isShowCheck && this.resourceIsBuy(item)) { return false; } @@ -187,8 +200,26 @@ 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}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`, }); - console.log(item, '7899'); - if (item.selectType == "document" || item.selectType == "pdf") { + + // || item.selectType == "pdf" + + + + if (item.selectType == "pdf") { + console.log(item, '79825'); + const fileLink = item.file ? item.file : item.freeFile + console.log(fileLink); + wx.navigateTo({ + url: "/packageBookService/pages/components/webView/index?md5=" + + fileLink + + "&fileName=" + + item.name + + "&fileType=" + + item.selectType + "&bookBuy=true" + + }); + } + if (item.selectType == "document") { // freeFile if (item.selectType == "document") { @@ -228,67 +259,31 @@ util.hideLoadingWithErrorTips(); }, }); + + + + } -<<<<<<< Updated upstream -======= - // 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(); - // }, - // }); - // } ->>>>>>> Stashed changes if (item.selectType == "webpage") { this.setData({ webpageSrc: item.jsek_link, }); console.log(this.data.webpageSrc, "webpageSrc"); } + + + + + + + + + + } }, diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js index 5dd2180..3ee1ff3 100644 --- a/packageBookService/pages/bookServices/detail/index.js +++ b/packageBookService/pages/bookServices/detail/index.js @@ -2024,7 +2024,9 @@ this.data.bookBuy + "&bookId=" + this.data.bookDetail.id, + }); + debugger }, //鏍蜂功鐢宠 diff --git a/packageBookService/pages/bookServices/list/index.js b/packageBookService/pages/bookServices/list/index.js index 63cdf59..ab6f475 100644 --- a/packageBookService/pages/bookServices/list/index.js +++ b/packageBookService/pages/bookServices/list/index.js @@ -272,6 +272,7 @@ "secondList.options": options, }); const second = [this.data.secondCode]; + console.log(second); this.setData({ "secondList.value": second, }); diff --git a/packageDomain/pages/resourceDetails/document/index.js b/packageDomain/pages/resourceDetails/document/index.js index 9cf27f2..2449ab4 100644 --- a/packageDomain/pages/resourceDetails/document/index.js +++ b/packageDomain/pages/resourceDetails/document/index.js @@ -1,4 +1,5 @@ // pages/resourceDetails/document/index.js +import Toast from 'tdesign-miniprogram/toast/index'; const app = getApp() Page({ @@ -6,6 +7,11 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + visible: false, + showIndex: false, + closeBtn: false, + deleteBtn: false, + images: [], webpageSrc: '', navBarHeight: '', barHeight: '', @@ -283,6 +289,7 @@ showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile, }) + console.log(this.data.showData, 'showData'); } // 涓嬭浇鏂囦欢zip if (item.selectType == 'zip') { @@ -324,10 +331,58 @@ naturalResources.forEach(function (item) { // console.log(item); }); - } + }, + onClick() { + this.setData({ + images: [ + this.data.showData, + // 'https://tdesign.gtimg.com/mobile/demos/swiper2.png', + ], + showIndex: true, + visible: true, + }); + }, + onChange(e) { + const { + index + } = e.detail; + console.log('change', index); + }, + + onDelete(e) { + const { + index + } = e.detail; + + Toast({ + context: this, + selector: '#t-toast', + message: `鍒犻櫎绗�${index + 1}涓猔, + }); + }, + + onClose(e) { + const { + trigger + } = e.detail; + console.log(trigger); + this.setData({ + visible: false, + }); + }, + //棰勮鍥剧墖锛屾斁澶ч瑙� + preview(event) { + console.log(event.currentTarget.dataset.src) + let currentUrl = event.currentTarget.dataset.src + + wx.previewImage({ + current: currentUrl, // 褰撳墠鏄剧ず鍥剧墖鐨刪ttp閾炬帴 + // urls: this.data.showData // 闇�瑕侀瑙堢殑鍥剧墖http閾炬帴鍒楄〃 + }) + }, }) \ No newline at end of file diff --git a/packageDomain/pages/resourceDetails/document/index.json b/packageDomain/pages/resourceDetails/document/index.json index b556230..65c32cd 100644 --- a/packageDomain/pages/resourceDetails/document/index.json +++ b/packageDomain/pages/resourceDetails/document/index.json @@ -3,6 +3,8 @@ "usingComponents": { "t-icon": "tdesign-miniprogram/icon/icon", "t-button": "tdesign-miniprogram/button/button", - "t-image": "tdesign-miniprogram/image/image" + "t-image": "tdesign-miniprogram/image/image", + "t-toast": "tdesign-miniprogram/toast/toast", + "t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer" } } \ No newline at end of file diff --git a/packageDomain/pages/resourceDetails/document/index.wxml b/packageDomain/pages/resourceDetails/document/index.wxml index 662c9b1..53c2075 100644 --- a/packageDomain/pages/resourceDetails/document/index.wxml +++ b/packageDomain/pages/resourceDetails/document/index.wxml @@ -11,9 +11,9 @@ <view class="titleNameBox" wx:if="{{selectType != 'webpage'}}"> {{titleName}} </view> - +<!-- bind:tap="onClick" --> <view class="pictureBox" wx:if="{{selectType == 'picture'}}"> - <image src="{{showData}}" mode="aspectFit" /> + <image src="{{showData}}" mode="aspectFit" data-src="{{showData}}" bindtap="preview" /> </view> <view wx:if="{{selectType == 'zip'}}"> @@ -43,4 +43,10 @@ <web-view wx:if="{{selectType == 'webpage'}}" src="{{webpageSrc}}"></web-view> -<!-- <button bind:tap="handleTap">鐐逛綅</button> --> \ No newline at end of file +<!-- <button bind:tap="handleTap">鐐逛綅</button> --> + + + +<!-- <t-button theme="primary" size="large" variant="outline" block>鍩虹鍥剧墖棰勮</t-button> --> +<t-toast id="t-toast" /> +<t-image-viewer usingCustomNavbar deleteBtn="{{deleteBtn}}" closeBtn="{{closeBtn}}" showIndex="{{showIndex}}" visible="{{visible}}" images="{{images}}" bind:change="onChange" bind:delete="onDelete" bind:close="onClose"></t-image-viewer> \ No newline at end of file diff --git a/packageDomain/pages/resourceDetails/document/index.wxss b/packageDomain/pages/resourceDetails/document/index.wxss index 00a5896..ddde10d 100644 --- a/packageDomain/pages/resourceDetails/document/index.wxss +++ b/packageDomain/pages/resourceDetails/document/index.wxss @@ -45,7 +45,7 @@ } .titleNameBox { - height: 77rpx; + min-height: 77rpx; background: #FFFFFF; box-shadow: 0rpx 9rpx 9rpx 2rpx rgba(0, 0, 0, 0.06); padding: 20rpx 50rpx; @@ -60,9 +60,11 @@ display: flex; justify-content: center; margin-top: 160rpx; + width: 100%; + height: 100%; } .pictureBox image { - /* width: 520rpx; - height: 800rpx; */ + width: 100%; + height: 100%; } \ No newline at end of file diff --git a/packageDomain/pages/resourceDetails/myVideo/index.wxml b/packageDomain/pages/resourceDetails/myVideo/index.wxml index f229663..12c366f 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.wxml +++ b/packageDomain/pages/resourceDetails/myVideo/index.wxml @@ -12,7 +12,8 @@ <!-- 瑙嗛 --> <view class="videoBox" wx:if="{{videoChange}}"> <!-- autoplay='false' 鏄惁鑷姩鎾斁 --> - <video binderror="videoErrorCallback" src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> + <!-- <video binderror="videoErrorCallback" src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> --> + <video src="{{showData}}"></video> </view> diff --git a/pages/bibliographyList/index.js b/pages/bibliographyList/index.js index a4e6b10..f7bba40 100644 --- a/pages/bibliographyList/index.js +++ b/pages/bibliographyList/index.js @@ -217,6 +217,7 @@ }, SysType: 'CmsItem' }).then(res => { + console.log(res); res.datas.forEach(item => { item.determine = true }) @@ -313,6 +314,7 @@ const item = event.currentTarget.dataset.item console.log(item); if (item.fileType == "pdf") { + wx.navigateTo({ url: "/packageBookService/pages/components/webView/index?md5=" + item.freeFile + @@ -320,12 +322,12 @@ item.name + "&fileType=" + item.fileType + "&bookBuy=true" - // "&freePage=" + - // this.data.fileInfo.freePage + + // "&freePage=" + + // this.data.fileInfo.freePage + - // + - // "&bookId=" + - // this.data.bookDetail.id, + + + "&bookId=" + + item.id, }); } else { Toast({ @@ -375,7 +377,7 @@ } - } else if (this.data.tabValue == 1) { + } else if (this.data.tabValue == 2) { if (this.data.teacherList.length < this.data.teacherTotal) { this.setData({ @@ -394,10 +396,12 @@ }, 100) } - console.log(2); - } else if (this.data.tabValue == 2) { - if (this.data.vocationalList.length < this.data.vocationalTotal && this.data.vocationalList.length > 9) { + } else if (this.data.tabValue == 1) { + + console.log(this.data.vocationalList.length); + console.log(this.data.vocationalTotal); + if (this.data.vocationalList.length < this.data.vocationalTotal) { this.setData({ isMore: true, start: this.data.start + 1 diff --git a/pages/bibliographyList/index.wxml b/pages/bibliographyList/index.wxml index 35060f5..996fbdd 100644 --- a/pages/bibliographyList/index.wxml +++ b/pages/bibliographyList/index.wxml @@ -28,10 +28,14 @@ </view> <t-tabs class="contentBox" defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel"> <t-tab-panel label="楂樼瓑鏁欒偛({{higherTotal}})" value="0"> + + + <view wx:if="{{higherList.length <= 0}}" class="noDataBox"> <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> </view> <view wx:else class="outsideHigherBox"> + <view class="higherBox" wx:for="{{higherList}}" wx:key="index" wx:for-item="item" wx:for-index="index"> <view class="outsideHigherImageBox"> <view class="higherImageBox"> @@ -51,6 +55,10 @@ <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> </view> + + + + </t-tab-panel> <t-tab-panel label="鑱屼笟鏁欒偛({{vocationalTotal}})" value="1"> <view wx:if="{{vocationalList.length <= 0}}" class="noDataBox"> @@ -60,7 +68,7 @@ <view wx:else class="outsideHigherBox"> - <view class="higherBox" wx:for="{{vocationalList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="downloadData" data-item="{{item}}"> + <view class="higherBox" wx:for="{{vocationalList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}"> <view class="outsideHigherImageBox"> <view class="higherImageBox"> <image wx:if="{{item.icon}}" data-item="{{item}}" bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> @@ -87,7 +95,7 @@ <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> </view> <view wx:else class="outsideHigherBox"> - <view class="higherBox" wx:for="{{teacherList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="downloadData"> + <view class="higherBox" wx:for="{{teacherList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}"> <view class="outsideHigherImageBox"> <view class="higherImageBox"> <image wx:if="{{item.icon}}" data-item="{{item}}" bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> diff --git a/pages/bibliographyList/index.wxss b/pages/bibliographyList/index.wxss index 2c5794b..4a44bad 100644 --- a/pages/bibliographyList/index.wxss +++ b/pages/bibliographyList/index.wxss @@ -30,8 +30,8 @@ /* box-shadow: 10rpx 10rpx 10rpx 10rpx rgba(0, 0, 0, 0.08); */ box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(0, 0, 0, 0.08); margin: 30rpx 15rpx; - background-color: #fff; - margin-bottom: 0rpx ; + /* background-color: #fff; */ + margin-bottom: 0rpx; } .outsideHigherBox { @@ -135,7 +135,8 @@ color: #999; height: 80rpx; font-size: 28rpx; - --td-loading-color: #ff6c00 + --td-loading-color: #ff6c00; + margin-top: 80rpx; } .loadinBox { @@ -236,7 +237,7 @@ background-position: 100% 100%; */ background-image: url(https://jsek.bnuic.com/home/image/click-icon.png); background-position: 85% center; - background-size: 30% 50%; + background-size: 20% 50%; /* 灏嗚儗鏅浘鐗囦綅缃缃负闈犲彸 */ } @@ -245,5 +246,10 @@ } page { - background: #F2F3F8; + background: #F2F3F8 !important; +} + +.scrollViewBox { + height: calc(100vh - 326rpx); + /* width: calc(100vw - 60rpx); */ } \ No newline at end of file diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js index cdbed47..1b4cf32 100644 --- a/pages/bookExhibitionList/index.js +++ b/pages/bookExhibitionList/index.js @@ -52,7 +52,7 @@ ], }, multipleSelect: { - // value: [], + value: [], options: [], }, navBarHeight: '', @@ -105,7 +105,7 @@ // setTimeout(function () { // that.data.name = "娴嬭瘯watch鍙樺寲浜�" // }, 500) - // console.log(11111); + console.log(11111); }, watch: { name: function (newVal, oldVal) { @@ -444,7 +444,11 @@ value } = event.detail; // 纭鎿嶄綔鐨勫鐞嗛�昏緫 - this.data.keynoteValue = value + // this.data.keynoteValue = value + this.setData({ + keynoteValue: value, + + }) this.bookExhibitionGet() }, diff --git a/pages/bookExhibitionList/index.wxml b/pages/bookExhibitionList/index.wxml index 2d93faa..901dcaa 100644 --- a/pages/bookExhibitionList/index.wxml +++ b/pages/bookExhibitionList/index.wxml @@ -37,7 +37,7 @@ <!-- disabled="{{keynoteDisabled}}" --> - <t-dropdown-item label=" 閲嶇偣椤圭洰" options="{{multipleSelect.options}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset"> + <t-dropdown-item label=" 閲嶇偣椤圭洰" options="{{multipleSelect.options}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" value="{{multipleSelect.value}}"> </t-dropdown-item> <t-dropdown-item options="{{sorter.options}}" default-value="{{sorter.value}}" bindchange="onSort" /> </t-dropdown-menu> -- Gitblit v1.9.1