From 4c46ea24641b5c1e18c55eb86477d0e0bc444580 Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期二, 18 六月 2024 17:52:47 +0800 Subject: [PATCH] 数字课程详情 --- static/images/digitalCourses/shikan@2x.png | 0 static/images/digitalCourses/shuzijiaocai@2x.png | 0 static/images/digitalCourses/back@2x(1).png | 0 static/images/digitalCourses/biji/icon@2x.png | 0 static/images/digitalCourses/jibenxinxi @2x.png | 0 static/images/digitalCourses/link@2x.png | 0 pages/digitalCourses/digitalCoursesDetails/index.wxss | 326 +++++++++++++++++ pages/digitalCourses/digitalCoursesDetails/index.wxml | 229 +++++++++++ static/images/digitalCourses/zhengshushenqing@2x.png | 0 static/images/digitalCourses/back@2x.png | 0 static/images/digitalCourses/zuozhejianjie@2x(1).png | 0 static/images/digitalCourses/back@2x(4).png | 0 pages/digitalCourses/digitalCoursesDetails/index.skeleton.wxss | 107 +++++ pages/digitalCourses/digitalCoursesDetails/index.skeleton.wxml | 153 ++++++++ pages/digitalCourses/digitalCoursesDetails/index.js | 297 +++++++++++++++ static/images/digitalCourses/buy@2x.png | 0 static/images/digitalCourses/jibenxinxi-t@2x.png | 0 static/images/digitalCourses/back@2x(3).png | 0 static/images/digitalCourses/square@2x.png | 0 pages/digitalCourses/digitalCoursesDetails/index.json | 12 static/images/digitalCourses/tiwen-click@2x.png | 0 pages/digitalCourses/index.wxss | 2 static/images/digitalCourses/tiwen@2x.png | 0 static/images/digitalCourses/back@2x(2).png | 0 static/images/digitalCourses/zuozhejianjie@2x.png | 0 static/images/digitalCourses/jiaoxueziyuan@2x.png | 0 static/images/digitalCourses/back@2x(5).png | 0 static/images/digitalCourses/jiaoxueziyuan.png | 0 static/images/digitalCourses/shidu@2x.png | 0 29 files changed, 1,121 insertions(+), 5 deletions(-) diff --git a/pages/digitalCourses/digitalCoursesDetails/index.js b/pages/digitalCourses/digitalCoursesDetails/index.js index 423eb66..5444f63 100644 --- a/pages/digitalCourses/digitalCoursesDetails/index.js +++ b/pages/digitalCourses/digitalCoursesDetails/index.js @@ -1,18 +1,104 @@ // pages/digitalCourses/digitalCoursesDetails/index.js +const app = getApp() +import Toast from "tdesign-miniprogram/toast"; Page({ /** * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + scrollJudge: true, + loading: true, + digitalsData: [], + tabValue: 0, + learnResourceIcon: { + name: "/static/images/digitalTextbooks/shengshu-t@2x.png", + }, + learnResourceClickIcon: { + name: "/static/images/digitalTextbooks/zhengshu-t-click@3x.png", + }, + briefIcon: { + name: "/static/images/digitalTextbooks/jibenxinxi-t@2x.png", + }, + briefIconClick: { + name: "/static/images/digitalTextbooks/jibenxinxi-t-click@3x.png", + }, + courseLearning: { + name: "/static/images/digitalCourses/jiaoxueziyuan@2x.png" + }, + courseLearningClick: { + name: "/static/images/digitalCourses/jiaoxueziyuan.png" + }, + learningNotes: { + name: "/static/images/digitalCourses/biji锛廼con@2x.png" + }, + learningNotesClick: { + name: "/static/images/bookService/detail/biji-click-icon.png", + }, + + onlineQuestioning: { + name: "/static/images/digitalCourses/tiwen@2x.png" + }, + onlineQuestioningClick: { + name: "/static/images/digitalCourses/tiwen-click@2x.png" + }, + + dialogBox: false }, + formatDate(dateString) { + if (!dateString) { + return ""; + } + const match = dateString.match( + /^(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/ + ); + if (!match) { + throw new Error("Invalid date format"); + } + const [, year, month, day, hours, minutes, seconds] = match; + const date = new Date( + parseInt(year, 10), + parseInt(month, 10) - 1, + parseInt(day, 10), + parseInt(hours, 10), + parseInt(minutes, 10), + parseInt(seconds, 10) + ); + + if (isNaN(date.getTime())) { + throw new Error("Invalid date"); + } + + // 鐢变簬灏忕▼搴忕幆澧冨彲鑳戒笉鏀寔 Intl.DateTimeFormat锛屾垜浠娇鐢ㄧ畝鍖栫殑鏍煎紡鍖栨柟娉� + const formatted = `${year}骞�${this.formatMonth(month)}`; + return formatted; + }, + formatMonth(month) { + const months = [ + "1鏈�", + "2鏈�", + "3鏈�", + "4鏈�", + "5鏈�", + "6鏈�", + "7鏈�", + "8鏈�", + "9鏈�", + "10鏈�", + "11鏈�", + "12鏈�", + ]; + return months[parseInt(month, 10) - 1]; + }, /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { console.log(options); + this.digitalCoursesDetailsGet(options.id) + }, /** @@ -62,5 +148,216 @@ */ onShareAppMessage() { + }, + digitalCoursesDetailsGet(digitalTextId) { + + let query = { + path: '*', + queryType: '*', + productId: digitalTextId, + storeInfo: 'jsek_digitalCourses', + coverSize: { + height: 300 + }, + fields: { + seriesName: [], + author: [], + isbn: [], + publicationDate: [], + bookClassification: [], + paperPrice: [], + JDLink: [], + tmallLink: [], + dangdangLink: [], + weidianLink: [], + content: [], + authorIntroduction: [], + isApplyBook: [], + isSell: [], + pdf: [], + protectedEpub: [], + probationPage: [], //pdf璇曡椤垫暟 + freeEpubPage: [], + courseLeader: [], + affiliatedUnit: [], + publishingUnit: [], + classHours: [], + productLinkPath: [] + //epub璇曡鐧惧垎姣� + } + } + app.MG.store.getProductDetail(query).then(res => { + console.log(res); + res.datas.publicationDate = this.formatDate(res.datas.publicationDate) + res.datas.price = res.datas.price.toFixed(2) + + wx.setNavigationBarTitle({ + title: res.datas.name, + }) + + this.setData({ + digitalsData: res.datas, + loading: false + }) + }) + }, + onTabsChange(event) { + + const value = event.detail.value + this.setData({ + tabValue: value + }) + console.log(this.data.tabValue); + }, + + + // 鍥句功娣诲姞璐墿杞� + async addBookShopcCar() { + if (!this.data.expire) { + const shoppingCartGetId = []; + let query = { + start: 0, + size: 9999, + filterList: [], + searchList: [], + }; + const res = await app.MG.store.getShoppingCartProductList(query); + res.datas.forEach((item) => { + shoppingCartGetId.push(item.saleMethod.id); + }); + const determine = shoppingCartGetId.some( + (item) => item == this.data.digitalsData.defaultSaleMethodId + ); + if (!determine) { + let query = { + requests: [{ + saleMethodId: this.data.digitalsData.defaultSaleMethodId, + storeEventId: null, + agentCode: "鐢靛瓙涔�", + }, ], + }; + const addRes = app.MG.store.addShoppingCart(query); + this.showSuccessToast(); + } else { + Toast({ + context: this, + selector: "#t-toast", + message: "璇ヤ功宸插湪璐墿杞︼紝璇峰嬁閲嶅娣诲姞", + theme: "warning", + direction: "column", + }); + } + } else { + wx.showToast({ + title: "鍟嗗搧涓嶅湪鏈夋晥鏈�", + icon: "none", + duration: 1000, + }); + } + }, + showSuccessToast() { + Toast({ + context: this, + selector: "#t-toast", + message: "娣诲姞鎴愬姛", + theme: "success", + direction: "column", + }); + }, + + //璐拱鎸夐挳 + + async buyBtn() { + if (!this.data.expire) { + let bookOrdersId = ""; + let query = { + remarks: "鐢靛瓙涔�", + requests: [{ + saleMethodId: this.data.digitalsData.defaultSaleMethodId, + count: 1, + }, ], + }; + // 鍙戣捣璁㈠崟鍒濆鍖栬姹傚苟绛夊緟缁撴灉 + const res = await app.MG.store.initOrder(query); + // 鑾峰彇璁㈠崟鍙峰苟璧嬪�肩粰 orderNumber.value + console.log(res, 'res456'); + bookOrdersId = res.orderNumber; + // 妫�鏌ヨ鍗曞彿鏄惁瀛樺湪 + if (bookOrdersId) { + if (this.data.digitalsData.price == "0.00") { + app.MG.store + .confirmOrder({ + orderNum: bookOrdersId, + }) + .then((res) => { + this.digitalTextbooksDetailsGet(this.data.digitalTextId) + if (res) { + wx.showToast({ + title: "棰嗗彇鎴愬姛", + icon: "none", + duration: 1000, + }); + this.getBookInfo(this.data.bookDetail.id); + } + }); + } else { + const url = "/pages/cart/paymentPage/index?orderNumber=" + bookOrdersId + '&onNorderSaleMethod=' + res.saleMethodLinks[0].orderSaleMethod.id; + wx.navigateTo({ + url, + }); + } + } else { + console.log(222); + } + } else { + wx.showToast({ + title: "鍟嗗搧涓嶅湪鏈夋晥鏈�", + icon: "none", + duration: 1000, + }); + } + }, + showDialog(e) { + const { + key + } = e.currentTarget.dataset; + this.setData({ + [key]: true, + dialogKey: key + }); + }, + + closeDialog() { + const { + dialogKey + } = this.data; + this.setData({ + [dialogKey]: false + }); + }, + onCertificate() { + + + var page = getCurrentPages().pop(); // 鑾峰彇褰撳墠椤甸潰瀹炰緥 + page.setData({ + // 鍔ㄦ�佽缃姝㈡粴鍔ㄧ殑鏍峰紡 + disableScrollStyle: 'overflow: hidden;' + }); + this.setData({ + dialogBox: true, + scrollJudge: '' + }) + }, + closeDialog() { + this.setData({ + dialogBox: false, + scrollJudge: true + }) + }, + confirmM() { + this.setData({ + dialogBox: false, + scrollJudge: true + }) } }) \ No newline at end of file diff --git a/pages/digitalCourses/digitalCoursesDetails/index.json b/pages/digitalCourses/digitalCoursesDetails/index.json index 8835af0..e247451 100644 --- a/pages/digitalCourses/digitalCoursesDetails/index.json +++ b/pages/digitalCourses/digitalCoursesDetails/index.json @@ -1,3 +1,13 @@ { - "usingComponents": {} + "component": true, + "usingComponents": { + "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-empty": "tdesign-miniprogram/empty/empty", + "t-button": "tdesign-miniprogram/button/button", + "t-input": "tdesign-miniprogram/input/input", + "t-dialog": "tdesign-miniprogram/dialog/dialog" + } } \ No newline at end of file diff --git a/pages/digitalCourses/digitalCoursesDetails/index.skeleton.wxml b/pages/digitalCourses/digitalCoursesDetails/index.skeleton.wxml new file mode 100644 index 0000000..5223db5 --- /dev/null +++ b/pages/digitalCourses/digitalCoursesDetails/index.skeleton.wxml @@ -0,0 +1,153 @@ +<!-- +姝ゆ枃浠朵负寮�鍙戣�呭伐鍏风敓鎴愶紝鐢熸垚鏃堕棿: 2024/6/18涓嬪崍5:18:53 +浣跨敤鏂规硶锛� +鍦� D:\course_of_growth\jsekXcx\jsek-applet\pages\digitalCourses\digitalCoursesDetails\index.wxml 寮曞叆妯℃澘 + +``` +<import src="index.skeleton.wxml"/> +<template is="skeleton" wx:if="{{loading}}" /> +``` + +鍦� D:\course_of_growth\jsekXcx\jsek-applet\pages\digitalCourses\digitalCoursesDetails\index.wxss 涓紩鍏ユ牱寮� +``` +@import "./index.skeleton.wxss"; +``` + +鏇村璇︾粏淇℃伅鍙互鍙傝�冩枃妗o細https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html +--> +<template name="skeleton"> + <view class="sk-container"> + <view> + <view class="digital"> + <view class="book-box sk-image"> + <view class="digitalCoursesDetailsTitle"> + <view class="imageBox"> + <image mode="true" class="sk-image"></image> + </view> + <view class="nameBox sk-transparent sk-text-14-2857-649 sk-text"> 鍚灄宕囧痉鑰佸笀璁插熀纭�鏁欒偛</view> + <view> + <viwe class="styleCssBox"> + <view style="width: 85px;" class="sk-transparent sk-text-14-2857-501 sk-text"> ISBN锛� </view> + <view class="sk-transparent sk-opacity">-</view> + </viwe> + <viwe class="styleCssBox"> + <view style="width: 85px;" class="sk-transparent sk-text-14-2857-24 sk-text">鍑虹増鏃堕棿锛�</view> + <view class="sk-transparent sk-opacity">-</view> + </viwe> + <viwe class="styleCssBox"> + <view style="width: 85px;" class="sk-transparent sk-text-14-2857-583 sk-text">璇鹃璐熻矗浜猴細</view> + <view class="sk-transparent sk-text-14-2857-492 sk-text"> 鏋楀磭寰�</view> + </viwe> + <viwe class="styleCssBox"> + <view style="width: 85px;" class="sk-transparent sk-text-14-2857-800 sk-text">鎵�灞炲崟浣嶏細</view> + <view class="sk-transparent sk-opacity">-</view> + </viwe> + <viwe class="styleCssBox"> + <view style="width: 85px;" class="sk-transparent sk-text-14-2857-931 sk-text">鍑虹増鍗曚綅锛�</view> + <view class="sk-transparent sk-opacity">-</view> + </viwe> + <image class="right-background sk-image"></image> + </view> + </view> + <view class="certificate"> + <view style="margin-left: 15px;" class="sk-transparent">浠锋牸锛� + <text class="sk-transparent sk-text-14-2857-22 sk-text">锟�489.00</text> + </view> + <view style="margin-right: 15px;" class="sk-transparent">鍏� + <text></text>璇炬椂 + </view> + </view> + </view> + </view> + <view class="tabBox"> + <view class="t-tabs tabs--t-tabs t-tabs--top tabs--t-tabs--top custom-tabs" style="true"> + <view class="t-sticky sticky--t-sticky tabs--t-tabs__sticky tabs--t-tabs__sticky--top" style="z-index:1;;"> + <view class="t-sticky__content sticky--t-sticky__content " style="z-index:1;;"> + <view class="t-tabs__wrapper tabs--t-tabs__wrapper t-tabs__wrapper--line tabs--t-tabs__wrapper--line"> + <scroll-view enable-flex="true" enable-passive="true" enhanced="true" scroll-anchoring="true" scroll-with-animation="true" class="t-tabs__scroll tabs--t-tabs__scroll t-tabs__scroll--top tabs--t-tabs__scroll--top t-tabs__scroll--split tabs--t-tabs__scroll--split sk-pseudo sk-pseudo-circle" scroll-left="0" scroll-x="true"> + <view class="t-tabs__nav tabs--t-tabs__nav t-tabs__nav--top tabs--t-tabs__nav--top" style="scroll-snap-align: none;"> + <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 t-tabs__item--active tabs--t-tabs__item--active " data-index="0"> + <view class="t-tabs__item-inner tabs--t-tabs__item-inner t-tabs__item-inner--line tabs--t-tabs__item-inner--line t-tabs__item-inner--active tabs--t-tabs__item-inner--active 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__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="1"> + <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__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"> + <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__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"> + <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__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> + </view> + <view class="t-tabs__track tabs--t-tabs__track t-tabs__track--top tabs--t-tabs__track--top " style="-webkit-transform: translateX(36px);transform: translateX(36px);"></view> + </view> + </scroll-view> + </view> + </view> + </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="fe3987bf--t_tabs_9_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-513 sk-text"> 璇剧▼浠嬬粛</view> + </view> + <view style="margin: 15px; margin-bottom: 65px; min-height:130px ;"> + <view class="noDataBox"> + <view class=" t-empty empty--t-empty" style="true"> + <view class="t-empty__thumb empty--t-empty__thumb"> + <view class="t-icon icon--t-icon empty--t-empty__icon empty--undefined" style="true"> + <label class="t-icon-folder-open icon--t-icon-folder-open t-icon-base icon--t-icon-base sk-pseudo sk-pseudo-circle"></label> + </view> + </view> + <view class="t-empty__description empty--t-empty__description "></view> + <view class="t-empty__actions empty--t-empty__actions t-class-actions empty--t-class-actions"></view> + </view> + </view> + </view> + </view> + </view> + </view> + </view> + </view> + <view class="box-bottom"> + <view class="application"> + <view class="applicationImageBox"> + <image mode="true" class="sk-image"></image> + </view> + <view class="sk-transparent sk-text-14-2857-181 sk-text">璇佷功鐢宠</view> + </view> + <view class="shopCarColor sk-transparent sk-text-14-2857-195 sk-text">鍔犲叆璐墿杞�</view> + <view class="buyColor sk-transparent sk-text-14-2857-148 sk-text">绔嬪嵆璐拱</view> + </view> + </view> + </view> +</template> \ No newline at end of file diff --git a/pages/digitalCourses/digitalCoursesDetails/index.skeleton.wxss b/pages/digitalCourses/digitalCoursesDetails/index.skeleton.wxss new file mode 100644 index 0000000..baba683 --- /dev/null +++ b/pages/digitalCourses/digitalCoursesDetails/index.skeleton.wxss @@ -0,0 +1,107 @@ +/* +姝ゆ枃浠朵负寮�鍙戣�呭伐鍏风敓鎴愶紝鐢熸垚鏃堕棿: 2024/6/18涓嬪崍5:18:53 + +鍦� D:\course_of_growth\jsekXcx\jsek-applet\pages\digitalCourses\digitalCoursesDetails\index.wxss 涓紩鍏ユ牱寮� +``` +@import "./index.skeleton.wxss"; +``` + +鏇村璇︾粏淇℃伅鍙互鍙傝�冩枃妗o細https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html +*/ +.sk-transparent { + color: transparent !important; + } +.sk-text-14-2857-649 { + 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 { + background-origin: content-box !important; + background-clip: content-box !important; + background-color: transparent !important; + color: transparent !important; + background-repeat: repeat-y !important; + } +.sk-text-14-2857-501 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 33.6000rpx; + position: relative !important; + } +.sk-opacity { + opacity: 0 !important; + } +.sk-text-14-2857-24 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 33.6000rpx; + position: relative !important; + } +.sk-text-14-2857-583 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 33.6000rpx; + position: relative !important; + } +.sk-text-14-2857-492 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 33.6000rpx; + position: relative !important; + } +.sk-text-14-2857-800 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 33.6000rpx; + position: relative !important; + } +.sk-text-14-2857-931 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 33.6000rpx; + position: relative !important; + } +.sk-text-14-2857-22 { + 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-513 { + 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-181 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 30.8000rpx; + position: relative !important; + } +.sk-text-14-2857-195 { + 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-148 { + background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important; + background-size: 100% 44.8000rpx; + position: relative !important; + } +.sk-image { + background: #EFEFEF !important; + } +.sk-pseudo::before, .sk-pseudo::after { + background: #EFEFEF !important; + background-image: none !important; + color: transparent !important; + border-color: transparent !important; + } +.sk-pseudo-rect::before, .sk-pseudo-rect::after { + border-radius: 0 !important; + } +.sk-pseudo-circle::before, .sk-pseudo-circle::after { + border-radius: 50% !important; + } +.sk-container { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; + background-color: transparent; + } diff --git a/pages/digitalCourses/digitalCoursesDetails/index.wxml b/pages/digitalCourses/digitalCoursesDetails/index.wxml index 5c35361..7acb381 100644 --- a/pages/digitalCourses/digitalCoursesDetails/index.wxml +++ b/pages/digitalCourses/digitalCoursesDetails/index.wxml @@ -1,2 +1,227 @@ -<!--pages/digitalCourses/digitalCoursesDetails/index.wxml--> -<text>鏁板瓧璇剧▼璇︽儏椤�</text> \ No newline at end of file +<import src="index.skeleton.wxml" /> +<template is="skeleton" wx:if="{{loading}}" /> + + +<scroll-view scroll-y="{{scrollJudge}}" wx:else class="outsideContentBox"> + + <view> + + + + <view class="digital"> + <view class="book-box"> + <view class="digitalCoursesDetailsTitle"> + + <view class="imageBox"> + <image src="{{digitalsData.icon}}" mode="" /> + </view> + + <view class="nameBox">{{digitalsData.name}}</view> + + + <view> + <viwe class="styleCssBox"> + <view style="width: 170rpx;"> ISBN锛� </view> + <view wx:if="{{digitalsData.isbn}}"> {{digitalsData.isbn}} </view> + <view wx:else="">-</view> + </viwe> + <viwe class="styleCssBox"> + <view style="width: 170rpx;">鍑虹増鏃堕棿锛�</view> + <view wx:if="{{digitalsData.publicationDate}}">{{digitalsData.publicationDate}} </view> + <view wx:else="">-</view> + </viwe> + <viwe class="styleCssBox"> + <view style="width: 170rpx;">璇鹃璐熻矗浜猴細</view> + <view wx:if="{{digitalsData.courseLeader}}"> {{digitalsData.courseLeader }}</view> + <view wx:else="">-</view> + </viwe> + <viwe class="styleCssBox"> + <view style="width: 170rpx;">鎵�灞炲崟浣嶏細</view> + <view wx:if="{{digitalsData.affiliatedUnit}}"> {{ digitalsData.affiliatedUnit}}</view> + <view wx:else="">-</view> + </viwe> + <viwe class="styleCssBox"> + <view style="width: 170rpx;">鍑虹増鍗曚綅锛�</view> + <view wx:if="{{digitalsData.publishingUnit}}">{{digitalsData.publishingUnit}} </view> + <view wx:else="">-</view> + </viwe> + <image src="/static/images/bookService/detail/square.png" class="right-background" /> + </view> + + </view> + + <view class="certificate"> + + <view style="margin-left: 30rpx;">浠锋牸锛� <text>锟{digitalsData.price}}</text></view> + <view style="margin-right: 30rpx;">鍏�<text>{{ digitalsData.classHours}}</text>璇炬椂</view> + + </view> + </view> + + + + + + + </view> + + + <view class="tabBox"> + <t-tabs defaultValue="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel"> + <t-tab-panel icon="{{ tabValue == '0' ? briefIconClick : briefIcon}}" label="鍩烘湰淇℃伅" value="0" style="{{tabPanelstyle}}"> + <!-- <scroll-view scroll-y="{{true}}" class="outsideContentBox"> --> + + <view class="rubricBox"> + <view class="rubricimgBox"> + <image src="/static/images/bookService/detail/label.png" mode="" /> + </view> + <view class="basic"> 璇剧▼浠嬬粛</view> + </view> + <view style="margin: 30rpx; margin-bottom: 130rpx; min-height:260rpx ;"> + <rich-text wx:if="{{digitalsData.content}}" nodes="{{digitalsData.content}}" style="{{richStyle}}"></rich-text> + + + + <view wx:else="" class="noDataBox"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> + </view> + + + </view> + + <view class="rubricBox"> + <view class="rubricimgBox"> + <image src="/static/images/bookService/detail/label.png" mode="" /> + </view> + <view class="basic"> 涓昏鑰佸笀</view> + </view> + + <view class="lecturer"> + <view class="lecturerImangBox"> + <image src="" mode="" /> + </view> + <view class="lecturerInformation"> + + <view class="lecturerName"> + <view style="font-weight: bold; font-size: 29rpx; color: #333333;"> + + 鏋楀磭寰� + + </view> + <view style="font-weight: 400; font-size: 25rpx; color: #949494;">璁插笀</view> + </view> + <view class="lecturerContent">涓浗瀛︾敓鍙戝睍鏍稿績绱犲吇鐮斿埗棣栧腑涓撳锛屽洿缁曞ぇ涓皬瀛︽暀鏉愬缓璁惧紑灞曚簡涓�绯诲垪寮�鍒涙�с�佸鍩烘�у伐浣溿�傚缓绔嬪畬鍠勪簡鎴戝浗鍙戝睍蹇冪悊瀛︽暀鏉愪綋绯汇��</view> + + + </view> + + </view> + + + + <!-- </scroll-view> --> + + + </t-tab-panel> + <t-tab-panel icon="{{ tabValue == '1' ? learnResourceClickIcon : learnResourceIcon}}" label="璇佷功淇℃伅" value="1" 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> + + <!-- + <view class="noDataBox"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> + + </view> --> + + + + </t-tab-panel> + <t-tab-panel icon="{{ tabValue == '2' ? courseLearningClick : courseLearning}}" label="璇剧▼瀛︿範" value="2" style="{{tabPanelstyle}}">閫夐」涓夊唴瀹�</t-tab-panel> + <t-tab-panel icon="{{ tabValue == '3' ? learningNotesClick : learningNotes}}" label="瀛︿範绗旇" value="3" style="{{tabPanelstyle}}">閫夐」鍥涘唴瀹�</t-tab-panel> + <t-tab-panel icon="{{ tabValue == '4' ? onlineQuestioningClick : onlineQuestioning}}" label="鍦ㄧ嚎鎻愰棶" value="4" style="{{tabPanelstyle}}">閫夐」浜斿唴瀹�</t-tab-panel> + </t-tabs> + + </view> + + + <view class="box-bottom"> + + + + <view class="application" bind:tap="onCertificate"> + <view class="applicationImageBox"> + <image src="/static/images/digitalCourses/zhengshushenqing@2x.png" mode="" /> + </view> + <view>璇佷功鐢宠</view> + </view> + + <view class="shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!isBuy}}">鍔犲叆璐墿杞�</view> + <view class="buyColor" bind:tap="buyBtn" wx:if="{{!isBuy}}">绔嬪嵆璐拱</view> + + + + + + </view> + + + + + + + + + <t-toast id="t-toast" /> + + + + + + + + </view> + + +</scroll-view> + + +<!-- 寮圭獥 --> +<view wx:if="{{dialogBox}}"> + <view class="popup-box" bindtap="closeDialog"></view> + <view class="info-center" style="top:{{height*0.4}}px;"> + + + <view> + <view class="row-info"> + <view class="body"> + <view class="dialog-title">瀛︿範璇佷功鐢宠</view> + <view style="width: 100%; height: 2rpx; background-color: #F4F4F4;"></view> + <view class="input-box"> + <t-input style="{{inputStyle}}" class="input" placeholder="璇疯緭鍏ョ湡瀹炲鍚�" value="{{input}}" bind:change="inputChange"></t-input> + </view> + </view> + <view class="row-btn"> + <view class="left-btn" bindtap="closeDialog">鍙栨秷</view> + <view class="right-btn" bindtap="confirmM">纭</view> + </view> + </view> + </view> + + + </view> +</view> \ No newline at end of file diff --git a/pages/digitalCourses/digitalCoursesDetails/index.wxss b/pages/digitalCourses/digitalCoursesDetails/index.wxss index 5af9dd4..9e8523c 100644 --- a/pages/digitalCourses/digitalCoursesDetails/index.wxss +++ b/pages/digitalCourses/digitalCoursesDetails/index.wxss @@ -1 +1,325 @@ -/* pages/digitalCourses/digitalCoursesDetails/index.wxss */ \ No newline at end of file +/* pages/digitalCourses/digitalCoursesDetails/index.wxss */ +@import "./index.skeleton.wxss"; + +image { + width: 100%; + height: 100%; +} + +.digitalCoursesDetailsTitle { + background: #FFFFFF; + /* box-shadow: 0rpx 9rpx 18rpx 2rpx rgba(0, 0, 0, 0.08); */ + border-radius: 0 0 20rpx 20rpx; + padding: 30rpx; + position: relative; +} + +.imageBox { + width: 690rpx; + height: 400rpx; +} + +.nameBox { + font-weight: 800; + font-size: 33rpx; + color: #000000; + margin: 30rpx 0; +} + + +.styleCssBox { + display: flex; + font-weight: 400; + font-size: 25rpx; + color: #333333; + margin: 30rpx 0; +} + +.book-box { + background: linear-gradient(to right, #FF6C00, #FFB400); + border-radius: 0 0 20rpx 20rpx; +} + +.certificate { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + height: 120rpx; + border-radius: 0 0 20rpx 20rpx; + color: #fff; +} + +.digital { + background-color: #F2F3F8; + padding-bottom: 20rpx; +} + +.right-background { + width: 160rpx; + height: 160rpx; + position: absolute; + top: 480rpx; + right: -50rpx; + z-index: 0; +} + +.t-tabs__item--active { + color: #FF6C00 !important; +} + +.t-tabs__track { + background-color: #FF6C00 !important; +} + +.tabBox { + background-color: #fff; + border-radius: 18rpx 18rpx 0rpx 0rpx; +} + +.t-tabs__item-inner { + flex-direction: column; + +} + +.t-tabs__track { + /* bottom: -20rpx !important; */ +} + +.rubricBox { + display: flex; + flex-direction: row; + margin: 50rpx; + margin-bottom: 0; + margin-left: 30rpx; +} + +.rubricimgBox { + width: 40rpx; + height: 45rpx; +} + +.basic { + margin-left: 18rpx; + font-size: 32rpx; + color: #333; + font-weight: bold; +} + +.lecturer { + padding: 30rpx; + display: flex; + margin-bottom: 170rpx; +} + + +.lecturerImangBox { + width: 140rpx; + height: 180rpx; + border: 2rpx solid #ccc; +} + +.lecturerInformation { + width: 518rpx; + height: 143rpx; + margin-left: 30rpx; +} + +.lecturerName { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; +} + +.lecturerContent { + font-weight: 400; + font-size: 25rpx; + color: #333333; + line-height: 35rpx; +} + +.outsideContentBox { + height: calc(100vh - 120rpx); +} + +.box-bottom { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + height: 110rpx; + margin-bottom: env(safe-area-inset-bottom); + display: flex; + flex-direction: row; + background-color: #ccc; +} + +.shopCarColor { + width: 200rpx; + height: 110rpx; + border-right: 1px solid #DDD; + color: #fff; + background-color: #f0ad36; + display: flex; + justify-content: center; + align-items: center; +} + +.buyColor { + width: 200rpx; + height: 110rpx; + border-right: 1px solid #DDD; + color: #fff; + background-color: #f04d3b; + display: flex; + justify-content: center; + align-items: center; +} + +.application { + width: 351rpx; + /* height: 100rpx; */ + background: #FFF; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + border-top: 2rpx solid #eee; + font-weight: 400; + font-size: 22rpx; + color: #010101; +} + +.applicationImageBox { + width: 35rpx; + height: 35rpx; + margin-bottom: 5rpx; +} + + +.certificateChart { + display: flex; + flex-direction: row; + margin-top: 30rpx; + margin-left: 40rpx; +} + +.chart { + width: 230rpx; + height: 325rpx; + border: 1rpx solid #ccc; + margin-right: 50rpx; +} + +.custom-panel { + min-height: 400px; + +} + + + + +.wrapper { + margin-bottom: 32rpx; +} + +.placeholder { + color: var(--td-text-color-placeholder); + line-height: 96rpx; + height: 96rpx !important; + display: flex; + align-items: center; +} + +.dialog-input { + padding-top: 12px; + padding-bottom: 12px; + text-align: left; + margin-top: 32rpx; + border-radius: 8rpx; + background-color: var(--td-bg-color-page); + box-sizing: border-box; +} + +/* 钂欏眰 */ +.popup-box { + position: absolute; + z-index: 99; + top: 0; + background-color: rgba(0, 0, 0, 0.5); + width: 100%; + height: 100vh; +} + +.info-center { + position: fixed; + top: 32%; + z-index: 999; + background-color: white; + align-items: center; + justify-content: center; + border-radius: 10rpx; + width: 80%; + margin-left: 10%; + margin-right: 10%; +} + +.row-info .body { + min-height: 300rpx; +} + +.dialog-title { + padding: 20rpx 0; + text-align: center; + font-weight: bold; + font-size: 29rpx; + color: #333333; +} + +.input-box { + padding: 0 20rpx; + width: 92%; + margin-bottom: 16rpx; + margin-top: 60rpx; +} + +.row-btn { + width: 100%; + display: flex; + flex-direction: row; + align-items: center; + border-top: 1rpx solid #f1f1f1; +} + +.row-btn view { + flex: 1; + text-align: center; + margin: 20rpx 10%; + padding: 12rpx 0; + font-size: 32rpx; + border-radius: 10rpx; +} + +.left-btn { + background-color: #f1f1f1; + color: #5C5C5C; +} + +.right-btn { + background-color: #ff6c00; + color: white; +} + +.input { + --td-input-border-radius: 20rpx; + border-radius: 20rpx; + border: 2rpx solid #ccc; +} + +.t-input { + background-color: var(--td-input-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff))); + display: flex; + align-items: center; + flex: 1; + padding: var(--td-input-vertical-padding, 22rpx) !important; +} \ No newline at end of file diff --git a/pages/digitalCourses/index.wxss b/pages/digitalCourses/index.wxss index c0bbe5e..dac367f 100644 --- a/pages/digitalCourses/index.wxss +++ b/pages/digitalCourses/index.wxss @@ -138,7 +138,7 @@ display: flex; justify-content: space-between; flex-wrap: wrap; - padding: 0 15rpx; + padding: 0 25rpx; margin-top: 40rpx; } diff --git "a/static/images/digitalCourses/back@2x\0501\051.png" "b/static/images/digitalCourses/back@2x\0501\051.png" new file mode 100644 index 0000000..f9fdd8c --- /dev/null +++ "b/static/images/digitalCourses/back@2x\0501\051.png" Binary files differ diff --git "a/static/images/digitalCourses/back@2x\0502\051.png" "b/static/images/digitalCourses/back@2x\0502\051.png" new file mode 100644 index 0000000..bb24195 --- /dev/null +++ "b/static/images/digitalCourses/back@2x\0502\051.png" Binary files differ diff --git "a/static/images/digitalCourses/back@2x\0503\051.png" "b/static/images/digitalCourses/back@2x\0503\051.png" new file mode 100644 index 0000000..bb24195 --- /dev/null +++ "b/static/images/digitalCourses/back@2x\0503\051.png" Binary files differ diff --git "a/static/images/digitalCourses/back@2x\0504\051.png" "b/static/images/digitalCourses/back@2x\0504\051.png" new file mode 100644 index 0000000..bb24195 --- /dev/null +++ "b/static/images/digitalCourses/back@2x\0504\051.png" Binary files differ diff --git "a/static/images/digitalCourses/back@2x\0505\051.png" "b/static/images/digitalCourses/back@2x\0505\051.png" new file mode 100644 index 0000000..bb24195 --- /dev/null +++ "b/static/images/digitalCourses/back@2x\0505\051.png" Binary files differ diff --git a/static/images/digitalCourses/back@2x.png b/static/images/digitalCourses/back@2x.png new file mode 100644 index 0000000..f9fdd8c --- /dev/null +++ b/static/images/digitalCourses/back@2x.png Binary files differ diff --git "a/static/images/digitalCourses/biji\357\274\217icon@2x.png" "b/static/images/digitalCourses/biji\357\274\217icon@2x.png" new file mode 100644 index 0000000..7e9cceb --- /dev/null +++ "b/static/images/digitalCourses/biji\357\274\217icon@2x.png" Binary files differ diff --git a/static/images/digitalCourses/buy@2x.png b/static/images/digitalCourses/buy@2x.png new file mode 100644 index 0000000..a4f21d0 --- /dev/null +++ b/static/images/digitalCourses/buy@2x.png Binary files differ diff --git a/static/images/digitalCourses/jiaoxueziyuan.png b/static/images/digitalCourses/jiaoxueziyuan.png new file mode 100644 index 0000000..876abc0 --- /dev/null +++ b/static/images/digitalCourses/jiaoxueziyuan.png Binary files differ diff --git a/static/images/digitalCourses/jiaoxueziyuan@2x.png b/static/images/digitalCourses/jiaoxueziyuan@2x.png new file mode 100644 index 0000000..171d11f --- /dev/null +++ b/static/images/digitalCourses/jiaoxueziyuan@2x.png Binary files differ diff --git a/static/images/digitalCourses/jibenxinxi @2x.png b/static/images/digitalCourses/jibenxinxi @2x.png new file mode 100644 index 0000000..d1362b6 --- /dev/null +++ b/static/images/digitalCourses/jibenxinxi @2x.png Binary files differ diff --git a/static/images/digitalCourses/jibenxinxi-t@2x.png b/static/images/digitalCourses/jibenxinxi-t@2x.png new file mode 100644 index 0000000..dbf1f65 --- /dev/null +++ b/static/images/digitalCourses/jibenxinxi-t@2x.png Binary files differ diff --git a/static/images/digitalCourses/link@2x.png b/static/images/digitalCourses/link@2x.png new file mode 100644 index 0000000..0a91a49 --- /dev/null +++ b/static/images/digitalCourses/link@2x.png Binary files differ diff --git a/static/images/digitalCourses/shidu@2x.png b/static/images/digitalCourses/shidu@2x.png new file mode 100644 index 0000000..ea19826 --- /dev/null +++ b/static/images/digitalCourses/shidu@2x.png Binary files differ diff --git a/static/images/digitalCourses/shikan@2x.png b/static/images/digitalCourses/shikan@2x.png new file mode 100644 index 0000000..8f088d8 --- /dev/null +++ b/static/images/digitalCourses/shikan@2x.png Binary files differ diff --git a/static/images/digitalCourses/shuzijiaocai@2x.png b/static/images/digitalCourses/shuzijiaocai@2x.png new file mode 100644 index 0000000..bb2f635 --- /dev/null +++ b/static/images/digitalCourses/shuzijiaocai@2x.png Binary files differ diff --git a/static/images/digitalCourses/square@2x.png b/static/images/digitalCourses/square@2x.png new file mode 100644 index 0000000..5cd46a4 --- /dev/null +++ b/static/images/digitalCourses/square@2x.png Binary files differ diff --git a/static/images/digitalCourses/tiwen-click@2x.png b/static/images/digitalCourses/tiwen-click@2x.png new file mode 100644 index 0000000..bf5f285 --- /dev/null +++ b/static/images/digitalCourses/tiwen-click@2x.png Binary files differ diff --git a/static/images/digitalCourses/tiwen@2x.png b/static/images/digitalCourses/tiwen@2x.png new file mode 100644 index 0000000..fc3d1bc --- /dev/null +++ b/static/images/digitalCourses/tiwen@2x.png Binary files differ diff --git a/static/images/digitalCourses/zhengshushenqing@2x.png b/static/images/digitalCourses/zhengshushenqing@2x.png new file mode 100644 index 0000000..7cfed3c --- /dev/null +++ b/static/images/digitalCourses/zhengshushenqing@2x.png Binary files differ diff --git "a/static/images/digitalCourses/zuozhejianjie@2x\0501\051.png" "b/static/images/digitalCourses/zuozhejianjie@2x\0501\051.png" new file mode 100644 index 0000000..65dd187 --- /dev/null +++ "b/static/images/digitalCourses/zuozhejianjie@2x\0501\051.png" Binary files differ diff --git a/static/images/digitalCourses/zuozhejianjie@2x.png b/static/images/digitalCourses/zuozhejianjie@2x.png new file mode 100644 index 0000000..5fc8a27 --- /dev/null +++ b/static/images/digitalCourses/zuozhejianjie@2x.png Binary files differ -- Gitblit v1.9.1