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: '添加成功', }) } }, 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> 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 = [] 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 @@ // 播放公共代码 pubulicPlayFun() { myAudio.src = this.data.showData console.log(myAudio.src); // console.log(myAudio.src); // 在onCanplay里获取并设置音频时长和播放进度 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 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" /> --> packageDomain/pages/resourceDetails/myVideo/index.js
@@ -539,5 +539,7 @@ submitType: "new" }) }, videoErrorCallback(e) { console.log(e); } }) 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> 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 { pages/bookExhibitionDetails/index.json
@@ -2,5 +2,6 @@ "usingComponents": { "t-icon": "tdesign-miniprogram/icon/icon" }, "navigationStyle": "custom" "navigationStyle": "custom", "disableScroll": true } 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> 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 { 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() } }) pages/bookExhibitionList/index.json
@@ -11,5 +11,6 @@ }, "onReachBottomDistance": 200, "navigationStyle": "custom", "enablePullDownRefresh": true "enablePullDownRefresh": true, "disableScroll": true } 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> 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; } 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({ pages/cart/index.json
@@ -12,5 +12,6 @@ }, "enablePullDownRefresh": true, "onReachBottomDistance": 100, "backgroundTextStyle": "dark" "backgroundTextStyle": "dark", "disableScroll": true } 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" /> <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> 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; 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; // 将type设置为item对象的属性,而不是使用setData item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon) console.log(item.type, 'item'); }) this.setData({ productList: res.saleMethodLinks, 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 } 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> 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 { 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 { static/images/bookService/detail/cart@2x.png