From 8f1835f66ef83bbd752e080178afb98632a6970d Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期四, 28 三月 2024 14:09:44 +0800 Subject: [PATCH] 云学习购买 --- packageBookService/pages/bookServices/detail/buyResource/index.js | 56 +++- packageBookService/pages/bookServices/detail/components/tree/index.js | 66 ++--- pages/retrievalPage/index.wxml | 333 +++++++++++++++--------------- pages/home/home.wxss | 2 pages/retrievalPage/index.wxss | 174 +++++++-------- 5 files changed, 328 insertions(+), 303 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/buyResource/index.js b/packageBookService/pages/bookServices/detail/buyResource/index.js index c0e5b0d..07134d2 100644 --- a/packageBookService/pages/bookServices/detail/buyResource/index.js +++ b/packageBookService/pages/bookServices/detail/buyResource/index.js @@ -34,7 +34,10 @@ }); this.getResourceClass() console.log(options); - this.getResourceData({ productLinkPath: options.productLinkPath, refCode: options.refCode }) + this.getResourceData({ + productLinkPath: options.productLinkPath, + refCode: options.refCode + }) this.getShoppingCartProductGet() this.getBookInfo(options.bookId) }, @@ -369,19 +372,52 @@ checkAll() { const child = this.selectComponent('#tree') child.checkAll() + }, //璐拱鎸夐挳 batchPurchase() { + + + let saleMethodIds = [] let requests = [] let item = [] + let selectAllId = [] const child = this.selectComponent('#tree') console.log(child.data.superiorPurchaseSaleMethodId, 'superiorPurchaseSaleMethodId'); console.log(child.data.sonPurchaseSaleMethodId, 'child.data'); + // console.log(child.data.selectAll, 'selectAll'); item = child.data.superiorPurchaseSaleMethodId const sonItem = child.data.sonPurchaseSaleMethodId + let selectAll = child.data.selectAll + if (selectAll) { + // console.log(selectAll); + selectAll.forEach(item => { + if (item.saleMethod != 0) { + // console.log(item, 'item'); + selectAllId.push(item.saleMethod[0].Id) + } + }) + console.log(selectAllId); + app.MG.store.initOrder({ + requests: selectAllId.map(id => ({ + saleMethodId: id, + count: 1, + })), + }).then(res => { + if (res) { + wx.navigateTo({ + url: '/pages/cart/paymentPage/index?orderNumber=' + res.orderNumber, + }) + selectAllId = [] + child.setData({ + selectAll: [] + }) + } + }) + } if (item) { console.log(item, 'sadsdasd'); // 鎷垮埌id @@ -402,22 +438,14 @@ wx.navigateTo({ url: '/pages/cart/paymentPage/index?orderNumber=' + res.orderNumber, }) - this.setData({ - superior: true - }) + child.setData({ + superiorPurchaseSaleMethodId: [] // 浣跨敤setData鏂规硶娓呯┖sonPurchaseSaleMethodId鏁版嵁 + }) } }) - - } - - - - if (item.length == 0 && sonItem) { - - app.MG.store.initOrder({ requests: sonItem.map(id => ({ saleMethodId: id, @@ -431,7 +459,9 @@ this.setData({ paymentPage: true }) - + child.setData({ + sonPurchaseSaleMethodId: [] // 浣跨敤setData鏂规硶娓呯┖sonPurchaseSaleMethodId鏁版嵁 + }) } }) } diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index 1486ac7..675c529 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -1,4 +1,3 @@ - import Message from 'tdesign-miniprogram/message/message'; const util = require('./components/util') // 寮曞叆灏佽杩囩殑鍔犺浇鎻愮ず const app = getApp() @@ -29,8 +28,7 @@ openIds: { type: Array, value: [], - } - , + }, isShowCheck: { type: Boolean, value: false, @@ -49,7 +47,8 @@ superiorPurchaseSaleMethodId: [], activeValues: [1, 2], webpageSrc: '', - cloudShoppingCart: [] + cloudShoppingCart: [], + selectAll: [] }, ready() { this.setData({ @@ -57,16 +56,12 @@ }) console.log('鍑嗗'); }, - onShow() { - debugger - this.setData({ - sonPurchaseSaleMethodId: '' - }) - }, + onLoad() { this.setData({ - sonPurchaseSaleMethodId: '' + sonPurchaseSaleMethodId: [] }) + console.log(this.data.sonPurchaseSaleMethodId, 'sonPurchaseSaleMethodId789'); }, observers: { 'openIds': function (newValue) { @@ -201,6 +196,7 @@ // 鎷垮埌鎵�鏈夐」 getAllChildren(id) { let result = []; + function findChildren(item) { if (item.id === id) { if (item.children && item.children.length > 0) { @@ -228,6 +224,7 @@ // 鎷垮埌褰撳墠椤瑰瓙椤� flattenTree(tree) { let result = []; + function flatten(node) { result.push(node); if (node.children && node.children.length > 0) { @@ -249,7 +246,7 @@ function findAndUpdate(node) { if (ids.includes(node.id)) { // console.log(node, 'node'); - node.checked = !node.checked // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true + node.checked = !node.checked // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true } if (node.children && node.children.length > 0) { for (let child of node.children) { @@ -273,9 +270,8 @@ const element = node.children[index]; findAndUpdate(element) } - } - else if (id == node.id && node.sysType == "CmsItem") { - node.checked = !node.checked // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true + } else if (id == node.id && node.sysType == "CmsItem") { + node.checked = !node.checked // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true } } for (let node of tree) { @@ -287,6 +283,7 @@ checkAll() { const ids = [] const list = [] + let checked = '' this.properties.treeList.forEach(item => { if (item.children && item.children.length > 0) { list.push(...this.flattenTree([item])) @@ -294,8 +291,21 @@ }) list.forEach(item => { ids.push(item.id) + + checked = item.checked }) + + const updataList = this.findAndUpdateItemsByIds(this.properties.treeList, ids); + + console.log(checked, 'list'); + if (!checked) { + this.setData({ + selectAll: list + }) + + } + this.setData({ treeList: updataList }) @@ -315,23 +325,16 @@ // console.log(list, 'list789'); const updatedTreeList = this.findAndUpdateItemsByIds(this.properties.treeList, ids); this.setData({ - treeList: updatedTreeList // 鏇存柊 treeList 鏁版嵁 + treeList: updatedTreeList // 鏇存柊 treeList 鏁版嵁 }); - + console.log(list, 'list.checked'); if (!list.checked) { - if (this.properties.superior) { - console.log(852); - this.properties.superior = false - this.setData({ - superiorPurchaseSaleMethodId: [] - }) - } - if (!this.properties.superior) { - this.setData({ - superiorPurchaseSaleMethodId: list - }) - } + + this.setData({ + superiorPurchaseSaleMethodId: list + }) + } // console.log(this.data.superiorPurchaseSaleMethodId, 'superiorPurchaseSaleMethodId'); @@ -363,20 +366,15 @@ if (!this.properties.paymentPage) { sonPurchaseSaleMethodId.push(citem.saleMethod[0].Id) } - - this.setData({ sonPurchaseSaleMethodId: sonPurchaseSaleMethodId }) console.log(this.data.sonPurchaseSaleMethodId); } else { // 鍙栨秷閫変腑鐨勬椂鍊欏垹闄d - } - this.setData({ treeList: updataList, - }) }, // 鍔犲叆璐墿杞� diff --git a/pages/home/home.wxss b/pages/home/home.wxss index 16964bf..eff074d 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -149,7 +149,7 @@ justify-content: space-between; } -.listBox .listItemBox { +.listBox .listItemBox { width: 49%; margin-bottom: 30rpx; } diff --git a/pages/retrievalPage/index.wxml b/pages/retrievalPage/index.wxml index e4c71a6..11a118d 100644 --- a/pages/retrievalPage/index.wxml +++ b/pages/retrievalPage/index.wxml @@ -2,205 +2,204 @@ <view class="retrievalPageBox"> <view style="width: 100%; height: {{barHeight}}px; "></view> -<view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> - <view> - <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> - </view> - <view class="navbar-title">妫�绱㈢粨鏋�</view> -</view> - - -<view class="example-search"> - <t-search bind:submit="onSearchSubmit" class="searchBox" model:value="{{searchVal}}" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" /> - <view class="cancellation" bind:tap="onCancellation">鍙栨秷</view> -</view> - - </view> -<!--pages/retrievalPage/index.wxml--> - - - - - -<t-tabs class="tabsBox" defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel"> - <t-tab-panel label="鍥句功({{bookTotal}})" value="0"> - <view wx:if="{{bookData.length <= 0}}" class="noDataBox"> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> - </view> - <view class="bookDataBox"> - - - - <view class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBook"> - <view class="imageBox"> - <image src="{{item.icon}}" mode="aspectFill" /> - </view> - <view class="bookDataNmae"> - {{item.name}} - </view> - <view class="bookDataAuthor">{{item.author}}</view> - </view> - </view> - - - <view wx:if="{{bookData.length != 0}}" class="bottom-box"> - <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> - <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> - </view> - - </t-tab-panel> - <t-tab-panel label="璇剧▼({{courseTotal}})" value="1"> - <view wx:if="{{courseData.length <= 0}}" class="noDataBox"> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> - </view> - - <view class="listBox1"> - + <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> <view> - <view wx:for="{{courseData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox"> - <view class="listItem flex"> + <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> + </view> + <view class="navbar-title">妫�绱㈢粨鏋�</view> + </view> + + + <view class="example-search"> + <t-search bind:submit="onSearchSubmit" class="searchBox" model:value="{{searchVal}}" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" /> + <view class="cancellation" bind:tap="onCancellation">鍙栨秷</view> + </view> + + </view> + <!--pages/retrievalPage/index.wxml--> + + + + + + <t-tabs class="tabsBox" defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel"> + <t-tab-panel label="鍥句功({{bookTotal}})" value="0"> + <view wx:if="{{bookData.length <= 0}}" class="noDataBox"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> + </view> + <view class="bookDataBox"> + + + + <view class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBook"> + <view class="imageBox"> + <image src="{{item.icon}}" mode="aspectFill" /> + </view> + <view class="bookDataNmae"> + {{item.name}} + </view> + <view class="bookDataAuthor">{{item.author}}</view> + </view> + </view> + + + <view wx:if="{{bookData.length != 0}}" class="bottom-box"> + <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> + <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> + </view> + + </t-tab-panel> + <t-tab-panel label="璇剧▼({{courseTotal}})" value="1"> + <view wx:if="{{courseData.length <= 0}}" class="noDataBox"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> + </view> + + <view class="listBox1"> + + <view> + <view wx:for="{{courseData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox"> + <view class="listItem flex"> + <view class="specialSubject-img"> + <image src="{{item.icon}}" mode="aspectFill" class="img" /> + </view> + <view class="body-info"> + <view class="name">{{item.name}}</view> + <view class="flex jc-sb"> + <text class="author">{{item.courseLeader}}</text> + <text>{{item.classHours}}璇炬椂</text> + </view> + <view class="priceBox flex jc-sb"> + <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> + <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> + <image src="/static/images/home/home-cart.png" mode="aspectFill" class="addCartImg" /> + </view> + </view> + </view> + </view> + </view> + + </view> + + <view wx:if="{{courseData.length != 0}}" class="bottom-box"> + <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> + <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> + </view> + </t-tab-panel> + <t-tab-panel label="鏁板瓧鏁欐潗({{digitalTextbooksTotal}})" value="2"> + + + <view wx:if="{{digitalTextbooksData.length <= 0}}" class="noDataBox"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> + </view> + + <view class="bookDataBox"> + + + <view class="bookDataForBox" wx:for="{{digitalTextbooksData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> + <view class="imageBox"> + <image src="{{item.icon}}" mode="" /> + </view> + <view class="bookDataNmae"> + {{item.name}} + </view> + <view class="bookDataAuthor">{{item.author}}</view> + </view> + </view> + + + <view wx:if="{{digitalTextbooksData.length != 0}}" class="bottom-box"> + <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> + <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> + </view> + + + + </t-tab-panel> + <t-tab-panel label="涓撻({{seminarTotal}})" value="3"> + <view wx:if="{{seminarData.length <= 0}}" class="noDataBox"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> + </view> + <view class="listBox"> + <view wx:for="{{seminarData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> + <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}"> <view class="specialSubject-img"> <image src="{{item.icon}}" mode="aspectFill" class="img" /> </view> <view class="body-info"> <view class="name">{{item.name}}</view> + <view class="time" wx:if="{{item.liveTime}}">鐩存挱鏃堕棿锛歿{item.liveTime}}</view> + <view class="time" wx:if="{{item.startTime}}">寮�鎾椂闂达細{{ item.startTime }}</view> + <view class="time" wx:if="{{!item.liveTime && !item.startTime}}">寮�鎾椂闂达細<text class="grey">寰呭畾</text></view> <view class="flex jc-sb"> - <text class="author">{{item.courseLeader}}</text> - <text>{{item.classHours}}璇炬椂</text> - </view> - <view class="priceBox flex jc-sb"> + <text class="author">{{item.lecturer}} {{item.position}}</text> <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> - <image src="/static/images/home/home-cart.png" mode="aspectFill" class="addCartImg" /> </view> </view> </view> </view> </view> - </view> - - <view wx:if="{{courseData.length != 0}}" class="bottom-box"> - <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> - <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> - </view> - </t-tab-panel> - <t-tab-panel label="鏁板瓧鏁欐潗({{digitalTextbooksTotal}})" value="2"> - - - <view wx:if="{{digitalTextbooksData.length <= 0}}" class="noDataBox"> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> - </view> - - <view class="bookDataBox"> - - - <view class="bookDataForBox" wx:for="{{digitalTextbooksData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> - <view class="imageBox"> - <image src="{{item.icon}}" mode="" /> - </view> - <view class="bookDataNmae"> - {{item.name}} - </view> - <view class="bookDataAuthor">{{item.author}}</view> + <view wx:if="{{seminarData.length != 0}}" class="bottom-box"> + <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> + <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> </view> - </view> - - <view wx:if="{{digitalTextbooksData.length != 0}}" class="bottom-box"> - <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> - <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> - </view> + </t-tab-panel> + <t-tab-panel label="涔︾洰({{bookFairTotal}})" value="4"> - </t-tab-panel> - <t-tab-panel label="涓撻({{seminarTotal}})" value="3"> - <view wx:if="{{seminarData.length <= 0}}" class="noDataBox"> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> - </view> - <view class="listBox"> + <view wx:if="{{bookFairData.length <= 0 }}" class="noDataBox"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> + </view> + <view class="outsideHigherBox"> - <view wx:for="{{seminarData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox"> - <view class="listItem"> - <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFill" class="img" /> - </view> - <view class="body-info"> - <view class="name">{{item.name}}</view> - <view class="time" wx:if="{{item.liveTime}}">鐩存挱鏃堕棿锛�<text>{{item.liveTime}}</text></view> - <view class="time" wx:if="{{item.startTime}}">寮�鎾椂闂达細<text>{{ item.startTime }}</text></view> - <view class="time" wx:if="{{!item.liveTime && !item.startTime}}">寮�鎾椂闂达細<text class="grey">寰呭畾</text></view> - <view class="flex jc-sb"> - <text class="author">{{item.lecturer}}</text> - <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> - <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> + <view class="higherBox" wx:for="{{bookFairData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> + <view class="outsideHigherImageBox"> + <image class="higherImageBox" src="{{item.icon}}" mode="" /> + <view class="downloadIcon" bind:tap="downloadData" data-item="{{item}}"> + + <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/downloadshiftin.png" mode="" /> + <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/download.png" mode="" /> </view> </view> - </view> - </view> - </view> - <view wx:if="{{seminarData.length != 0}}" class="bottom-box"> - <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> - <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> - </view> - - </t-tab-panel> - <t-tab-panel label="涔︾洰({{bookFairTotal}})" value="4"> - - - - <view wx:if="{{bookFairData.length <= 0 }}" class="noDataBox"> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> - </view> - <view class="outsideHigherBox"> - - <view class="higherBox" wx:for="{{bookFairData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> - <view class="outsideHigherImageBox"> - <image class="higherImageBox" src="{{item.icon}}" mode="" /> - <view class="downloadIcon" bind:tap="downloadData" data-item="{{item}}"> - - <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/downloadshiftin.png" mode="" /> - <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/download.png" mode="" /> - </view> + <view class="higherTextBox">{{item.name}}</view> </view> - <view class="higherTextBox">{{item.name}}</view> </view> - </view> - - <view wx:if="{{bookFairData.length != 0}}" class="bottom-box"> - <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> - <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> - </view> - - - - - </t-tab-panel> - <t-tab-panel label="涔﹀睍({{biblioClassificationTotal}})" value="5"> - <view wx:if="{{biblioClassificationData.length <= 0}}" class="noDataBox"> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> - </view> - <view class="outside"> - - <view class="contentBox" wx:for="{{biblioClassificationData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}"> - <image class="bookFairImage" wx:if="{{item.icon}}" src="{{item.icon}}" mode="" /> - <image class="bookFairImage" wx:else="" src="/static/images/bookExhibitionList/banner.png" mode="" /> - <view class="textBox" title="{{item.name}}"> <text>{{item.subtitleName}}</text></view> + <view wx:if="{{bookFairData.length != 0}}" class="bottom-box"> + <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> + <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> </view> - </view> - <view wx:if="{{biblioClassificationData.length != 0}}" class="bottom-box"> - <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> - <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> - </view> - </t-tab-panel> -</t-tabs> + + </t-tab-panel> + <t-tab-panel label="涔﹀睍({{biblioClassificationTotal}})" value="5"> + <view wx:if="{{biblioClassificationData.length <= 0}}" class="noDataBox"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> + </view> + <view class="outside"> + + <view class="contentBox" wx:for="{{biblioClassificationData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}"> + <image class="bookFairImage" wx:if="{{item.icon}}" src="{{item.icon}}" mode="" /> + <image class="bookFairImage" wx:else="" src="/static/images/bookExhibitionList/banner.png" mode="" /> + <view class="textBox" title="{{item.name}}"> <text>{{item.subtitleName}}</text></view> + </view> + + </view> + + <view wx:if="{{biblioClassificationData.length != 0}}" class="bottom-box"> + <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> + <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> + </view> + + </t-tab-panel> + </t-tabs> </view> \ No newline at end of file diff --git a/pages/retrievalPage/index.wxss b/pages/retrievalPage/index.wxss index c0ff82d..77b0c91 100644 --- a/pages/retrievalPage/index.wxss +++ b/pages/retrievalPage/index.wxss @@ -94,76 +94,6 @@ overflow: hidden; } - -.listBox { - padding: 20rpx 0; - display: flex; - flex-flow: row wrap; - justify-content: space-between; - margin: 20rpx; - -} - -.listBox .listItemBox { - width: 49%; - margin-bottom: 50rpx; - -} - -.listItemBox .listItem { - background: #fff; - box-sizing: border-box; - border-radius: 5px; - overflow: hidden; - box-shadow: 0px 0px 20rpx 2px #f1f1f1; - min-height: 170rpx; -} - - -.listBox .specialSubject-img { - width: 100%; - height: 120rpx; -} - -.specialSubject-img image { - width: 176.63px; - height: 109px; - object-fit: contain; -} - -.body-info { - padding: 20rpx; - font-size: 28rpx; - min-height: 110rpx; - width: 148px; -} - -.body-info .name { - font-size: 25rpx; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - margin-bottom: 10rpx; -} - -.body-info .time { - font-size: 26rpx; - margin-bottom: 10rpx; -} - -.body-info .author { - font-size: 26rpx; - display: flex; - justify-content: space-between; -} - -.body-info .price { - font-size: 26rpx; - color: #ff6d00; -} - .flex { display: flex; } @@ -204,32 +134,23 @@ flex-wrap: wrap; justify-content: space-between; margin: 15px; - - } .contentBox { width: 330rpx; - /* height: 231rpx; */ - /* border: 1px #000 solid; */ margin: 10px 0; background-color: #fff; - } .textBox { width: 280rpx; - /* height: 75rpx; */ font-size: 25rpx; - overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; - /* text-align: center; */ margin: 20rpx; - } .bookFairImage { @@ -244,13 +165,11 @@ .higherBox { width: 220rpx; - /* height: 390rpx; */ box-shadow: 10rpx 10rpx 10rpx 10rpx rgba(0, 0, 0, 0.08); margin: 30rpx 15rpx; } .outsideHigherImageBox { - position: relative; } @@ -263,7 +182,6 @@ .downloadIcon { width: 34rpx; height: 34rpx; - border-radius: 5rpx 5rpx 5rpx 5rpx; background: rgba(0, 0, 0, 0.3); position: absolute; @@ -272,9 +190,7 @@ padding: 10rpx; } - .download { - /* background-color: #8bc34a; */ width: 100%; height: 100%; @@ -295,7 +211,6 @@ .t-tabs__item--active { color: #FF6C00 !important; - } .t-tabs__track { @@ -303,9 +218,6 @@ } .noDataBox { - /* display: flex; - justify-content: center; - align-items: center */ margin: 0 auto; margin-top: 250rpx; } @@ -346,4 +258,90 @@ .tabsBox { margin-top: 300rpx; +} + + + + + + + +/* 涓撻 */ +.listBox { + padding: 20rpx 0; + display: flex; + flex-flow: row wrap; + justify-content: space-between; + margin: 20rpx; +} + +.listBox .listItemBox { + width: 49%; + margin-bottom: 30rpx; +} + +.listItemBox .listItem { + background: #fff; + box-sizing: border-box; + border-radius: 5px; + overflow: hidden; + box-shadow: 0px 0px 20rpx 2px #f1f1f1; +} + +.listBox .specialSubject-img { + width: 100%; + height: 120rpx; +} + +.specialSubject-img image { + width: 100%; + height: 100%; + object-fit: contain; +} + +.body-info { + padding: 16rpx; + font-size: 28rpx; +} + +.body-info .name { + font-size: 30rpx; + height: 80rpx; + color: #333333; + font-weight: bold; + line-height: 40rpx; + display: -webkit-box; + margin-bottom: 10rpx; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; +} + +.body-info .time { + font-size: 26rpx; + margin-bottom: 10rpx; +} + +.body-info .author { + font-size: 26rpx; + display: flex; + justify-content: space-between; + display: -webkit-box; + /* 浣跨敤寮规�х洅瀛愬竷灞�妯″瀷 */ + -webkit-line-clamp: 1; + /* 鎺у埗鏂囨湰鐨勮鏁� */ + -webkit-box-orient: vertical; + /* 璁剧疆鐩掑瓙鐨勫瓙鍏冪礌鎺掑垪鏂瑰悜 */ + overflow: hidden; + /* 瓒呭嚭閮ㄥ垎闅愯棌 */ + text-overflow: ellipsis; + /* 瓒呭嚭閮ㄥ垎鏄剧ず鐪佺暐鍙� */ + white-space: normal; + flex: 1; +} + +.body-info .price { + font-size: 26rpx; + color: #ff6d00; } \ No newline at end of file -- Gitblit v1.9.1