packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -422,6 +422,8 @@ }); if (shoppingCartGetId.includes(saleMethodId)) { console.log(111); // this.data.updateShoppingCartHidden(); // this.data.updateCloudLearning(); wx.showToast({ icon: "error", @@ -448,7 +450,19 @@ }); } }, sadd() { this.triggerEvent('updateShoppingCartHidden'); this.triggerEvent('updateCloudLearning'); console.log(789); }, }, <<<<<<< Updated upstream catchtap() {}, }); ======= catchtap() {} }) >>>>>>> Stashed changes packageBookService/pages/bookServices/detail/components/tree/index.wxml
@@ -1,66 +1,27 @@ <view class="tree"> <t-collapse default-value="{{openIds}}" catchchange="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" catchtap="catchTap"> <t-checkbox icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" catchchange="checkResourceTitle" wx:if="{{isShowCheck}}" /> <t-checkbox icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" catchchange="checkResourceTitle" wx:if="{{isShowCheck}}" /> <!-- 章节名 --> <view style="width: 100%"> <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> <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.sysType == 'CmsItem'}}" > <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.sysType == 'CmsItem'}}"> <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="checkBox" wx:if="{{isShowCheck}}" catchtap="catchTap" > <view class="box-image" style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}"> <view class="checkBox" wx:if="{{isShowCheck}}" catchtap="catchTap"> <!-- 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}}" /> --> <<<<<<< Updated upstream <t-checkbox disabled="{{!citem.saleMethod[0].Id}}" icon="rectangle" @@ -68,115 +29,55 @@ data-item="{{citem}}" catch:change="checkResource" /> ======= <t-checkbox icon="rectangle" checked="{{citem.checked}}" data-item="{{citem}}" catch:change="checkResource" /> >>>>>>> Stashed changes </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'}}"> <!-- 下载按钮 --> <<<<<<< Updated upstream <!-- <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> >>>>>>> Stashed changes </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@2x.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:if="{{citem.childrenCount > 0 && citem.sysType == 'CmsFolder' }}" isShowCheck="{{isShowCheck}}" bookInfo="{{bookInfo}}" treeList="{{[citem]}}" itemId="{{itemId}}" tab="{{tab}}" buyIds="{{buyIds}}" openTeachids="{{openTeachids}}" openLearnids="{{openLearnids}}" ></tree> <tree wx:if="{{citem.childrenCount > 0 && citem.sysType == 'CmsFolder' }}" 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"> @@ -190,6 +91,8 @@ </view> </t-collapse-panel> </t-collapse> </view> <web-view wx:if="{{webpageSrc}}" src="{{webpageSrc}}"></web-view> <!-- <button bind:tap="sadd"> 65498</button> --> packageBookService/pages/bookServices/detail/index.js
@@ -611,6 +611,7 @@ onTabsChange(e) { this.setData({ tabValue: e.detail.value, <<<<<<< Updated upstream noResources: false, }); if ( @@ -621,6 +622,14 @@ const checkData = this.data.cmsDatas.find( (item) => item.refCode == e.detail.value ); ======= noResources: false }) if (e.detail.label == '教学资源' || e.detail.label == '云学习' || e.detail.label == '云测试') { const checkData = this.data.cmsDatas.find(item => item.refCode == e.detail.value) >>>>>>> Stashed changes if (checkData) { if (e.detail.value == "jsek_cloudLearning") { this.setData({ @@ -1310,6 +1319,19 @@ return false; } }, updateShoppingCartHidden() { const isSHow = this.data.shoppingCartGetId.some((item) => item == data.saleMethod[0].Id) console.log(isSHow); return !isSHow }, updateCloudLearning() { const checkData = this.data.cmsDatas.find(item => item.refCode == 'jsek_cloudLearning') this.getResourceData(checkData) debugger console.log(55555); }, // 遍历树结构转换为数组方法 handleTreeData(array) { const flattenedArray = []; packageBookService/pages/bookServices/detail/index.wxml
@@ -236,6 +236,7 @@ style="{{tabPanelstyle}}" > <view wx:if="{{!loading && learn.length}}"> <<<<<<< Updated upstream <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" @@ -253,6 +254,13 @@ buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}" ></tree> ======= <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}"></learn-resource> <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}" bind:updateShoppingCartHidden="updateShoppingCartHidden" bind:updateCloudLearning="updateCloudLearning"></tree> >>>>>>> Stashed changes </view> <view wx:if="{{noResources}}" class="noData"> <t-empty icon="folder-open" description="暂无数据" /> packageDomain/pages/resourceDetails/myAudio/index.js
@@ -331,7 +331,6 @@ appRefCode: app.config.appRefCode }).then((res) => { // console.log(res); this.setData({ topicId: res.id }) @@ -370,7 +369,7 @@ }, confirmSuggest() { if (!this.data.textvalue) { if (!this.data.textvalue.trim()) { return wx.showToast({ icon: 'error', title: '请填写笔记内容', pages/bibliographyList/index.wxml
@@ -41,14 +41,13 @@ <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" bind:tap="downloadData" data-item="{{item}}"> <image src="{{item.icon}}" mode="aspectFill" /> <view class="higherImageBox"> <image data-item="{{item}}" bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> </view> </view> </view> <view class="higherTextBox">{{item.name}}</view> </view> pages/bibliographyList/index.wxss
@@ -57,16 +57,14 @@ .outsideHigherImageBox {} .downloadIcon { width: 30rpx; height: 24rpx; width: 34rpx; height: 34rpx; border-radius: 5rpx 5rpx 5rpx 5rpx; background: rgba(0, 0, 0, 0.3); position: absolute; top: 0rpx; right: 0rpx; padding: 10rpx; display: flex; align-items: center; } .downloadIcon image { pages/bookExhibitionList/index.wxml
@@ -64,7 +64,7 @@ <view class="textBox" title="{{item.subtitleName}}"> <text>{{item.subtitleName}}</text></view> </view> </view> <view class="bottom-box"> <view class="bottom-box" wx:if="{{bookExhibitionList.length }}"> <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> <text wx:if="{{isMore == false}}">没有更多了</text> </view> pages/cart/index.js
@@ -11,6 +11,7 @@ Page({ data: { swipeOpened: false, onDisabled: false, imgUrl: [], shoppingCartData: [], @@ -22,18 +23,24 @@ start: 1, totalSize: '', isMore: null, bookId: '', bookName: '' }, onLoad(options) { wx.setNavigationBarTitle({ title: '购物车' }); this.shoppingCartGet(); console.log(this.data.shoppingCartData.length, 'this.data.shoppingCartData.length'); this.setData({ swipeOpened: true }) }, onShow() { this.setData({ swipeOpened: false }) if (typeof this.getTabBar === 'function' && this.getTabBar()) { this.getTabBar().setData({ active: 3 @@ -46,6 +53,8 @@ checkAll: false, }) }, onDelete(e) { const item = e.currentTarget.dataset.item; app.MG.store.delShoppingCart({ @@ -76,8 +85,13 @@ this.setData({ totalSize: res.totalSize }) res.datas.forEach(item => { console.log(res); this.setData({ bookId: res.id, bookName: res.name }) item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160'); // this.setData({ // type: item.saleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product' @@ -92,7 +106,6 @@ shoppingCartData: res.datas }); console.log(this.data.shoppingCartData, 'shoppingCartData'); if (this.data.shoppingCartData.length === 0) { this.setData({ onDisabled: true @@ -265,5 +278,12 @@ console.log(978); this.shoppingCartGet() }, onBook(e) { // console.log(e); const item = e.currentTarget.dataset.item console.log(item); // wx.navigateTo({ // url: '/packageBookService/pages/bookServices/detail/index?id=' + item.id + '&name=' + item.name // }) } }); pages/cart/index.wxml
@@ -7,34 +7,21 @@ <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> --> <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index" opened="{{swipeOpened}}"> <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 wx:if="{{item.type == 'product'}}" style="width: 386rpx;"> <!-- <view> <text class="eBook">电子书</text> <text class="boosName">{{item.name}}</text> </view> --> <view class="boosName"> <text class="eBook">云学习</text> <text class="eBook">电子书</text> <text> {{item.name}}</text> </view> </view> <view wx:if="{{item.type == 'item'}}" style="width: 386rpx;"> <!-- <view> <text class="cloudLearning">云学习</text> <text class="boosName"> {{item.name}}</text> </view> --> <view class="boosName"> <text class="cloudLearning">云学习</text> <text> {{item.name}}</text> @@ -55,7 +42,7 @@ <view class="contentCheckbox"> <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" /> </view> <view class="left-image"> <view class="left-image" data-item="{{item}}" bind:tap="onBook"> <image wx:if="{{item.imgUrl}}" src="{{item.imgUrl}}" class="imageStyle" mode="aspectFit" /> <image wx:else src="/static/images/default-book-img.png" class="imageStyle" mode="aspectFit" /> </view> pages/cart/index.wxss
@@ -29,28 +29,22 @@ background: #F2F3F8; border-radius: 18rpx 18rpx 18rpx 18rpx; padding-bottom: 325rpx; height: calc(100vh - 300rpx); height: calc(100vh - 250rpx); /* width: calc(100vw - 60rpx); */ } .bottomBox { /* position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 88rpx); */ height: 120rpx; /* height: 135rpx; */ height: 100rpx; background: #FFFFFF; box-shadow: 0rpx -2rpx 0rpx 2rpx rgba(0, 0, 0, 0.08); display: flex; align-items: center; position: fixed; bottom: calc(env(safe-area-inset-bottom) + 100rpx); left: 0; right: 0; /* height: 44px; */ /* padding-bottom: 90px; */ /* padding-top: 10rpx; */ } .checkGroupBox { @@ -230,6 +224,8 @@ color: #fff; padding: 5rpx; font-size: 22rpx; font-weight: 400; } @@ -243,7 +239,7 @@ color: #fff; padding: 5rpx; font-size: 22rpx; font-weight: 400; } .boosName { pages/cart/paymentPage/index.wxss
@@ -203,7 +203,7 @@ color: #fff; padding: 5rpx; font-size: 22rpx; font-weight: 400; } .cloudLearning { @@ -216,6 +216,7 @@ color: #fff; padding: 5rpx; font-size: 22rpx; font-weight: 400; } .labelBox { pages/retrievalPage/index.wxml
@@ -158,21 +158,16 @@ <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> <view class="outsideHigherBox"> <view class="higherBox" wx:for="{{bookFairData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> <view class="outsideHigherImageBox"> <view bind:tap="downloadData" data-item="{{item}}"> <image class="higherImageBox" src="{{item.icon}}" mode="" /> </view> <view class="higherImageBox" data-item="{{item}}"> <image bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="" /> <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="" /> <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> </view> </view> </view> <view class="higherTextBox">{{item.name}}</view> </view> </view> pages/retrievalPage/index.wxss
@@ -175,13 +175,19 @@ } .outsideHigherImageBox { position: relative; /* position: relative; */ } .higherImageBox { width: 190rpx; height: 255rpx; margin: 15rpx; position: relative; } .higherImageBox image { width: 100%; height: 100%; } .downloadIcon { @@ -190,17 +196,12 @@ border-radius: 5rpx 5rpx 5rpx 5rpx; background: rgba(0, 0, 0, 0.3); position: absolute; top: 15rpx; right: 15rpx; top: 0rpx; right: 0rpx; padding: 10rpx; } .download { width: 100%; height: 100%; } .downloadshiftin { .downloadIcon image { width: 100%; height: 100%; } @@ -351,9 +352,9 @@ color: #ff6d00; } .dialogBox .t-input__control { /* .dialogBox .t-input__control { min-height: 100rpx; } } */ .t-button--text { color: #000 !important;