From 312fd09aaf90c0e52ab61bde22d0edbf105baa5e Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期二, 02 四月 2024 09:16:03 +0800 Subject: [PATCH] 书展的排序1 --- pages/bookExhibitionList/index.js | 58 ++++ packageDomain/pages/resourceDetails/myVideo/index.wxml | 9 packageBookService/pages/bookServices/detail/components/tree/index.js | 8 packageBookService/pages/bookServices/detail/index.js | 14 packageDomain/pages/resourceDetails/myVideo/index.wxss | 8 pages/bookExhibitionDetails/index.wxml | 4 pages/cart/index.wxss | 29 + pages/bookExhibitionDetails/index.wxss | 8 pages/cart/index.wxml | 141 +++++++---- pages/cart/paymentPage/index.wxml | 29 ++ pages/cart/paymentPage/index.wxss | 24 + pages/bookExhibitionList/index.wxss | 8 packageDomain/pages/resourceDetails/myVideo/index.js | 4 pages/bookExhibitionList/index.wxml | 15 packageDomain/pages/resourceDetails/myAudio/index.js | 55 ++-- static/images/bookService/detail/cart@2x.png | 0 pages/retrievalPage/index.wxss | 4 pages/bookExhibitionList/index.json | 3 pages/cart/index.json | 3 packageBookService/pages/bookServices/detail/components/tree/index.wxml | 166 ++------------ pages/cart/index.js | 2 pages/cart/paymentPage/index.json | 3 pages/cart/paymentPage/index.js | 7 pages/bookExhibitionDetails/index.json | 3 packageDomain/pages/resourceDetails/myAudio/index.wxml | 5 25 files changed, 331 insertions(+), 279 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index 29c18a5..e2395d2 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -50,7 +50,8 @@ activeValues: [1, 2], webpageSrc: '', cloudShoppingCart: [], - selectAll: [] + selectAll: [], + shoppingCart: true }, ready() { this.setData({ @@ -406,7 +407,9 @@ icon: 'error', title: '宸叉坊鍔�', }) - + this.setData({ + shoppingCart: false + }) } else { let query = { requests: [{ @@ -421,7 +424,6 @@ icon: 'success', title: '娣诲姞鎴愬姛', }) - } }, diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.wxml b/packageBookService/pages/bookServices/detail/components/tree/index.wxml index 5c40ca7..5155766 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.wxml +++ b/packageBookService/pages/bookServices/detail/components/tree/index.wxml @@ -1,175 +1,61 @@ <view class="tree"> <t-collapse default-value="{{openIds}}" bind:change="handleChange"> - <t-collapse-panel - wx:for="{{treeList}}" - wx:for-item="item" - wx:for-index="index" - wx:key="id" - value="{{item.id}}" - > + <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" value="{{item.id}}"> <view slot="header" class="header-title"> <view class="title-checkBox"> - <t-checkbox - icon="rectangle" - checked="{{item.checked}}" - data-item="{{item}}" - catch:change="checkResourceTitle" - wx:if="{{isShowCheck}}" - /> + <t-checkbox icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" catch:change="checkResourceTitle" wx:if="{{isShowCheck}}" /> <!-- <t-checkbox icon="rectangle" checked="{{true}}" data-item="{{item}}" bind:change="checkResourceTitle" /> --> - <text>{{item.name}} </text - ><text wx:if="{{item.sysType =='CmsFolder'}}" - >锛坽{item.children ? item.children.length : 0}}锛�</text - > + <text>{{item.name}} </text><text wx:if="{{item.sysType =='CmsFolder'}}">锛坽{item.children ? item.children.length : 0}}锛�</text> </view> </view> - <view - class="list" - wx:for="{{item.children}}" - wx:for-item="citem" - wx:for-index="cindex" - wx:key="cindex" - > + <view class="list" wx:for="{{item.children}}" wx:for-item="citem" wx:for-index="cindex" wx:key="cindex"> <!-- // 鍒ゆ柇 鏃犲瓙椤� 涓斾负鍟嗗搧item 鐩存帴鏄剧ず --> - <view - class="listItems" - wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}" - > - <view - class="itemsInfo" - wx:if="{{citem.name}}" - data-item="{{citem}}" - data-index="{{cindex}}" - > - <view - class="contentBox" - bind:tap="goPlayer" - data-item="{{citem}}" - data-parent="{{item}}" - > + <view class="listItems" wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}"> + <view class="itemsInfo" wx:if="{{citem.name}}" data-item="{{citem}}" data-index="{{cindex}}"> + <view class="contentBox" bind:tap="goPlayer" data-item="{{citem}}" data-parent="{{item}}"> <!-- 鏁欏璧勬簮 浜戝涔� 鍥炬爣 --> - <view - class="box-image" - style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}" - > + <view class="box-image" style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}"> <view class="checkBox" wx:if="{{isShowCheck}}"> <!-- checked="{{citem.checked}}" --> <!-- <t-checkbox icon="rectangle" checked="{{citem.checked}}" disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}" catch:change="checkResource" data-item="{{citem}}" /> --> - <t-checkbox - icon="rectangle" - checked="{{citem.checked}}" - data-item="{{citem}}" - catch:change="checkResource" - /> + <t-checkbox icon="rectangle" checked="{{citem.checked}}" data-item="{{citem}}" catch:change="checkResource" /> </view> <!-- 鏁欏璧勬簮鍥炬爣 --> <view class="teach-icon"> - <image - wx:if="{{citem.selectType == 'audio' || citem.learnSelectType == 'audio'}}" - src="/static/images/bookService/detail/audioIcon.png" - mode="aspectFill" - /> - <image - wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}" - src="/static/images/bookService/detail/video.png" - mode="aspectFill" - /> - <image - wx:elif="{{citem.selectType == 'pdf'}}" - src="/static/images/bookService/detail/pdf.png" - mode="aspectFill" - /> - <image - wx:elif="{{citem.selectType == 'webpage'}}" - src="/static/images/bookService/detail/net.png" - mode="aspectFill" - /> - <image - wx:elif="{{citem.selectType == 'picture'}}" - src="/static/images/bookService/detail/picture.png" - mode="aspectFill" - /> - <image - wx:elif="{{citem.selectType == 'zip'}}" - src="/static/images/bookService/detail/zip.png" - mode="aspectFill" - /> - <image - wx:elif="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" - src="/static/images/bookService/detail/word.png" - mode="aspectFill" - /> - <image - wx:elif="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" - src="/static/images/bookService/detail/excel.png" - mode="aspectFill" - /> - <image - wx:elif="{{ citem.fileMap[citem.file].extension == 'ppt' || citem.fileMap[citem.file].extension == 'pptx'}}" - src="/static/images/bookService/detail/PPT.png" - mode="aspectFill" - /> + <image wx:if="{{citem.selectType == 'audio' || citem.learnSelectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" /> + <image wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" /> + <image wx:elif="{{citem.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" /> + <image wx:elif="{{citem.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" /> + <image wx:elif="{{citem.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" /> + <image wx:elif="{{citem.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" /> + <image wx:elif="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" /> + <image wx:elif="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" /> + <image wx:elif="{{ citem.fileMap[citem.file].extension == 'ppt' || citem.fileMap[citem.file].extension == 'pptx'}}" src="/static/images/bookService/detail/PPT.png" mode="aspectFill" /> </view> <!-- 浜戝涔犲浘鏍� --> <view> </view> <!-- 鍚嶇О --> - <text - class="name" - style="{{ tab == 'jsek_teachingResources' ? 'width: 300rpx;' : 'width: 400rpx;'}}" - >{{citem.name}}</text - > + <text class="name" style="{{ tab == 'jsek_teachingResources' ? 'width: 300rpx;' : 'width: 400rpx;'}}">{{citem.name}}</text> </view> <!-- 鏁欏璧勬簮绫诲瀷 --> <view class="teachClass"> {{citem.resourceClass}} </view> - <view - class="teach-btn" - wx:if="{{tab == 'jsek_teachingResources'}}" - > + <view class="teach-btn" wx:if="{{tab == 'jsek_teachingResources'}}"> <!-- 涓嬭浇鎸夐挳 --> - <image - src="/static/images/bookService/detail/download-icon.png" - class="download-image" - data-value="{{citem}}" - catchtap="downloadTeach" - ></image> + <image src="/static/images/bookService/detail/download-icon.png" class="download-image" data-value="{{citem}}" catchtap="downloadTeach"></image> </view> <view wx:if="{{tab == 'jsek_cloudLearning'}}"> <!-- 浜戝涔犺瘯鐪嬪浘鏍� --> - <image - src="/static/images/bookService/detail/shikan.png" - class="testSee" - wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}" - ></image> + <image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"></image> <!-- 浜戝涔犲姞鍏ヨ喘鐗╄溅鍥炬爣 --> - <image - src="/static/images/bookService/detail/cart.png" - wx:if="{{citem.isShopCar}}" - class="shopCar" - data-item="{{citem}}" - catch:tap="onCloudShoppingCart" - ></image> + <image src="/static/images/bookService/detail/cart@2x.png" wx:if="{{citem.isShopCar}}" class="shopCar" data-item="{{citem}}" catch:tap="onCloudShoppingCart"></image> <!-- 浜戝涔犺喘涔板浘鏍� --> - <image - src="/static/images/bookService/detail/need-buy.png" - class="need-buy" - wx:if="{{citem.isbuy }}" - ></image> + <image src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{citem.isbuy }}"></image> </view> </view> </view> </view> <!-- // 鍒ゆ柇 涓嶆槸鍟嗗搧 鏈夊瓙椤� 閫掑綊缁勪欢 --> - <tree - wx:else - isShowCheck="{{isShowCheck}}" - bookInfo="{{bookInfo}}" - treeList="{{[citem]}}" - itemId="{{itemId}}" - tab="{{tab}}" - buyIds="{{buyIds}}" - openTeachids="{{openTeachids}}" - openLearnids="{{openLearnids}}" - ></tree> + <tree wx:else isShowCheck="{{isShowCheck}}" bookInfo="{{bookInfo}}" treeList="{{[citem]}}" itemId="{{itemId}}" tab="{{tab}}" buyIds="{{buyIds}}" openTeachids="{{openTeachids}}" openLearnids="{{openLearnids}}"></tree> </view> <!-- 鏆傛棤鏁版嵁 --> <view wx:if="{{!item.children || !item.children.length}}" class="noData"> @@ -185,4 +71,4 @@ </t-collapse> </view> -<web-view wx:if="{{webpageSrc}}" src="{{webpageSrc}}"></web-view> +<web-view wx:if="{{webpageSrc}}" src="{{webpageSrc}}"></web-view> \ No newline at end of file diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js index 831de07..07ab18a 100644 --- a/packageBookService/pages/bookServices/detail/index.js +++ b/packageBookService/pages/bookServices/detail/index.js @@ -418,9 +418,13 @@ selectedIds: res.datas[0].defaultSaleMethod.id, bookBuy: res.datas[0].purchasedSaleMethodIdList.indexOf(res.datas[0].defaultSaleMethodId) > -1 }); + console.log(res); + console.log(res.datas[0].defaultSaleMethod.endDate, 'res.datas[0].defaultSaleMethod.endDate'); + console.log(res.datas[0].defaultSaleMethod.beginDate, 'res.datas[0].defaultSaleMethod.beginDate'); console.log(this.data.bookItemDetail, 'bookItemData.value'); let times = new Date(res.datas[0].defaultSaleMethod.endDate).getTime() let startTime = new Date(res.datas[0].defaultSaleMethod.beginDate).getTime() + if (times < new Date().getTime() || new Date().getTime() < startTime) { this.setData({ expire: true @@ -821,15 +825,7 @@ // 鍥句功娣诲姞璐墿杞� async addBookShopcCar() { if (!this.data.expire) { - const token = wx.getStorageSync('jsek-token') - if (!token) { - return wx.getUserProfile({ - desc: '鐢ㄦ埛鐧诲綍', - success: (res) => { - console.log(res); - } - }) - } + const shoppingCartGetId = [] diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js index fa54b36..59806f9 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.js +++ b/packageDomain/pages/resourceDetails/myAudio/index.js @@ -83,10 +83,13 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { + + + const systInfo = wx.getSystemInfoSync(); const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� - // console.log(options, 'options'); + this.setData({ navBarHeight: navBarHeight, barHeight: systInfo.statusBarHeight, @@ -103,18 +106,21 @@ this.getNoteList() + + + }, + onUnload() { + myAudio.src = '' + myAudio.destroy() + this.setData({ myAudioPos: '', isplay: false, //鏄惁榛樿鎾斁, myAudioCurrent: '00:00', // 褰撳墠鎾斁杩涘害 showData: '', }); - myAudio.src = '' - - - console.log(this.data.myAudioPos, this.data.isplay, this.data.myAudioCurrent, this.data.showData, myAudio.src); + // console.log(myAudio.src); }, - /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 * @@ -218,13 +224,10 @@ submitTitle: this.data.bookName, dialogKey: true, textvalue: '' - - }); }, closeDialog() { - this.setData({ dialogKey: false }); @@ -274,7 +277,7 @@ titleName: items.name }) this.pubulicPlayFun() - console.log(index, 'index'); + let selectedIndex = index; // 瀛樺偍閫変腑椤圭殑绱㈠紩 this.setData({ selectedId: selectedIndex // 璁剧疆閫変腑椤圭殑绱㈠紩 @@ -302,7 +305,7 @@ }) const item = e.currentTarget.dataset.item - console.log(item, 'item0980'); + if (this.data.showData != '') { @@ -312,7 +315,7 @@ selectedId: e.currentTarget.dataset.index, showData: '' }) - console.log(e.currentTarget.dataset.index, 'e.currentTarget.dataset.index'); + if (item.selectType == "audio") { this.setData({ showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file @@ -438,7 +441,7 @@ res.datas.forEach((item) => { item.createDate = this.convertTimestamp(item.createDate) - console.log(item, 'item789'); + }) this.setData({ "pageCount.total": res.totalSize, @@ -493,15 +496,15 @@ }, // 鏂板缓绗旇鎺ュ彛 async makeNote() { - const token = wx.getStorageSync('jsek-token') - if (!token) { - return wx.getUserProfile({ - desc: '鐢ㄦ埛鐧诲綍', - success: (res) => { - // console.log(res); - } - }) - } + // const token = wx.getStorageSync('jsek-token') + // if (!token) { + // return wx.getUserProfile({ + // desc: '鐢ㄦ埛鐧诲綍', + // success: (res) => { + // // console.log(res); + // } + // }) + // } let topicId await app.MG.ugc .getProductUserSubmitTopic({ @@ -580,12 +583,11 @@ // 鎾斁鍏叡浠g爜 pubulicPlayFun() { myAudio.src = this.data.showData - console.log(myAudio.src); + // console.log(myAudio.src); // 鍦╫nCanplay閲岃幏鍙栧苟璁剧疆闊抽鏃堕暱鍜屾挱鏀捐繘搴� myAudio.onCanplay(() => { myAudio.duration; //蹇呴』鍐欙紝涓嶇劧鑾峰彇涓嶅埌銆傘�傘�� setTimeout(() => { - console.log(myAudio.duration, 'myAudio.duration'); this.setData({ myAudioDuration: this.format(myAudio.duration), myAudioCurrent: this.format(myAudio.currentTime) @@ -614,25 +616,20 @@ myAudioCurrent: this.format(myAudio.currentTime) }); }) - }, //鎾斁 play() { - console.log(22222); myAudio.startTime = this.data.myAudioCurrent; //鑰冭檻鍒拌繘搴︽潯琚嫋鍔紝涓嶄竴瀹氫粠00:00:00寮�濮� myAudio.play(); this.setData({ isplay: true }); - - }, // 鍋滄 stop() { - myAudio.pause(); this.setData({ isplay: false diff --git a/packageDomain/pages/resourceDetails/myAudio/index.wxml b/packageDomain/pages/resourceDetails/myAudio/index.wxml index bd50100..e910350 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.wxml +++ b/packageDomain/pages/resourceDetails/myAudio/index.wxml @@ -20,8 +20,9 @@ <!-- 鏆傚仠鎾斁 --> <view class="audioIconBox color" style="margin-left: 30rpx; margin-right: 10rpx"> - <view wx:if="{{!isplay}}" bind:tap="play"> - <t-icon name="play-circle-stroke" size="24" /> + <view wx:if="{{!isplay}}" bind:tap="play" class="pauseCircleBox"> + <!-- <t-icon name="play-circle-stroke" size="24" /> --> + <image src="/static/images/resourceDetailsMyAudio/play@2x.png" mode="" /> </view> <view wx:else bind:tap="stop" class="pauseCircleBox"> <!-- <t-icon name="pause-circle-stroke" size="24" /> --> diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js index 421bf0d..1b03a19 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.js +++ b/packageDomain/pages/resourceDetails/myVideo/index.js @@ -539,5 +539,7 @@ submitType: "new" }) }, - + videoErrorCallback(e) { + console.log(e); + } }) \ No newline at end of file diff --git a/packageDomain/pages/resourceDetails/myVideo/index.wxml b/packageDomain/pages/resourceDetails/myVideo/index.wxml index 466e96e..619fc9d 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.wxml +++ b/packageDomain/pages/resourceDetails/myVideo/index.wxml @@ -8,10 +8,15 @@ <!-- 瑙嗛 --> <view class="videoBox" wx:if="{{videoChange}}"> <!-- autoplay='false' 鏄惁鑷姩鎾斁 --> - <video 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> + </view> -<view wx:if="{{!videoChange}}" class="videoSubsidiaryBox"></view> +<view wx:if="{{!videoChange}}" class="videoSubsidiaryBox"> + + <view class="videoNoData">鏆傛棤鏁版嵁</view> + +</view> <!-- 鏍囬 --> <view class="titleBox">{{titleName}}</view> diff --git a/packageDomain/pages/resourceDetails/myVideo/index.wxss b/packageDomain/pages/resourceDetails/myVideo/index.wxss index f3edb2f..36c044e 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.wxss +++ b/packageDomain/pages/resourceDetails/myVideo/index.wxss @@ -29,6 +29,14 @@ height: 450rpx; background-color: #000; /* 1.6 1 */ + +} + +.videoNoData { + color: #fff; + display: flex; + justify-content: center; + padding-top: 220rpx; } .titleBox { diff --git a/pages/bookExhibitionDetails/index.json b/pages/bookExhibitionDetails/index.json index 02871f3..a17565a 100644 --- a/pages/bookExhibitionDetails/index.json +++ b/pages/bookExhibitionDetails/index.json @@ -2,5 +2,6 @@ "usingComponents": { "t-icon": "tdesign-miniprogram/icon/icon" }, - "navigationStyle": "custom" + "navigationStyle": "custom", + "disableScroll": true } \ No newline at end of file diff --git a/pages/bookExhibitionDetails/index.wxml b/pages/bookExhibitionDetails/index.wxml index 41204f8..f89c21d 100644 --- a/pages/bookExhibitionDetails/index.wxml +++ b/pages/bookExhibitionDetails/index.wxml @@ -19,8 +19,10 @@ <image class="partingBox" src="/static/images/bookExhibitionDetails/Parting.png" mode="aspectFill" /> +<view class="bannerBox"> + <image src="{{bookImage}}" mode="aspectFit" /> +</view> -<image class="bannerBox" src="{{bookImage}}" mode="" /> <view class="textContent"> <rich-text nodes="{{bookContent}}"></rich-text> diff --git a/pages/bookExhibitionDetails/index.wxss b/pages/bookExhibitionDetails/index.wxss index 6018634..b5321c2 100644 --- a/pages/bookExhibitionDetails/index.wxss +++ b/pages/bookExhibitionDetails/index.wxss @@ -54,9 +54,15 @@ } .bannerBox { - width: 690rpx; + min-width: 690rpx; height: 270rpx; margin: 0 30rpx; + +} + +image { + width: 100%; + height: 100%; } .textContent { diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js index bd39345..a16ce9e 100644 --- a/pages/bookExhibitionList/index.js +++ b/pages/bookExhibitionList/index.js @@ -57,7 +57,26 @@ navBarHeight: '', barHeight: '', windowHeight: '', - + sorter: { + value: 'timeAsc', + options: [{ + value: 'nameAsc', + label: '鍚嶇О浠庨珮鍒颁綆', + }, + { + value: 'nameDesc', + label: '鍚嶇О浠庝綆鍒伴珮', + }, + { + value: 'timeAsc', + label: '鍒涘缓鏃堕棿浠庨珮鍒颁綆', + }, + { + value: 'timeDesc', + label: '鍒涘缓鏃堕棿浠庡簳鍒伴珮', + }, + ], + }, }, @@ -198,9 +217,30 @@ '||subtitle*': this.data.keyword } // console.log(this.data.keynoteValue); - let sort = { - Name: this.data.nameSort || 'Desc' - } + let sort = {}; + + const sortOptions = { + '*': { + CreateDate: 'Asc' + }, + 'nameAsc': { + Name: 'Asc' + }, + 'nameDesc': { + Name: 'Desc' + }, + 'timeAsc': { + CreateDate: 'Asc' + }, + 'timeDesc': { + CreateDate: 'Desc' + } + }; + + sort = sortOptions[this.data.product.value] || {}; + + console.log(sort); + app.MG.store.getProductList({ storeInfo: 'jsek_bookFair', path: newValue, @@ -218,6 +258,9 @@ // }, }).then(res => { res.datas.forEach((item) => { + if (item.subtitle == undefined) { + item.subtitle = '' + } item.subtitleName = item.subtitle + item.name }) console.log(res, 'item'); @@ -386,4 +429,11 @@ goBack() { wx.navigateBack(); }, + onSort(e) { + this.setData({ + 'product.value': e.detail.value, + }); + console.log(e.detail.value, 'e.detail.value'); + this.bookExhibitionGet() + } }) \ No newline at end of file diff --git a/pages/bookExhibitionList/index.json b/pages/bookExhibitionList/index.json index fbf7f99..484ed65 100644 --- a/pages/bookExhibitionList/index.json +++ b/pages/bookExhibitionList/index.json @@ -11,5 +11,6 @@ }, "onReachBottomDistance": 200, "navigationStyle": "custom", - "enablePullDownRefresh": true + "enablePullDownRefresh": true, + "disableScroll": true } \ No newline at end of file diff --git a/pages/bookExhibitionList/index.wxml b/pages/bookExhibitionList/index.wxml index b677700..f68126f 100644 --- a/pages/bookExhibitionList/index.wxml +++ b/pages/bookExhibitionList/index.wxml @@ -18,12 +18,15 @@ </view> <view class="outsideMenuBox"> <view class="menuBox"> - <t-dropdown-menu class="classification"> + <t-dropdown-menu> <t-dropdown-item options="{{product.options}}" value="{{product.value}}" bindchange="onChange" /> - <t-dropdown-item class="{{keynoteDisabled ? 'disableds' : ' '}}" disabled="{{keynoteDisabled}}" label=" 閲嶇偣椤圭洰" options="{{multipleSelect.options}}" value="{{multipleSelect.value}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" show-overlay="{{true}}"> + <t-dropdown-item multiple="{{false}}" class="{{keynoteDisabled ? 'disableds' : ' '}}" disabled="{{keynoteDisabled}}" label=" 閲嶇偣椤圭洰" options="{{multipleSelect.options}}" value="{{multipleSelect.value}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" show-overlay="{{true}}"> </t-dropdown-item> + + <t-dropdown-item options="{{sorter.options}}" default-value="{{sorter.value}}" bindchange="onSort" /> + </t-dropdown-menu> - <view class="outsideSortBox"> + <!-- <view class="outsideSortBox"> <view class="sortBox" bind:tap="onSwapRight"> <text>鎺掑簭</text> <view class="iconBox"> @@ -31,7 +34,7 @@ <t-icon class="swapLeft" name="swap-right" size="35rpx" color="{{nameSort == 'Desc' ? '#ff6c00' : ''}}" /> </view> </view> - </view> + </view> --> </view> </view> </view> @@ -51,8 +54,8 @@ </view> <view class="contentBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}"> <view class="imageBox"> - <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFill" /> - <image wx:else src="/static/images/bookExhibitionList/banner.png" mode="aspectFill" /> + <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFit" /> + <image wx:else src="/static/images/bookExhibitionList/banner.png" mode="aspectFit" /> </view> <view class="textBox" title="{{item.subtitleName}}"> <text>{{item.subtitleName}}</text></view> </view> diff --git a/pages/bookExhibitionList/index.wxss b/pages/bookExhibitionList/index.wxss index 6443624..bcc5026 100644 --- a/pages/bookExhibitionList/index.wxss +++ b/pages/bookExhibitionList/index.wxss @@ -127,10 +127,10 @@ image-rendering: -webkit-optimize-contrast; } -.classification { +/* .classification { width: 550rpx; margin: 0 30rpx; -} +} */ .menuBox { display: flex; @@ -176,6 +176,10 @@ color: #FF6C00 !important } +.t-dropdown-menu { + width: 750rpx; +} + .t-checkbox__icon--disabled { color: #c0c4cc !important; } diff --git a/pages/cart/index.js b/pages/cart/index.js index e0d50b3..672eecc 100644 --- a/pages/cart/index.js +++ b/pages/cart/index.js @@ -75,7 +75,7 @@ }) res.datas.forEach(item => { - // console.log(item, 'item456'); + console.log(item, 'item456'); item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160'); // this.setData({ diff --git a/pages/cart/index.json b/pages/cart/index.json index c01a13b..0f8166b 100644 --- a/pages/cart/index.json +++ b/pages/cart/index.json @@ -12,5 +12,6 @@ }, "enablePullDownRefresh": true, "onReachBottomDistance": 100, - "backgroundTextStyle": "dark" + "backgroundTextStyle": "dark", + "disableScroll": true } \ No newline at end of file diff --git a/pages/cart/index.wxml b/pages/cart/index.wxml index 9de96d1..0da4120 100644 --- a/pages/cart/index.wxml +++ b/pages/cart/index.wxml @@ -1,69 +1,102 @@ -<view class="outsideContentBox"> - <!-- <checkbox-group bindchange="HandelItemChange"> --> - <view wx:if="{{shoppingCartData.length <= 0}}" class="noDataBox"> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> - </view> - <!-- <button bind:tap="onLogin"> 鍘荤櫥褰�</button> --> - <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> +<scroll-view scroll-y="{{true}}" class="outsideContentBox"> - <!-- <view class="contentBox"> --> - <!-- <view class="contentCheckbox"> + + + + <view> + + <!-- <checkbox-group bindchange="HandelItemChange"> --> + <view wx:if="{{shoppingCartData.length <= 0}}" class="noDataBox"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> + </view> + <!-- <button bind:tap="onLogin"> 鍘荤櫥褰�</button> --> + <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> + + + + + <!-- <view class="contentBox"> --> + <!-- <view class="contentCheckbox"> <checkbox value="{{item.id}}" checked="{{item.checked}}"></checkbox> </view> --> - <view class="itemWarp"> - <t-cell bordered="{{false}}"> - <view slot="title" class="titleBox"> - <view class="labelBox"> + <view class="itemWarp"> + <t-cell bordered="{{false}}"> + <view slot="title" class="titleBox"> + <!-- <view class="labelBox"> <view class="eBook" wx:if="{{item.type == 'product'}}">鐢靛瓙涔�</view> <view wx:if="{{item.type == 'item'}}" class="cloudLearning">浜戝涔�</view> </view> <view class="boosName"> {{item.productMonWithLinkDto.product.name}} - </view> - </view> - <view slot="description" class="descriptionBox"> - <view> - <view class="textBox" wx:if="{{type == 'product'}}">鍥句功鏈嶅姟-鐢靛瓙涔�</view> - <view class="textBox" wx:if="{{type == 'item'}}">鍥句功鏈嶅姟-浜戝涔�</view> - </view> - <view wx:if="{{item.saleMethod.price != 0}}"> - 锟{item.saleMethod.price}} - </view> - <view wx:else class="descriptionBox"> 绔嬪嵆棰嗗彇</view> - </view> - <view slot="left-icon" class="left-icon"> - <view class="contentCheckbox"> - <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" /> - </view> - <view class="left-image"> - <image src="{{item.imgUrl}}" class="imageStyle" mode="aspectFit" /> - </view> - </view> - </t-cell> - </view> - <view slot="right" class="btn delete-btn" bind:tap="onDelete" data-item="{{item}}">鍒犻櫎</view> - </t-swipe-cell> - <view class="bottom-box"> - <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> - <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> - </view> -</view> + </view> --> -<view class="bottomBox"> - <view class="checkGroupBox"> - <checkbox-group bindchange="bottomChange"> - <checkbox disabled="{{onDisabled}}" value="鍏ㄩ��" checked="{{checkAll}}">鍏ㄩ��</checkbox> - </checkbox-group> - </view> - <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> + <view wx:if="{{item.type == 'product'}}" style="width: 386rpx;"> + + <view> + <text class="eBook">鐢靛瓙涔�</text> <text class="boosName">{{item.productMonWithLinkDto.product.name}}</text> + </view> + </view> + + + <view wx:if="{{item.type == 'item'}}" style="width: 386rpx;"> + + <view> + <text class="cloudLearning">浜戝涔�</text> <text class="boosName">{{item.productMonWithLinkDto.product.name}}</text> + </view> + </view> + + + + + + + + + </view> + <view slot="description" class="descriptionBox"> + <view> + <view class="textBox" wx:if="{{item.type == 'product'}}">鍥句功鏈嶅姟-鐢靛瓙涔�</view> + <view class="textBox" wx:if="{{item.type == 'item'}}">鍥句功鏈嶅姟-浜戝涔�</view> + </view> + <view wx:if="{{item.saleMethod.price != 0}}"> + 锟{item.saleMethod.price}} + </view> + <view wx:else class="descriptionBox"> 绔嬪嵆棰嗗彇</view> + </view> + <view slot="left-icon" class="left-icon"> + <view class="contentCheckbox"> + <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" /> + </view> + <view class="left-image"> + <image src="{{item.imgUrl}}" class="imageStyle" mode="aspectFit" /> + </view> + </view> + </t-cell> + </view> + <view slot="right" class="btn delete-btn" bind:tap="onDelete" data-item="{{item}}">鍒犻櫎</view> + </t-swipe-cell> + <view class="bottom-box"> + <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> + <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> </view> </view> -</view> -<t-toast id="t-toast" /> \ No newline at end of file + <view class="bottomBox"> + <view class="checkGroupBox"> + <checkbox-group bindchange="bottomChange"> + <checkbox disabled="{{onDisabled}}" value="鍏ㄩ��" checked="{{checkAll}}">鍏ㄩ��</checkbox> + </checkbox-group> + </view> + <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> + </view> + </view> + </view> + + <t-toast id="t-toast" /> +</scroll-view> \ No newline at end of file diff --git a/pages/cart/index.wxss b/pages/cart/index.wxss index 03f362b..fcd49f8 100644 --- a/pages/cart/index.wxss +++ b/pages/cart/index.wxss @@ -216,12 +216,16 @@ } .eBook { - width: 90%; - height: 100%; + width: 85rpx; + height: 38rpx; background: #FF6C00; text-align: center; line-height: 38rpx; border-radius: 9rpx; + color: #fff; + padding: 5rpx; + font-size: 22rpx; + } .cloudLearning { @@ -231,19 +235,27 @@ text-align: center; line-height: 38rpx; border-radius: 9rpx; + color: #fff; + padding: 5rpx; + font-size: 22rpx; + } .boosName { - width: 100%; + font-family: PingFang SC, PingFang SC; + font-weight: bold; + font-size: 29rpx; + margin: 0 10rpx; + /* overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - font-family: PingFang SC, PingFang SC; - font-weight: bold; - font-size: 29rpx; - color: #333333; + -webkit-line-clamp: 2; */ + + /* display: inline; */ + + } .textBox { @@ -255,6 +267,7 @@ margin-bottom: 20rpx; } + .bottom-box { display: flex; justify-content: center; diff --git a/pages/cart/paymentPage/index.js b/pages/cart/paymentPage/index.js index de51373..5ebd7ac 100644 --- a/pages/cart/paymentPage/index.js +++ b/pages/cart/paymentPage/index.js @@ -94,6 +94,7 @@ getOrderByOrderNumData() { + console.log(this.data.orderNumber, 'this.data.orderNumber'); let query = { orderNum: this.data.orderNumber, fields: { @@ -115,14 +116,12 @@ payPrice: res.payPrice.toFixed(2) }) res.saleMethodLinks.forEach(item => { + console.log(item.type, 'item.type'); - const type = item.type == 'createProductItemSaleMethod' ? 'item' : 'product'; + const type = item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'; item.type = type; // 灏唗ype璁剧疆涓篿tem瀵硅薄鐨勫睘鎬э紝鑰屼笉鏄娇鐢╯etData item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon) - console.log(item.type, 'item'); - - }) this.setData({ productList: res.saleMethodLinks, diff --git a/pages/cart/paymentPage/index.json b/pages/cart/paymentPage/index.json index 2a32d4b..f5655a6 100644 --- a/pages/cart/paymentPage/index.json +++ b/pages/cart/paymentPage/index.json @@ -6,5 +6,6 @@ "t-button": "tdesign-miniprogram/button/button", "t-dialog": "tdesign-miniprogram/dialog/dialog" }, - "navigationStyle": "custom" + "navigationStyle": "custom", + "disableScroll": true } \ No newline at end of file diff --git a/pages/cart/paymentPage/index.wxml b/pages/cart/paymentPage/index.wxml index 23ba00e..99f50af 100644 --- a/pages/cart/paymentPage/index.wxml +++ b/pages/cart/paymentPage/index.wxml @@ -19,13 +19,36 @@ </view> <view class="cartListContent"> <view class="cartListDetails"> - <view class="labelBox"> + <!-- <view class="labelBox"> <view class="eBook" wx:if="{{item.type == 'product'}}">鐢靛瓙涔�</view> <view wx:if="{{item.type == 'item'}}" class="cloudLearning">浜戝涔�</view> - </view> - <view class="boosName"> + </view> --> + + + <!-- <view class="boosName"> {{item.orderSaleMethod.product.name}} + </view> --> + + <view wx:if="{{item.type == 'product'}}" style="width: 386rpx;"> + + <view> + <text class="eBook">鐢靛瓙涔�</text> <text class="boosName">{{item.orderSaleMethod.product.name}}</text> + </view> </view> + + + <view wx:if="{{item.type == 'item'}}" style="width: 386rpx;"> + + <view> + <text class="cloudLearning">浜戝涔�</text> <text class="boosName">{{item.orderSaleMethod.product.name}}</text> + </view> + </view> + + + + + + </view> <view class="textBox" wx:if="{{item.type == 'product'}}">鍥句功鏈嶅姟-鐢靛瓙涔�</view> <view class="textBox" wx:if="{{item.type == 'item'}}">鍥句功鏈嶅姟-浜戝涔�</view> diff --git a/pages/cart/paymentPage/index.wxss b/pages/cart/paymentPage/index.wxss index 6009b23..a8b707a 100644 --- a/pages/cart/paymentPage/index.wxss +++ b/pages/cart/paymentPage/index.wxss @@ -83,6 +83,7 @@ font-size: 31rpx; color: #0F1214; font-family: DIN, DIN; + margin-bottom: 20rpx; } .priceBreakdown { @@ -193,12 +194,16 @@ } .eBook { - width: 90%; - height: 100%; + width: 85rpx; + height: 38rpx; background: #FF6C00; text-align: center; line-height: 38rpx; border-radius: 9rpx; + color: #fff; + padding: 5rpx; + font-size: 22rpx; + } .cloudLearning { @@ -208,6 +213,9 @@ text-align: center; line-height: 38rpx; border-radius: 9rpx; + color: #fff; + padding: 5rpx; + font-size: 22rpx; } .labelBox { @@ -223,12 +231,20 @@ } .boosName { - width: 300rpx; + font-family: PingFang SC, PingFang SC; + font-weight: bold; + font-size: 29rpx; + margin: 0 10rpx; + /* overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 2; + -webkit-line-clamp: 2; */ + + /* display: inline; */ + + } .commodityBox { diff --git a/pages/retrievalPage/index.wxss b/pages/retrievalPage/index.wxss index 9e89117..a491016 100644 --- a/pages/retrievalPage/index.wxss +++ b/pages/retrievalPage/index.wxss @@ -258,7 +258,7 @@ top: 0px; background-color: #fff; height: 120px; - z-index: 999; + /* z-index: 999; */ } .tabsBox { @@ -306,6 +306,8 @@ .body-info { padding: 16rpx; font-size: 28rpx; + width: 310rpx; + height: 218rpx; } .body-info .name { diff --git a/static/images/bookService/detail/cart@2x.png b/static/images/bookService/detail/cart@2x.png new file mode 100644 index 0000000..530e9d3 --- /dev/null +++ b/static/images/bookService/detail/cart@2x.png Binary files differ -- Gitblit v1.9.1