From c95ed3b99b3cb75374f2c8819740a1839ed28a0f Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期四, 13 六月 2024 10:43:26 +0800 Subject: [PATCH] 优化数字教材详情 --- pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxss | 50 ++- pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxml | 120 ++++++--- pages/digitalTextbooks/digitalTextbooksDetails/index.wxml | 134 ++++++++-- pages/digitalTextbooks/digitalTextbooksDetails/index.wxss | 213 ++++++++++++++-- pages/digitalTextbooks/digitalTextbooksDetails/index.json | 3 pages/digitalTextbooks/digitalTextbooksDetails/index.js | 256 ++++++++++++++++-- 6 files changed, 622 insertions(+), 154 deletions(-) diff --git a/pages/digitalTextbooks/digitalTextbooksDetails/index.js b/pages/digitalTextbooks/digitalTextbooksDetails/index.js index 556a12f..927748f 100644 --- a/pages/digitalTextbooks/digitalTextbooksDetails/index.js +++ b/pages/digitalTextbooks/digitalTextbooksDetails/index.js @@ -1,5 +1,8 @@ // pages/digitalTextbooks/digitalTextbooksDetails/index.js import Toast from "tdesign-miniprogram/toast"; +import { + loginInfo +} from '../../../assets/js/login'; const app = getApp() Page({ @@ -7,9 +10,14 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + + + type: 'basicInformation', + + digitalTextId: '', digitalsData: {}, - isFavourite: true, + richStyle: 'font-size: 28rpx;color: #333; line-height: 48rpx;text-align: justify;margin: 20rpx; ', tabValue: "brief", relatedBookData: [], @@ -45,7 +53,14 @@ }, testResourceClickIocn: { name: "/static/images/digitalTextbooks/Link@2x.png", - } + }, + + catalogue: { + name: "/static/images/digitalTextbooks/mulu@2x.png", + }, + catalogueClickIcon: { + name: "/static/images/digitalTextbooks/mulu@2x.png", + }, }, @@ -58,6 +73,11 @@ digitalTextId: options.id }) this.digitalTextbooksDetailsGet(this.data.digitalTextId) + + + + + }, // 鏍煎紡鍖栨棩鏈� @@ -215,7 +235,7 @@ publicationDate: this.formatDate(res.datas.publicationDate) }) res.datas.price = res.datas.price.toFixed(2) - res.datas.isFavourite = false + this.setData({ digitalsData: res.datas }) @@ -229,38 +249,14 @@ console.log(this.data.isBuy); this.setData({ loading: false, + type: 'basicInformation', }); + + // this.onCe() }) }, - setCoolect() { - console.log(this.data.digitalsData.id); - console.log(this.data.digitalsData.isFavourite); - this.setData({ - isFavourite: !this.data.isFavourite - }) - - - if (this.data.digitalsData.isFavourite) { - app.MG.store - .delProductLink({ - productIds: [this.data.digitalsData.id], - linkType: 'FavoriteBookCity' - }) - .then(() => { - this.data.digitalsData.isFavourite = false - }) - } else { - let params = { - productIds: [this.data.digitalsData.id], - linkType: 'FavoriteBookCity' - } - app.MG.store.addProductLink(params).then((res) => { - this.data.digitalsData.isFavourite = true - }) - } - }, onTabsChange(event) { this.setData({ @@ -446,16 +442,202 @@ // console.log(token); goRead() { - const item = this.data.digitalsData + // 棣栭〉娴嬭瘯鐧诲綍鍔熻兘锛屽悗缁敞閲� + // 妫�鏌ョ櫥褰曠姸鎬� + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + // 濡傛灉涓嶆槸绗竴娆$櫥褰曪紝浼氭墽琛屽洖璋� + if (data) { + // 鐧诲綍鎴愬姛锛岃嚜鍔ㄨ褰晅oken鍜岀敤鎴蜂俊鎭紝骞惰繑鍥瀟rue - let token = wx.getStorageSync(app.config.tokenKey) - console.log(); - const URL = app.config.textReaderUrl + '?bookId=' + item.refCode + "&tryPageCount=" + item.probationPage + "&token=" + token + const item = this.data.digitalsData + wx.navigateTo({ + url: '/pages/digitalTextbooks/digitalTextbooksDetails/components/webView/index?refCode=' + item.refCode + "&tryPageCount=" + item.probationPage + }); + } else { + // 鍑虹幇閿欒锛岃繑鍥瀎alse + } + }) + } else { + // 濡傛灉鏄涓�娆$櫥褰曪紝浼氳烦杞嚦缁戝畾鐢ㄦ埛淇℃伅椤甸潰锛屽~鍐欏畬鐢ㄦ埛淇℃伅鍚庤繘琛岀櫥褰曞苟鍌ㄥ瓨token鍜岀敤鎴蜂俊鎭紝缁撴潫鍚庤烦杞洖褰撳墠椤甸潰锛堟惡甯﹂〉闈㈠弬鏁帮級 + const item = this.data.digitalsData + wx.navigateTo({ + url: '/pages/digitalTextbooks/digitalTextbooksDetails/components/webView/index?refCode=' + item.refCode + "&tryPageCount=" + item.probationPage + }); + } + // let token = wx.getStorageSync(app.config.tokenKey) + // if (token) { - wx.navigateTo({ - url: '/pages/digitalTextbooks/digitalTextbooksDetails/components/webView/index?refCode=' + item.refCode + "&tryPageCount=" + item.probationPage - }); + + + // } + + + }, + onTabClick(e) { + // debugger + console.log(e); + let tab = e.currentTarget.dataset.tab; + + this.setData({ + type: tab, + + }) + + if (tab == 'basicInformation') { + this.setData({ + topPos: 0 + }) + } else if (tab == 'certificateInformation') { + this.setData({ + topPos: this.certificateInformation + }) + } else if (tab == 'authorSynopsis') { + this.setData({ + topPos: this.authorSynopsis + }) + } else if (tab == 'listings') { + this.setData({ + topPos: this.listings + }) + } else if (tab == 'relatedTextbooks') { + this.setData({ + topPos: this.relatedTextbooks + }) + } + + }, + + + onScroll(e) { + + let scrollTop = e.detail.scrollTop + console.log(scrollTop); + // this.setData({ + // type: scrollTop + // }) + + + if (scrollTop < this.basicInformation) { + this.setData({ + type: 'basicInformation' + }) + } else if (scrollTop >= this.basicInformation && scrollTop < this.certificateInformation) { + this.setData({ + type: 'certificateInformation' + }) + } else if (scrollTop >= this.certificateInformation && scrollTop < this.authorSynopsis) { + this.setData({ + type: 'authorSynopsis' + }) + } else if (scrollTop >= this.authorSynopsis && scrollTop < this.listings) { + this.setData({ + type: 'listings' + }) + } else if (scrollTop >= this.listings && scrollTop < this.relatedTextbooks) { + this.setData({ + type: 'relatedTextbooks' + }) + } + + + + }, + onCe() { + + let that = this; + var query = wx.createSelectorQuery() + console.log(query, '12355'); + //鑾峰彇鏉垮潡涓�绂籹croll-view椤堕儴鐨勮窛绂�,绗竴鏉垮潡瀹為檯璺濈涓�0锛屾澶勮幏鍙栧彧涓虹粰绗簩鍙婄涓夋澘鍧楀噺鍘荤涓�鏉垮潡璺濈scroll-view鐨勯《閮ㄨ窛绂� + wx.createSelectorQuery().select('#basicInformation').boundingClientRect(function (res) { + console.log(res, '456882588'); + that.basicInformation = res.top + }).exec() + //鑾峰彇鏉垮潡浜岀scroll-view椤堕儴鐨勮窛绂� + query.select('#certificateInformation').boundingClientRect(function (res) { + that.certificateInformation = res.top - that.basicInformation + }).exec() + //鑾峰彇鏉垮潡涓夌scroll-view椤堕儴鐨勮窛绂� + query.select('#authorSynopsis').boundingClientRect(function (res) { + that.authorSynopsis = res.top - that.basicInformation + }).exec() + //鑾峰彇鏉垮潡鍥涚scroll-view椤堕儴鐨勮窛绂� + query.select('#listings').boundingClientRect(function (res) { + that.listings = res.top - that.basicInformation + }).exec() + //鑾峰彇鏉垮潡浜旂scroll-view椤堕儴鐨勮窛绂� + query.select('#relatedTextbooks').boundingClientRect(function (res) { + that.relatedTextbooks = res.top - that.basicInformation + }).exec() + }, + setCoolect() { + console.log(456); + + // 棣栭〉娴嬭瘯鐧诲綍鍔熻兘锛屽悗缁敞閲� + // 妫�鏌ョ櫥褰曠姸鎬� + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + // 濡傛灉涓嶆槸绗竴娆$櫥褰曪紝浼氭墽琛屽洖璋� + if (data) { + if (this.data.digitalsData.isFavourite) { + app.MG.store + .delProductLink({ + productIds: [this.data.digitalsData.id], + linkType: 'FavoriteBookCity' + }) + .then(() => { + this.setData({ + "digitalsData.isFavourite": false + }) + }) + } else { + let params = { + productIds: [this.data.digitalsData.id], + linkType: 'FavoriteBookCity' + } + app.MG.store.addProductLink(params).then((res) => { + this.setData({ + "digitalsData.isFavourite": true + }) + }) + } + } else { + // 鍑虹幇閿欒锛岃繑鍥瀎alse + } + }) + } else { + if (this.data.digitalsData.isFavourite) { + app.MG.store + .delProductLink({ + productIds: [this.data.digitalsData.id], + linkType: 'FavoriteBookCity' + }) + .then(() => { + this.setData({ + "digitalsData.isFavourite": false + }) + }) + } else { + let params = { + productIds: [this.data.digitalsData.id], + linkType: 'FavoriteBookCity' + } + app.MG.store.addProductLink(params).then((res) => { + this.setData({ + "digitalsData.isFavourite": true + }) + }) + } + } + + + + + } + }) \ No newline at end of file diff --git a/pages/digitalTextbooks/digitalTextbooksDetails/index.json b/pages/digitalTextbooks/digitalTextbooksDetails/index.json index 8a01d68..530aaca 100644 --- a/pages/digitalTextbooks/digitalTextbooksDetails/index.json +++ b/pages/digitalTextbooks/digitalTextbooksDetails/index.json @@ -4,6 +4,7 @@ "t-tabs": "tdesign-miniprogram/tabs/tabs", "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", "t-image": "tdesign-miniprogram/image/image", - "t-toast": "tdesign-miniprogram/toast/toast" + "t-toast": "tdesign-miniprogram/toast/toast", + "t-empty": "tdesign-miniprogram/empty/empty" } } \ No newline at end of file diff --git a/pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxml b/pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxml index bb243e4..57c94df 100644 --- a/pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxml +++ b/pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxml @@ -1,5 +1,5 @@ <!-- -姝ゆ枃浠朵负寮�鍙戣�呭伐鍏风敓鎴愶紝鐢熸垚鏃堕棿: 2024/6/6涓婂崍11:26:43 +姝ゆ枃浠朵负寮�鍙戣�呭伐鍏风敓鎴愶紝鐢熸垚鏃堕棿: 2024/6/13涓婂崍9:45:29 浣跨敤鏂规硶锛� 鍦� D:\course_of_growth\jsekXcx\jsek-applet\pages\digitalTextbooks\digitalTextbooksDetails\index.wxml 寮曞叆妯℃澘 @@ -26,38 +26,50 @@ <view class="imageBox"> <image mode="true" class="sk-image"></image> </view> - <view class="setCoolect"> - <image style="width: 25px;" class="sk-image"></image> - </view> </view> <view class="bookContent"> - <view class="headerText sk-transparent sk-text-14-2857-678 sk-text"> + <view class="headerText sk-transparent sk-text-14-2857-391 sk-text"> 浣撹偛涓庡仴搴凤紙绗�3鐗堬級 </view> <view class="content"> <view class="styleCssBox"> - <view style="width: 75px;" class="sk-transparent sk-text-14-2857-984 sk-text"> 浣滆�咃細 </view> + <view style="width: 75px;" class="sk-transparent sk-text-14-2857-366 sk-text"> 浣滆�咃細 </view> <view></view> </view> <view class="styleCssBox"> - <view style="width: 75px;" class="sk-transparent sk-text-14-2857-115 sk-text">ISBN锛�</view> + <view style="width: 75px;" class="sk-transparent sk-text-14-2857-515 sk-text">ISBN锛�</view> <view></view> </view> <view class="styleCssBox"> - <view style="width: 75px;" class="sk-transparent sk-text-14-2857-39 sk-text"> 鍑虹増鏃堕棿锛� </view> + <view style="width: 75px;" class="sk-transparent sk-text-14-2857-242 sk-text"> 鍑虹増鏃堕棿锛� </view> <view></view> - </view> - <view class="styleCssBox"> - <view style="width: 75px;" class="sk-transparent sk-text-14-2857-89 sk-text"> 瀹氫环锛� </view> - <view class="sk-transparent sk-text-14-2857-508 sk-text">锟�38.80</view> </view> </view> <image class="right-background sk-image"></image> </view> </view> <view class="certificate"> - <view class="publish sk-transparent sk-text-14-2857-640 sk-text">鍑虹増璇佷功</view> - <view class="curriculum sk-transparent sk-text-14-2857-770 sk-text">璇剧▼璇佷功</view> + <view class="proposal"> + <view class="suggestion"> + <image mode="true" class="sk-image"></image> + </view> + <view class="proposalText sk-transparent sk-text-14-2857-597 sk-text">鎴戣寤鸿</view> + </view> + <view class="frame"></view> + <view class="information"> + <view class="proposal"> + <view class="suggestion"> + <image mode="true" class="sk-image"></image> + </view> + <view class="proposalText sk-transparent sk-text-14-2857-10 sk-text">璇佷功鐢宠</view> + </view> + <view class="informationPrice"> + <view class="fixedPrice"> + <view class="sk-transparent sk-text-14-2857-939 sk-text"> 瀹氫环锛� </view> + <view class="sk-transparent sk-text-14-2857-293 sk-text">锟�38.80</view> + </view> + </view> + </view> </view> </view> </view> @@ -83,7 +95,7 @@ <view class="t-icon--image icon--t-icon--image"> <image class="t-icon__image icon--t-icon__image sk-image" mode="aspectFit"></image> </view> - </view>浣滆�呬俊鎭� + </view>璇佷功淇℃伅 </view> </view> <view class="t-tabs__item tabs--t-tabs__item t-tabs__item--line tabs--t-tabs__item--line t-tabs__item--evenly tabs--t-tabs__item--evenly t-tabs__item--top tabs--t-tabs__item--top " data-index="2"> @@ -92,7 +104,7 @@ <view class="t-icon--image icon--t-icon--image"> <image class="t-icon__image icon--t-icon__image sk-image" mode="aspectFit"></image> </view> - </view>鐩綍 + </view>浣滆�呬俊鎭� </view> </view> <view class="t-tabs__item tabs--t-tabs__item t-tabs__item--line tabs--t-tabs__item--line t-tabs__item--evenly tabs--t-tabs__item--evenly t-tabs__item--top tabs--t-tabs__item--top " data-index="3"> @@ -101,10 +113,19 @@ <view class="t-icon--image icon--t-icon--image"> <image class="t-icon__image icon--t-icon__image sk-image" mode="aspectFit"></image> </view> + </view>鐩綍 + </view> + </view> + <view class="t-tabs__item tabs--t-tabs__item t-tabs__item--line tabs--t-tabs__item--line t-tabs__item--evenly tabs--t-tabs__item--evenly t-tabs__item--top tabs--t-tabs__item--top " data-index="4"> + <view class="t-tabs__item-inner tabs--t-tabs__item-inner t-tabs__item-inner--line tabs--t-tabs__item-inner--line sk-transparent"> + <view class="t-icon icon--t-icon tabs--t-tabs__icon tabs--undefined" style="width: ; height: ;"> + <view class="t-icon--image icon--t-icon--image"> + <image class="t-icon__image icon--t-icon__image sk-image" mode="aspectFit"></image> + </view> </view>鐩稿叧鏁欐潗 </view> </view> - <view class="t-tabs__track tabs--t-tabs__track t-tabs__track--top tabs--t-tabs__track--top " style="-webkit-transform: translateX(38.875px); transform: translateX(38.875px); "></view> + <view class="t-tabs__track tabs--t-tabs__track t-tabs__track--top tabs--t-tabs__track--top " style="-webkit-transform: translateX(32px); transform: translateX(32px); "></view> </view> </scroll-view> </view> @@ -112,58 +133,69 @@ </view> <view class="t-tabs__content tabs--t-tabs__content"> <view class="t-tabs__content-inner tabs--t-tabs__content-inner custom-panel" style="true"> - <view class=" t-tab-panel panel--t-tab-panel t-is-active panel--t-is-active" style="true" id="947897dc--t_tabs_3_panel_0"> + <view class=" t-tab-panel panel--t-tab-panel t-is-active panel--t-is-active" style="true" id="a3607342--t_tabs_7_panel_0"> <view class="rubricBox"> <view class="rubricimgBox"> <image mode="true" class="sk-image"></image> </view> - <view class="basic sk-transparent sk-text-14-2857-357 sk-text"> 鍩烘湰淇℃伅</view> + <view class="basic sk-transparent sk-text-14-2857-466 sk-text"> 鍩烘湰淇℃伅</view> </view> - <view style="margin: 15px;"> - <rich-text nodes="" style="font-size: 14px;color: #333; line-height: 24px;text-align: justify;margin: 10px;"></rich-text> + <view style="margin: 15px; margin-bottom: 65px;"> + <rich-text style="font-size: 14px;color: #333; line-height: 24px;text-align: justify;margin: 10px;"></rich-text> </view> </view> - <view class=" t-tab-panel panel--t-tab-panel" style="height: 0;" id="4fbdafa5--t_tabs_3_panel_1"> + <view class=" t-tab-panel panel--t-tab-panel" style="height: 0;" id="4b6ea136--t_tabs_7_panel_1"> <view class="rubricBox"> <view class="rubricimgBox"> <image mode="true" class="sk-image"></image> </view> - <view class="basic sk-transparent sk-text-14-2857-586 sk-text"> 浣滆�呬俊鎭�</view> + <view class="basic sk-transparent sk-text-14-2857-927 sk-text"> 浣滆�呬俊鎭�</view> </view> - <view style="margin: 15px;"> - <rich-text nodes="" style="font-size: 14px;color: #333; line-height: 24px;text-align: justify;margin: 10px;"></rich-text> + <view style="margin: 15px; margin-bottom: 65px;"> + <rich-text style="font-size: 14px;color: #333; line-height: 24px;text-align: justify;margin: 10px;"></rich-text> </view> </view> - <view class=" t-tab-panel panel--t-tab-panel" style="height: 0;" id="a8fe62e6--t_tabs_3_panel_2"> + <view class=" t-tab-panel panel--t-tab-panel" style="height: 0;" id="403cd750--t_tabs_7_panel_2"> <view class="rubricBox"> <view class="rubricimgBox"> <image mode="true" class="sk-image"></image> </view> - <view class="basic sk-transparent sk-text-14-2857-540 sk-text"> 鐩綍</view> + <view class="basic sk-transparent sk-text-14-2857-416 sk-text"> 浣滆�呬俊鎭�</view> </view> - <view style="margin: 15px;"> - <rich-text nodes="" style="font-size: 14px;color: #333; line-height: 24px;text-align: justify;margin: 10px;"></rich-text> + <view style="margin: 15px; margin-bottom: 65px;"> + <rich-text style="font-size: 14px;color: #333; line-height: 24px;text-align: justify;margin: 10px;"></rich-text> </view> </view> - <view class=" t-tab-panel panel--t-tab-panel" style="height: 0;" id="0d4979d4--t_tabs_3_panel_3"> + <view class=" t-tab-panel panel--t-tab-panel" style="height: 0;" id="092c1c04--t_tabs_7_panel_3"> + <view class="rubricBox"> + <view class="rubricimgBox"> + <image mode="true" class="sk-image"></image> + </view> + <view class="basic sk-transparent sk-text-14-2857-874 sk-text"> 鐩綍</view> + </view> + <view style="margin: 15px; margin-bottom: 65px;"> + <rich-text style="font-size: 14px;color: #333; line-height: 24px;text-align: justify;margin: 10px;"></rich-text> + </view> + </view> + <view class=" t-tab-panel panel--t-tab-panel" style="height: 0;" id="c786c51d--t_tabs_7_panel_4"> <view class="correlation"> <view data-item="[object Object]"> <view class="correlationImage"> <image mode="true" class="sk-image"></image> </view> - <view class="correlationName sk-transparent sk-text-14-2857-861 sk-text">濠村辜鍎跨敓娲荤収鎶�</view> + <view class="correlationName sk-transparent sk-text-14-2857-494 sk-text">濠村辜鍎跨敓娲荤収鎶�</view> </view> <view data-item="[object Object]"> <view class="correlationImage"> <image mode="true" class="sk-image"></image> </view> - <view class="correlationName sk-transparent sk-text-14-2857-135 sk-text">鏂版爣鍑嗛�氱敤鑱屽満鑻辫鍩虹妯″潡涓�</view> + <view class="correlationName sk-transparent sk-text-14-2857-938 sk-text">鏂版爣鍑嗛�氱敤鑱屽満鑻辫鍩虹妯″潡涓�</view> </view> <view data-item="[object Object]"> <view class="correlationImage"> <image mode="true" class="sk-image"></image> </view> - <view class="correlationName sk-transparent sk-text-14-2857-639 sk-text">瀛﹀墠鍎跨鍗敓涓庝繚鍋�</view> + <view class="correlationName sk-transparent sk-text-14-2857-12 sk-text">瀛﹀墠鍎跨鍗敓涓庝繚鍋�</view> </view> </view> </view> @@ -172,14 +204,24 @@ </view> </view> <view class="box-bottom"> - <view class="trialReading"> - <view> - <image class="t-image image--t-image t-image--shape-square image--t-image--shape-square sk-image" id="a67cec07--image" mode="scaleToFill" style="true"></image> + <view style="border-top: 1px solid #DDDDDD; display: flex;"> + <view class="collection"> + <view class="collectionImage"> + <image mode="true" class="sk-image"></image> + </view> + <view class="sk-transparent sk-text-14-2857-834 sk-text"> + 鏀惰棌 + </view> </view> - <view class="btn-text sk-transparent sk-text-14-2857-233 sk-text">璇曡</view> + <view class="trialReading"> + <view class="collectionImage"> + <image class="sk-image"></image> + </view> + <view class="btn-text sk-transparent sk-text-14-2857-761 sk-text">璇曡</view> + </view> </view> - <view class="shopCarColor sk-transparent sk-text-14-2857-769 sk-text">鍔犲叆璐墿杞�</view> - <view class="buyColor sk-transparent sk-text-14-2857-526 sk-text">绔嬪嵆璐拱</view> + <view class="shopCarColor sk-transparent sk-text-14-2857-985 sk-text">鍔犲叆璐墿杞�</view> + <view class="buyColor sk-transparent sk-text-14-2857-221 sk-text">绔嬪嵆璐拱</view> </view> </view> </view> diff --git a/pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxss b/pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxss index aa52fff..50eaa6c 100644 --- a/pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxss +++ b/pages/digitalTextbooks/digitalTextbooksDetails/index.skeleton.wxss @@ -1,5 +1,5 @@ /* -姝ゆ枃浠朵负寮�鍙戣�呭伐鍏风敓鎴愶紝鐢熸垚鏃堕棿: 2024/6/6涓婂崍11:26:43 +姝ゆ枃浠朵负寮�鍙戣�呭伐鍏风敓鎴愶紝鐢熸垚鏃堕棿: 2024/6/13涓婂崍9:45:29 鍦� D:\course_of_growth\jsekXcx\jsek-applet\pages\digitalTextbooks\digitalTextbooksDetails\index.wxss 涓紩鍏ユ牱寮� ``` @@ -11,7 +11,7 @@ .sk-transparent { color: transparent !important; } -.sk-text-14-2857-678 { +.sk-text-14-2857-391 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 50.4000rpx; position: relative !important; @@ -23,82 +23,92 @@ color: transparent !important; background-repeat: repeat-y !important; } -.sk-text-14-2857-984 { +.sk-text-14-2857-366 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 39.2000rpx; position: relative !important; } -.sk-text-14-2857-115 { +.sk-text-14-2857-515 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 39.2000rpx; position: relative !important; } -.sk-text-14-2857-39 { +.sk-text-14-2857-242 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 39.2000rpx; position: relative !important; } -.sk-text-14-2857-89 { +.sk-text-14-2857-597 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; - background-size: 100% 39.2000rpx; + background-size: 100% 33.6000rpx; position: relative !important; } -.sk-text-14-2857-508 { +.sk-text-14-2857-10 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; - background-size: 100% 39.2000rpx; + background-size: 100% 33.6000rpx; position: relative !important; } -.sk-text-14-2857-640 { +.sk-text-14-2857-939 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 44.8000rpx; position: relative !important; } -.sk-text-14-2857-770 { +.sk-text-14-2857-293 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 44.8000rpx; position: relative !important; } -.sk-text-14-2857-357 { +.sk-text-14-2857-466 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 44.8000rpx; position: relative !important; } -.sk-text-14-2857-586 { +.sk-text-14-2857-927 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 44.8000rpx; position: relative !important; } -.sk-text-14-2857-540 { +.sk-text-14-2857-416 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 44.8000rpx; position: relative !important; } -.sk-text-14-2857-861 { +.sk-text-14-2857-874 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 44.8000rpx; + position: relative !important; + } +.sk-text-14-2857-494 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 39.2000rpx; position: relative !important; } -.sk-text-14-2857-135 { +.sk-text-14-2857-938 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 39.2000rpx; position: relative !important; } -.sk-text-14-2857-639 { +.sk-text-14-2857-12 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 39.2000rpx; position: relative !important; } -.sk-text-14-2857-233 { +.sk-text-14-2857-834 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 44.8000rpx; position: relative !important; } -.sk-text-14-2857-769 { +.sk-text-14-2857-761 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 44.8000rpx; position: relative !important; } -.sk-text-14-2857-526 { +.sk-text-14-2857-985 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 44.8000rpx; + position: relative !important; + } +.sk-text-14-2857-221 { background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; background-size: 100% 44.8000rpx; position: relative !important; diff --git a/pages/digitalTextbooks/digitalTextbooksDetails/index.wxml b/pages/digitalTextbooks/digitalTextbooksDetails/index.wxml index f562330..12e34a1 100644 --- a/pages/digitalTextbooks/digitalTextbooksDetails/index.wxml +++ b/pages/digitalTextbooks/digitalTextbooksDetails/index.wxml @@ -15,15 +15,10 @@ <view class="imageBox"> <image src="{{digitalsData.icon}}" mode="" /> </view> - - <view class="setCoolect"> + <!-- <view class="setCoolect"> <image src="/static/images/bookService/detail/collect.png" style="width: 50rpx;" bind:tap="setCoolect" wx:if="{{isFavourite}}" /> <image src="/static/images/bookService/detail/collecting.png" style="width: 50rpx;" bind:tap="setCoolect" wx:else="" /> - </view> - - - - + </view> --> </view> <view class="bookContent"> <view class="headerText"> @@ -42,11 +37,7 @@ <view style="width: 150rpx;"> 鍑虹増鏃堕棿锛� </view> <view>{{ publicationDate}}</view> </view> - <view class="styleCssBox"> - <view style="width: 150rpx;"> 瀹氫环锛� </view> - <view wx:if="{{digitalsData.price !== 0}}">锟{ digitalsData.price}}</view> - <view wx:else>鍏嶈垂</view> - </view> + </view> <image src="/static/images/bookService/detail/square.png" class="right-background" /> </view> @@ -55,8 +46,28 @@ </view> <view class="certificate"> - <view class="publish">鍑虹増璇佷功</view> - <view class="curriculum">璇剧▼璇佷功</view> + <view class="proposal"> + <view class="suggestion"> + <image src="/static/images/digitalTextbooks/Suggestion@2x.png" mode="" /> + </view> + <view class="proposalText">鎴戣寤鸿</view> + </view> + <view class="frame"></view> + <view class="information"> + <view class="proposal"> + <view class="suggestion"> + <image src="/static/images/digitalTextbooks/shengshu-t@2x.png" mode="" /> + </view> + <view class="proposalText">璇佷功鐢宠</view> + </view> + <view class="informationPrice"> + <view wx:if="{{digitalsData.price != 0}}" class="fixedPrice"> + <view> 瀹氫环锛� </view> + <view>锟{ digitalsData.price}}</view> + </view> + <view wx:else>鍏嶈垂</view> + </view> + </view> </view> @@ -77,6 +88,29 @@ </view> </t-tab-panel> + <t-tab-panel icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}" value="jsek_cloudLearning" label="璇佷功淇℃伅" style="{{tabPanelstyle}}"> + <view class="rubricBox"> + <view class="rubricimgBox"> + <image src="/static/images/digitalTextbooks/zhengshu@2x.png" mode="" /> + </view> + <view class="basic"> 璇佷功淇℃伅</view> + + + + + + </view> + + + <view class="certificateChart"> + <view class="chart"> + <image src="" mode="" /> + </view> + <view class="chart"> + <image src="" mode="" /> + </view> + </view> + </t-tab-panel> <t-tab-panel icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}" value="jsek_teachingResources" label="浣滆�呬俊鎭�" style="{{tabPanelstyle}}"> <view class="rubricBox"> <view class="rubricimgBox"> @@ -87,10 +121,8 @@ <view style="margin: 30rpx; margin-bottom: 130rpx;"> <rich-text nodes="{{digitalsData.authorIntroduction}}" style="{{richStyle}}"></rich-text> </view> - - </t-tab-panel> - <t-tab-panel icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}" value="jsek_cloudLearning" label="鐩綍" style="{{tabPanelstyle}}"> + <t-tab-panel icon="{{tabValue == 'catalogue' ? catalogueClickIcon : catalogue}}" value="catalogue" label="鐩綍" style="{{tabPanelstyle}}"> <view class="rubricBox"> <view class="rubricimgBox"> @@ -98,10 +130,7 @@ </view> <view class="basic"> 鐩綍</view> </view> - <view style="margin: 30rpx; margin-bottom: 130rpx;"> - - <rich-text nodes="{{digitalsData.catalogue}}" style="{{richStyle}}"></rich-text> </view> @@ -120,28 +149,77 @@ </view> <view class="correlationName">{{item.name}}</view> + + <view class="correlationAuthor">{{digitalsData.author}}</view> </view> </view> - - - </t-tab-panel> </t-tabs> </view> + + + + + + + + + + + + + + + + + + + + + + + + + + + <view class="box-bottom"> - <view class="trialReading" bind:tap="goRead" wx:if="{{!isBuy}}"> - <view> - <t-image src="/static/images/bookService/detail/shidu.png"></t-image> + + <view style="border-top: 1rpx solid #DDDDDD; display: flex;"> + + <view class="collection" bind:tap="setCoolect"> + <view class="collectionImage"> + <image wx:if="{{!digitalsData.isFavourite}}" src="/static/images/digitalTextbooks/wodeshoucang@2x.png" mode="" /> + <image wx:else src="/static/images/bookService/detail/collecting.png" mode="" /> + </view> + <view> + 鏀惰棌 + </view> </view> - <view class="btn-text">璇曡</view> + <view class="trialReading" bind:tap="goRead" wx:if="{{!isBuy}}"> + <view class="collectionImage"> + <image src="/static/images/digitalTextbooks/shidu@2x.png"></image> + </view> + <view class="btn-text">璇曡</view> + </view> + + </view> + + + + <view class="shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!isBuy}}">鍔犲叆璐墿杞�</view> <view class="buyColor" bind:tap="buyBtn" wx:if="{{!isBuy}}">绔嬪嵆璐拱</view> <!-- <view class="buyColor" bind:tap="buyBtn" wx:if="{{digitalsData.price == 0}} ">鍏嶈垂棰嗗彇</view> --> - <view class="buyColor" bind:tap="goRead" wx:if="{{isBuy}}"> + <view class="{{!isBuy ? 'buyColor' :'reading'}}" bind:tap="goRead" wx:if="{{isBuy}}"> 绔嬪嵆闃呰 </view> + + + + </view> </view> </view> diff --git a/pages/digitalTextbooks/digitalTextbooksDetails/index.wxss b/pages/digitalTextbooks/digitalTextbooksDetails/index.wxss index df3f1b0..268ab62 100644 --- a/pages/digitalTextbooks/digitalTextbooksDetails/index.wxss +++ b/pages/digitalTextbooks/digitalTextbooksDetails/index.wxss @@ -19,10 +19,7 @@ } .book-img { - width: 240rpx; - min-height: 340rpx; - box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.16); - padding: 15rpx; + border: 1rpx solid #ccc; } .setCoolect { @@ -34,9 +31,8 @@ } .imageBox { - width: 210rpx; + width: 220rpx; height: 310rpx; - margin: 0 auto; } .bookContent { @@ -71,15 +67,15 @@ .certificate { display: flex; - align-items: center; justify-content: space-around; + align-items: center; width: 100%; height: 120rpx; border-radius: 0 0 20rpx 20rpx; } .book-box { - background: linear-gradient(to right, #FFB400, #FF6C00); + background: linear-gradient(to right, #FF6C00, #FFB400); border-radius: 0 0 20rpx 20rpx; } @@ -92,23 +88,9 @@ padding-bottom: 20rpx; } -.publish { - display: flex; - align-items: center; - justify-content: center; - width: 300rpx; - height: 80rpx; - background-color: #fff; -} -.curriculum { - display: flex; - align-items: center; - justify-content: center; - width: 300rpx; - height: 80rpx; - background-color: #fff; -} + + .t-tabs__item-inner { flex-direction: column; @@ -205,9 +187,10 @@ -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; - color: #333; + font-weight: bold; - font-size: 28rpx; + font-size: 25rpx; + color: #333333; } .page-bookService { @@ -222,24 +205,26 @@ bottom: 0; width: 100%; height: 110rpx; - margin-bottom: env(safe-area-inset-bottom); display: flex; flex-direction: row; } .trialReading { - width: 50%; + width: 175rpx; height: 110rpx; border-right: 1px solid #DDD; background-color: #fff; display: flex; justify-content: center; align-items: center; + flex-direction: column; + border-left: 1rpx solid #DDDDDD; + } .shopCarColor { - width: 350rpx; + width: 200rpx; height: 110rpx; border-right: 1px solid #DDD; color: #fff; @@ -250,6 +235,164 @@ } .buyColor { + width: 200rpx; + height: 110rpx; + border-right: 1px solid #DDD; + color: #fff; + background-color: #f04d3b; + display: flex; + justify-content: center; + align-items: center; +} + +.suggestion { + width: 35rpx; + height: 35rpx; +} + +.proposal { + width: 250rpx; + display: flex; + justify-content: center; + align-items: center; + /* border-right: 1rpx solid #fff; */ +} + +.frame { + width: 2rpx; + height: 72rpx; + background-color: #fff; + opacity: 0.2; +} + +.information { + color: #FFFFFF; + flex: 1; + display: flex; + justify-content: space-around; +} + +.proposalText { + font-weight: 400; + font-size: 25rpx; + color: #FFFFFF; + margin-left: 10rpx; +} + +.informationPrice { + display: flex; + flex-direction: row; + margin-right: 30rpx; +} + +.fixedPrice { + display: flex; + flex-direction: row; +} + + + +.main-box { + width: 100vw; + /* min-height: 89vh; */ + margin-top: 30rpx; +} + +.top-tab { + display: flex; + align-items: center; + justify-content: space-around; + width: 750rpx; + min-height: 70rpx; + overflow-x: scroll; + border-bottom: 2rpx solid #EFF0F1; + padding-bottom: 30rpx; + +} + +.tabBox { + min-width: 130rpx; + display: flex; + justify-content: center; +} + +.tab-view { + width: 100%; + height: 100%; +} + +.view-color1 { + /* background-color: palegoldenrod; */ +} + +.view-color2 { + /* background-color: palegreen; */ +} + +.view-color3 { + /* background-color: paleturquoise; */ +} + +.view-color4 { + /* background-color: #ccc; */ +} + +.view-color5 { + /* background-color: gold; */ +} + +.top-label-sel { + font-weight: bold; + border-bottom: solid 5rpx #FF6C00; +} + +.scrollView { + /* height: calc(100vh - 300rpx); */ + height: 100vh; + /* min-height: 86vh; */ +} + +.contentBox { + width: 100%; + /* height: 660rpx; */ + height: 100%; + overflow: scroll; +} + +.certificateChart { + display: flex; + flex-direction: row; + margin-top: 30rpx; + margin-left: 40rpx; +} + +.chart { + width: 230rpx; + height: 325rpx; + border: 1rpx solid #ccc; + margin-right: 50rpx; +} + + +.noData {} + +.collection { + width: 175rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background-color: #fff; +} + +.collectionImage { + width: 35rpx; + height: 35rpx; + margin-bottom: 5rpx; +} + + +.reading { width: 100%; height: 110rpx; border-right: 1px solid #DDD; @@ -258,4 +401,16 @@ display: flex; justify-content: center; align-items: center; +} + +.correlationAuthor { + word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + font-weight: 400; + font-size: 22rpx; + color: #333333; + margin: 15rpx 0; } \ No newline at end of file -- Gitblit v1.9.1