From b125d3ea74d61fb8e4d7238c83906aeea52c6b4c Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期二, 12 三月 2024 14:39:55 +0800 Subject: [PATCH] 更新代码 --- pages/bookServices/examination/questionOptions/index.json | 8 pages/resourceDetails/myVideo/index.wxml | 79 + pages/bookServices/list/index.wxss | 19 static/images/bookService/examination/reset.png | 0 pages/bookServices/detail/components/teachResource/index.wxml | 8 pages/bookServices/detail/components/testResource/testResource.js | 84 + pages/bookServices/list/index.js | 32 pages/bookServices/detail/components/note/note.wxml | 63 pages/bookServices/detail/index.js | 397 ++++- pages/bookServices/detail/components/suggest/suggest.wxml | 33 pages/bookExhibitionDetails/index.wxss | 17 pages/bookServices/detail/index.wxml | 195 ++ static/images/bookService/detail/deleteHover.png | 0 pages/resourceDetails/myVideo/index.js | 243 +++ pages/retrievalPage/index.wxml | 2 pages/bookServices/list/index.json | 6 static/images/bookService/detail/edit.png | 0 pages/bookServices/examination/examination.js | 339 +++++ pages/resourceDetails/myAudio/index.json | 0 pages/bookServices/examination/questionOptions/index.wxss | 31 pages/bookExhibitionDetails/index.json | 5 pages/bookServices/detail/components/testResource/testResource.wxml | 39 static/images/bookService/examination/questionCard.png | 0 pages/bookServices/detail/components/teachResource/index.wxss | 30 pages/bookServices/examination/questionSchedule/index.json | 6 static/images/resourceDetails/jibijii.png | 0 pages/resourceDetails/myVideo/index.json | 14 static/images/bookService/examination/collect.png | 0 pages/bookServices/detail/components/note/note.wxss | 146 ++ static/images/bookService/detail/compliceHover.png | 0 static/images/bookService/detail/practice-icon.png | 0 pages/bookExhibitionDetails/index.wxml | 8 static/images/resourceDetailsMyAudio/video-bg.png | 0 static/images/resourceDetails/jibijiicon3.png | 0 pages/cart/paymentPage/index.wxml | 4 pages/bookServices/detail/index.wxss | 42 pages/bookExhibitionList/index.wxss | 17 static/images/bookService/detail/lianxi-icon.png | 0 static/images/bookService/detail/zujuan.png | 0 pages/bookServices/detail/components/suggest/suggest.js | 94 + pages/bookServices/examination/questionSchedule/index.wxss | 32 app.json | 9 static/images/resourceDetailsMyAudio/zanting.png | 0 pages/bookServices/examination/examination.wxml | 24 .prettierrc | 22 static/images/resourceDetailsMyAudio/shangyizhang.png | 0 pages/bookServices/detail/index.json | 8 pages/bookServices/examination/questionList/index.json | 7 static/images/resourceDetailsMyAudio/Full screen.png | 0 pages/bookServices/detail/components/tree/index.js | 143 ++ pages/resourceDetails/document/index.json | 3 pages/bookServices/examination/questionList/index.wxss | 25 static/images/bookService/detail/cuoti.png | 0 pages/bookExhibitionDetails/index.js | 23 static/images/bookService/detail/wodeshoucang.png | 0 pages/bookServices/assort/index.wxml | 52 pages/bookServices/detail/components/testResource/testResource.json | 7 pages/bookServices/detail/components/tree/index.wxss | 18 pages/resourceDetails/document/index.wxss | 1 pages/bookServices/detail/components/suggest/suggest.json | 6 pages/bookServices/detail/components/learnResource/learnResource.wxss | 5 pages/bookServices/examination/examination.json | 11 pages/resourceDetails/myAudio/index.wxml | 39 pages/bookServices/examination/questionSchedule/index.wxml | 11 pages/bookExhibitionList/index.wxml | 19 static/images/bookService/detail/cart.png | 0 pages/bookExhibitionList/index.json | 3 pages/bookServices/examination/examination.wxss | 23 pages/resourceDetails/myAudio/index.js | 52 static/images/resourceDetailsMyAudio/xiayizhang.png | 0 static/images/bookService/detail/feedback.png | 0 static/images/resourceDetailsMyAudio/cd.png | 0 pages/bookServices/detail/components/note/note.json | 15 pages/bookServices/detail/components/learnResource/learnResource.js | 30 pages/bookServices/examination/questionList/index.wxml | 13 pages/bookServices/examination/questionSchedule/index.js | 115 + pages/resourceDetails/myVideo/index.wxss | 162 ++ static/images/bookService/detail/test-icon.png | 0 pages/bookExhibitionList/index.js | 89 pages/bookServices/list/index.wxml | 6 pages/bookServices/assort/index.js | 45 pages/bookServices/examination/questionList/index.js | 44 pages/bookServices/detail/components/suggest/suggest.wxss | 93 + static/images/resourceDetailsMyAudio/jibiji/icon.png | 0 pages/bookServices/assort/index.wxss | 11 pages/bookServices/detail/components/note/note.js | 317 ++++ pages/resourceDetails/document/index.js | 66 + pages/resourceDetails/document/index.wxml | 6 pages/bookServices/detail/components/tree/index.wxml | 176 ++ .vscode/settings.json | 2 pages/bookServices/detail/components/learnResource/learnResource.wxml | 6 static/images/bookService/detail/note-icon.png | 0 pages/resourceDetails/myAudio/index.wxss | 66 + static/images/bookService/examination/setting.png | 0 pages/bookServices/examination/questionOptions/index.js | 23 static/images/resourceDetails/jibijiicon2.png | 0 /dev/null | 25 pages/bookServices/detail/components/testResource/testResource.wxss | 56 pages/bookServices/examination/questionOptions/index.wxml | 24 static/images/bookService/detail/makeNote.png | 0 100 files changed, 3,505 insertions(+), 389 deletions(-) diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..f36a893 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,22 @@ +{ + "overrides": [ + { + "files": "*.wxml", + "options": { + "parser": "html" + } + }, + { + "files": "*.wxss", + "options": { + "parser": "css" + } + }, + { + "files": "*.wxs", + "options": { + "parser": "babel" + } + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 8096c21..22d6d96 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -32,7 +32,7 @@ }, "editor.tabSize": 2, "[wxml]": { - "editor.defaultFormatter": "wechat.miniprogram.wxml-language-features" + "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[css]": { "editor.defaultFormatter": "HookyQR.beautify" diff --git a/app.json b/app.json index e2082ff..ededab2 100644 --- a/app.json +++ b/app.json @@ -1,7 +1,13 @@ { "pages": [ +<<<<<<< HEAD "pages/home/home", "pages/resourceDetails/index", +======= + "pages/resourceDetails/myAudio/index", + "pages/resourceDetails/myVideo/index", + "pages/resourceDetails/document/index", +>>>>>>> master "pages/retrievalPage/index", "pages/cart/paymentPage/index", "pages/cart/index", @@ -54,7 +60,8 @@ "pages/personalCenter/sampleBooks/index", "pages/personalCenter/downloads/index", "pages/personalCenter/activateProduct/index", - "pages/testLogin/index" + "pages/testLogin/index", + "pages/bookServices/examination/examination" ], "tabBar": { "custom": true, diff --git a/pages/bookExhibitionDetails/index.js b/pages/bookExhibitionDetails/index.js index 27169f6..bb04659 100644 --- a/pages/bookExhibitionDetails/index.js +++ b/pages/bookExhibitionDetails/index.js @@ -11,13 +11,29 @@ bookCreator: '', bookContent: '', bookImage: '', - bookExhibitionList: [] + bookExhibitionList: [], + navBarHeight: '', + barHeight: '', + bookName: '' }, /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + this.setData({ + navBarHeight: navBarHeight, + barHeight: systInfo.statusBarHeight, + }) + console.log(); + + + this.setData({ + bookName: options.bookName + }) const passId = options.id @@ -131,6 +147,9 @@ // wx.navigateTo({ // url: '/pages/bookExhibitionDetails/index?id?name=' + item.id + item.name // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟 // }); - } + }, + goBack() { + wx.navigateBack(); + }, }) \ No newline at end of file diff --git a/pages/bookExhibitionDetails/index.json b/pages/bookExhibitionDetails/index.json index 8835af0..02871f3 100644 --- a/pages/bookExhibitionDetails/index.json +++ b/pages/bookExhibitionDetails/index.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon" + }, + "navigationStyle": "custom" } \ No newline at end of file diff --git a/pages/bookExhibitionDetails/index.wxml b/pages/bookExhibitionDetails/index.wxml index 4c9c611..b9fcb50 100644 --- a/pages/bookExhibitionDetails/index.wxml +++ b/pages/bookExhibitionDetails/index.wxml @@ -1,5 +1,11 @@ <!--pages/bookExhibitionDetails/index.wxml--> - +<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">{{bookName}}</view> +</view> <view class="headBox"> <text class="titleBox">{{bookName}}</text> diff --git a/pages/bookExhibitionDetails/index.wxss b/pages/bookExhibitionDetails/index.wxss index 040d155..f6a4d81 100644 --- a/pages/bookExhibitionDetails/index.wxss +++ b/pages/bookExhibitionDetails/index.wxss @@ -1,6 +1,23 @@ /* pages/bookExhibitionDetails/index.wxss */ .headBox {} +.nacigationBar { + background-color: #fff; + display: flex; + align-items: center; + +} + +.navbar-title { + white-space: nowrap; + /* overflow: hidden; */ + text-overflow: ellipsis; + color: #0F1214; + font-size: 40rpx; + font-weight: bold; + margin-bottom: 5rpx; +} + .titleBox { font-weight: 800; font-size: 45rpx; diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js index 937d286..067ceae 100644 --- a/pages/bookExhibitionList/index.js +++ b/pages/bookExhibitionList/index.js @@ -56,9 +56,55 @@ value: [], options: [], }, + navBarHeight: '', + barHeight: '' + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + // console.log(this.data.filteredItems, 88888); + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + this.setData({ + navBarHeight: navBarHeight, + barHeight: systInfo.statusBarHeight, + }) + + // 鍗曞垪閫夋嫨鍣ㄩ�夐」 + const singleSelectOptions = this.data.filteredItems.map(item => ({ + label: item.name, + value: item.value, + disabled: false, + })) + + if (this.data.filteredItems = []) { + console.log(11111); + singleSelectOptions.push({ + label: '绂佺敤閫夐」', + value: 'disabled', + disabled: true, + }); + } + + // singleSelectOptions.push({ + // label: '绂佺敤閫夐」', + // value: 'disabled', + // disabled: true, + // }); + + + // 鏇存柊鏁版嵁 + this.setData({ + 'multipleSelect.options': singleSelectOptions, + }); + + }, /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 @@ -171,6 +217,7 @@ this.setData({ bookExhibitionList: list }) + //鍙栨秷 wx.hideLoading() // console.log(this.data.bookExhibitionList, '鏁版嵁'); @@ -205,41 +252,6 @@ }, - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - // console.log(this.data.filteredItems, 88888); - - // 鍗曞垪閫夋嫨鍣ㄩ�夐」 - const singleSelectOptions = this.data.filteredItems.map(item => ({ - label: item.name, - value: item.value, - disabled: false, - })) - - if (this.data.filteredItems = []) { - console.log(11111); - singleSelectOptions.push({ - label: '绂佺敤閫夐」', - value: 'disabled', - disabled: true, - }); - } - - // singleSelectOptions.push({ - // label: '绂佺敤閫夐」', - // value: 'disabled', - // disabled: true, - // }); - - - // 鏇存柊鏁版嵁 - this.setData({ - 'multipleSelect.options': singleSelectOptions, - }); - - }, // 鎬诲垎绫� @@ -326,7 +338,7 @@ const item = event.currentTarget.dataset.item; console.log(item); wx.navigateTo({ - url: '/pages/bookExhibitionDetails/index?id=' + item.id // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟 + url: '/pages/bookExhibitionDetails/index?id=' + item.id + '&bookName=' + item.name // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟 }); }, // 鎼滅储妗� @@ -336,5 +348,8 @@ }) console.log(this.data.keyword, 'keyword'); this.bookExhibitionGet() - } + }, + goBack() { + wx.navigateBack(); + }, }) \ No newline at end of file diff --git a/pages/bookExhibitionList/index.json b/pages/bookExhibitionList/index.json index 34eafc6..0b56ca0 100644 --- a/pages/bookExhibitionList/index.json +++ b/pages/bookExhibitionList/index.json @@ -8,5 +8,6 @@ "t-toast": "tdesign-miniprogram/toast/toast", "t-icon": "tdesign-miniprogram/icon/icon" }, - "onReachBottomDistance": 200 + "onReachBottomDistance": 200, + "navigationStyle": "custom" } \ No newline at end of file diff --git a/pages/bookExhibitionList/index.wxml b/pages/bookExhibitionList/index.wxml index 2e08782..1b0e4c6 100644 --- a/pages/bookExhibitionList/index.wxml +++ b/pages/bookExhibitionList/index.wxml @@ -3,16 +3,15 @@ <!-- 寮瑰嚭妗� 绂佹 --> <t-toast id="t-toast" /> - -<view class="example-search"> - <t-search model:value="{{value}}" placeholder="璇疯緭鍏ュ叧閿瘝/涔︾洰/ISBN/浣滆��" bind:submit="onSearchSubmit" /> +<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="example-search"> + <t-search model:value="{{value}}" placeholder="璇疯緭鍏ヤ功灞曞悕绉�" bind:submit="onSearchSubmit" /> + </view> </view> - - - - - - <view class="menuBox"> @@ -40,7 +39,7 @@ <view class="outside"> <view class="contentBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}"> - <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="" /> + <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFit" /> <image wx:else="" src="/static/images/bookExhibitionList/banner.png" mode="" /> <view class="textBox" title="{{item.name}}"> <text>{{item.name}}</text></view> </view> diff --git a/pages/bookExhibitionList/index.wxss b/pages/bookExhibitionList/index.wxss index 25095c9..f094d7a 100644 --- a/pages/bookExhibitionList/index.wxss +++ b/pages/bookExhibitionList/index.wxss @@ -1,5 +1,21 @@ /* pages/bookExhibitionList/index.wxss */ +.nacigationBar { + background-color: #fff; + display: flex; + align-items: center; + +} + +.navbar-title { + white-space: nowrap; + /* overflow: hidden; */ + text-overflow: ellipsis; + color: #0F1214; + font-size: 40rpx; + font-weight: bold; + margin-bottom: 5rpx; +} .outside { @@ -27,6 +43,7 @@ .textBox { + font-family: PingFang SC, PingFang SC; width: 280rpx; /* height: 75rpx; */ font-size: 25rpx; diff --git a/pages/bookServices/assort/index.js b/pages/bookServices/assort/index.js index a4a3240..cdb9bcf 100644 --- a/pages/bookServices/assort/index.js +++ b/pages/bookServices/assort/index.js @@ -1,4 +1,5 @@ // pages/bookServices/assort/index.js +import { getPublicImage } from '../../../assets/js/middleGround/tool' const app = getApp(); Page({ /** @@ -79,9 +80,7 @@ sort: { type: 'Asc', field: 'LinkOrder' }, }; app.MG.store.getStoreChannelList(query).then((res) => { - const list = res.datas.filter((item) => item.refCode != 'jsek_homepageBookService'); - this.setData({ assortList: list, }); @@ -120,15 +119,14 @@ sort: { type: 'Asc', field: 'LinkOrder' }, }; app.MG.store.getStoreChannelList(query).then(async (res) => { - - console.log(res, 'res'); // 涓�绾у垎绫婚�変腑 - this.setData({ - startCheck: res.datas[0].refCode, - }); + // this.setData({ + // startCheck: res.datas[0].refCode, + // }); // 鑾峰彇浜岀骇鍒嗙被 for (let index = 0; index < res.datas.length; index++) { const item = res.datas[index]; + item.icon ? item.icon = getPublicImage(item.icon, 58, 72) : item.icon = item.icon item.children = await this.getSecondList(item); } // 涓�绾у垎绫昏祴鍊� @@ -156,22 +154,41 @@ sort: { type: 'Asc', field: 'LinkOrder' }, }; await app.MG.store.getStoreChannelList(query).then((res) => { + for (let index = 0; index < res.datas.length; index++) { + const element = res.datas[index]; + if (element.icon) + element.icon = getPublicImage(element.icon, 58, 72) + + } datas = res.datas; }); return datas; }, - tabClick(tabData) { - const data = tabData.currentTarget.dataset.tabdata; + tabClick(e) { + const data = e.currentTarget.dataset.tabdata; this.setData({ startCheck: data.refCode, }); + console.log(data); }, // 璺宠浆鍒楄〃椤� - goPageList(item) { - const secondCode = `${item.currentTarget.dataset.staircode.pathLinks[0].linkPath}\\${item.currentTarget.dataset.staircode.id}`; - wx.navigateTo({ - url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&secondCode=${secondCode}`, - }); + goPageList(e) { + const tab = e.currentTarget.dataset.tabdata + const stair = e.currentTarget.dataset.stair + this.setData({ + startCheck: tab.refCode + }) + if (stair) { + const secondCode = `${stair.pathLinks[0].linkPath}\\${stair.id}`; + wx.navigateTo({ + url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&secondCode=${secondCode}`, + }); + } else { + wx.navigateTo({ + url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}`, + }); + } + }, navToSearchPage(e) { console.log(e.detail.value); diff --git a/pages/bookServices/assort/index.wxml b/pages/bookServices/assort/index.wxml index bd6d2dd..aca70a8 100644 --- a/pages/bookServices/assort/index.wxml +++ b/pages/bookServices/assort/index.wxml @@ -2,13 +2,7 @@ <view class="page-header"> <!-- 鎼滅储妗� --> <view class="search"> - <t-search - t-class-input="t-search__input" - t-class-input-container="t-search__input-container" - placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" - leftIcon="" - bind:submit="navToSearchPage" - > + <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" leftIcon="" bind:submit="navToSearchPage" placeholder-class="placeholder" placeholder-style="font-size:28rpx;"> <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" /> </t-search> </view> @@ -18,28 +12,14 @@ <view class="side-bar-wrapper"> <view class="tab-left"> <t-side-bar value="{{assortCheck.code}}" bind:change="changeAssort"> - <t-side-bar-item - wx:for="{{assortList}}" - wx:key="id" - value="{{item.refCode}}" - label="{{item.name}}" - badge-props="{{item.badgeProps}}" - /> + <t-side-bar-item wx:for="{{assortList}}" wx:key="id" value="{{item.refCode}}" label="{{item.name}}" badge-props="{{item.badgeProps}}" /> </t-side-bar> </view> <view class="side-bar-content"> <!-- 涓�绾у垎绫� --> <view class="tab-top"> <scroll-view scroll-x="{{true}}" class="myScroll"> - <view - wx:for="{{startList}}" - wx:key="id" - class="row {{startCheck == item.refCode ? 'tab-active' : ''}}" - bind:tap="tabClick" - data-tabData="{{item}}" - wx:if="{{item.children.length}}" - >{{item.name}}</view - > + <view wx:for="{{startList}}" wx:key="id" class="row {{startCheck == item.refCode ? 'tab-active' : ''}}" bind:tap="tabClick" data-tabData="{{item}}">{{item.name}}</view> </scroll-view> </view> <!-- 鍐呭 --> @@ -47,30 +27,20 @@ <view wx:if="{{listLoading}}"> <t-loading theme="spinner" size="400rpx" loading="{{listLoading}}"></t-loading> </view> - <view - wx:for="{{startList}}" - wx:for-item="item" - wx:key="item.refCode" - id="{{item.refCode}}" - class="class-box" - wx:if="{{item.children.length && !listLoading}}" - > + <view wx:for="{{startList}}" wx:for-item="item" wx:key="item.refCode" id="{{item.refCode}}" class="class-box" wx:if="{{!listLoading}}"> <view class="class-name">{{item.name}}</view> <view class="class-content"> - <view - wx:for="{{item.children}}" - wx:for-item="citem" - wx:key="id" - class="book-box" - bind:tap="goPageList" - data-stairCode="{{citem}}" - > - <t-image src="/static/images/bookService/assort/book-img.png" mode="heightFix" width="58" height="72" /> + <view wx:for="{{item.children}}" wx:for-item="citem" wx:key="id" class="book-box" bind:tap="goPageList" data-stair="{{citem}}" data-tabData="{{item}}" wx:if="{{item.children.length}}"> + <image src="{{citem.icon ? citem.icon : '/static/images/bookService/assort/book-img.png'}}" mode="heightFix" /> <view class="classify">{{citem.name}}</view> + </view> + <view wx:if="{{!item.children.length}}" class="book-box" bind:tap="goPageList" data-tabData="{{item}}"> + <image src="{{item.icon ? item.icon : '/static/images/bookService/assort/book-img.png'}}" mode="heightFix"></image> + <text class="classify">鍏ㄩ儴</text> </view> </view> </view> </scroll-view> </view> </view> -</view> +</view> \ No newline at end of file diff --git a/pages/bookServices/assort/index.wxss b/pages/bookServices/assort/index.wxss index 3c71ffe..f0b7169 100644 --- a/pages/bookServices/assort/index.wxss +++ b/pages/bookServices/assort/index.wxss @@ -13,6 +13,11 @@ left: 0; width: 100%; z-index: 99; + font-size: 28rpx; +} + +.placeholder { + font-size: 28rpx; } .page-header .t-search__input-container { @@ -108,7 +113,7 @@ .book-box { width: 140rpx; - margin-right: 10rpx; + margin: 0 10rpx 20rpx 0 } .book-box:nth-child(3n) { @@ -116,8 +121,8 @@ } .book-box image { - width: 58px; - height: 70px; + height: 142rpx; + object-fit: contain; } .classify { diff --git a/pages/bookServices/detail/components/learnResource/learnResource.js b/pages/bookServices/detail/components/learnResource/learnResource.js index 8d30b76..3a67e7b 100644 --- a/pages/bookServices/detail/components/learnResource/learnResource.js +++ b/pages/bookServices/detail/components/learnResource/learnResource.js @@ -11,13 +11,39 @@ * 缁勪欢鐨勫垵濮嬫暟鎹� */ data: { - + receive: false, + buy: false, }, /** * 缁勪欢鐨勬柟娉曞垪琛� */ methods: { - + getFreeResource() { + var myEventDetail = {} // detail瀵硅薄锛屾彁渚涚粰浜嬩欢鐩戝惉鍑芥暟 + var myEventOption = { + bubbles: true, + composed: true + } // 瑙﹀彂浜嬩欢鐨勯�夐」 + this.triggerEvent('getFreeResource', myEventDetail, myEventOption) + }, + allAddShoppiingCar() { + var myEventDetail = {} // detail瀵硅薄锛屾彁渚涚粰浜嬩欢鐩戝惉鍑芥暟 + var myEventOption = { + bubbles: true, + composed: true + } // 瑙﹀彂浜嬩欢鐨勯�夐」 + this.triggerEvent('allAddShoppiingCar', myEventDetail, myEventOption) + }, + changeReceive(type) { + this.setData({ + receive: type + }) + }, + changeBuy(type) { + this.setData({ + buy: type + }) + } } }) diff --git a/pages/bookServices/detail/components/learnResource/learnResource.wxml b/pages/bookServices/detail/components/learnResource/learnResource.wxml index 3a76308..4dde643 100644 --- a/pages/bookServices/detail/components/learnResource/learnResource.wxml +++ b/pages/bookServices/detail/components/learnResource/learnResource.wxml @@ -1,14 +1,14 @@ <!--pages/bookServices/detail/components/learnResource/learnResource.wxml--> <view class="learnResource" theme="primary"> - <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx; " t-class="external-class"> + <t-button loading="{{receive}}" class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx; " t-class="external-class" bind:tap="getFreeResource"> <t-image src=" /static/images/bookService/detail/yijianlingqu.png"></t-image> <text>棰嗗彇鏌ョ湅</text> </t-button> - <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;"> + <t-button loading="{{buy}}" class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;" bind:tap="allAddShoppiingCar"> <t-image src="/static/images/bookService/detail/yijiangoumai.png"></t-image> 涓�閿喘涔� </t-button> - <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;"> + <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;" wx:if="{{false}}"> <t-image src="/static/images/bookService/detail/renwudan锛廼con.png"></t-image> 瀛︿範浠诲姟鍗� </t-button> diff --git a/pages/bookServices/detail/components/learnResource/learnResource.wxss b/pages/bookServices/detail/components/learnResource/learnResource.wxss index 03e91bf..ca5e2f5 100644 --- a/pages/bookServices/detail/components/learnResource/learnResource.wxss +++ b/pages/bookServices/detail/components/learnResource/learnResource.wxss @@ -8,11 +8,13 @@ } .btn { - width: 232rpx; + width: 300rpx; font-size: 28rpx; --td-button-primary-bg-color: #fff; --td-button-primary-border-color: #FF6C00; --td-button-primary-color: #ff6c00; + --td-button-primary-active-bg-color: #fff0e6; + --td-button-primary-active-border-color: #ff6c00; padding: 0; display: flex; align-items: center; @@ -21,4 +23,5 @@ .btn image { width: 28rpx; height: 32rpx; + margin: 25rpx 10rpx 0 0; } \ No newline at end of file diff --git a/pages/bookServices/detail/components/note/note.js b/pages/bookServices/detail/components/note/note.js new file mode 100644 index 0000000..772e741 --- /dev/null +++ b/pages/bookServices/detail/components/note/note.js @@ -0,0 +1,317 @@ +// pages/bookServices/detail/components/note/note.js +const app = getApp() +Component({ + /** + * 缁勪欢鐨勫睘鎬у垪琛� + */ + properties: { + bookInfo: { + type: Object, + value: {} + } + }, + + /** + * 缁勪欢鐨勫垵濮嬫暟鎹� + */ + data: { + inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx', + placeholderstyle: 'font-size:28rpx', + flag: false, // 杈撳叆妗嗘槸鍚︽樉绀� + submitType: "new", // 鏂板缓 or 缂栬緫 + showNoteDialog: false, + textvalue: '', + noteId: '', + showInput: false, + submitTitle: "", + pageCount: { + page: 1, + total: 0, + }, + isMore: null, + noteList: [], + activeValues: 0, + loading: false, + }, + /** + * 缁勪欢鐨勬柟娉曞垪琛� + */ + methods: { + onReachBottom() { + const flag = this.data.noteList.length < this.data.pageCount.total + if (flag) { + this.setData({ + isMore: true, + "pageCount.page": this.data.pageCount.page + 1 + }) + this.getNoteList() + } else { + this.setData({ + isMore: true + }) + setTimeout(() => { + this.setData({ + isMore: false + }) + }, 100) + } + }, + handleSubmitTitle() { + this.setData({ + submitTitle: this.properties.bookInfo.name + }) + }, + openDialog() { + this.setData({ + submitTitle: this.properties.bookInfo.name, + showNoteDialog: true + }) + }, + closeDialog() { + this.setData({ + flag: false, + showNoteDialog: false, + submitTitle: '', + textvalue: "", + }) + }, + textareaChange(e) { + this.setData({ + textvalue: e.detail.value + }) + }, + textareaBlur() { + console.log('澶卞幓鐒︾偣'); + }, + // 鏍囬杈撳叆妗嗗�� + inputChange(e) { + this.setData({ + submitTitle: e.detail.value + }) + }, + // 寮圭獥纭畾鎸夐挳 + confirmSuggest() { + if (!this.data.submitTitle) { + return wx.showToast({ + icon: 'error', + title: '璇峰~鍐欑瑪璁版爣棰�', + }) + } else if (!this.data.textvalue) { + return wx.showToast({ + icon: 'error', + title: '璇峰~鍐欑瑪璁板唴瀹�', + }) + } + if (this.data.submitType == 'new') { + this.makeNote() + } else if (this.data.submitType == 'edit') { + this.updateNote() + } + this.setData({ + showNoteDialog: false + }) + }, + handleChange(e) { + this.setData({ + activeValues: e.detail.value + }) + }, + // 鏍煎紡鍖栫瑪璁版椂闂� + convertTimestamp(timestamp) { + const isoDate = new Date(timestamp) + const year = isoDate.getFullYear() + const month = String(isoDate.getMonth() + 1).padStart(2, '0') + const day = String(isoDate.getDate()).padStart(2, '0') + const hours = String(isoDate.getHours()).padStart(2, '0') + const minutes = String(isoDate.getMinutes()).padStart(2, '0') + const seconds = String(isoDate.getSeconds()).padStart(2, '0') + const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` + return formattedDate + }, + changeLoading() { + this.setData({ + loading:true + }) + }, + // 鑾峰彇绗旇鍒楄〃 + async getNoteList() { + // this.setData({ + // loading: true + // }) + let topicId + await app.MG.ugc + .getProductUserSubmitTopic({ + productId: this.properties.bookInfo.id, + appRefCode: app.config.appRefCode + }) + .then((res) => { + if (res) { + topicId = res.id + } else { + return wx.showToast({ + icon: "error", + title: '鏌ヨ澶辫触', + }) + } + }) + // loadings.value.bookResource = true + let query = { + start: 0, + size: this.data.pageCount.page * 5, + messageType: 'note', + sort: { + type: 'Desc', + field: 'CreateDate' + }, + appRefCode: app.config.appRefCode, + topicIdOrRefCode: topicId + '' + } + await app.MG.ugc.getTopicMessageList(query).then((res) => { + // notePage.value.total = res.totalSize + res.datas.forEach((item) => { + item.compliceHover = false + item.deleteHover = false + item.createDate = this.convertTimestamp(item.createDate) + }) + this.setData({ + "pageCount.total": res.totalSize, + noteList: res.datas, + loading: false + }) + console.log('绗旇鍒楄〃', res.datas); + }) + }, + // 鏂板缓绗旇鎺ュ彛 + async makeNote() { + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + let topicId + await app.MG.ugc + .getProductUserSubmitTopic({ + productId: this.properties.bookInfo.id, + appRefCode: app.config.appRefCode + }) + .then((res) => { + if (res) { + topicId = res.id + } else { + return wx.showToast({ + icon: 'error', + title: '鏂板缓澶辫触', + }) + } + }) + let query = { + topicIdOrRefCode: topicId + '', + name: this.data.submitTitle, + content: this.data.textvalue, + type: 'note', + cmsTypeRefCode: '', + newDataListRequest: [] + } + await app.MG.ugc.newTopicMessage(query).then((res) => { + wx.showToast({ + title: '鏂板缓鎴愬姛', + }) + this.closeDialog() + this.getNoteList() + }) + }, + // 鍒犻櫎绗旇 + deleteNote(e) { + const id = e.currentTarget.dataset.id + const messageIds = [] + messageIds.push(id) + wx.showModal({ + title: '鎻愮ず', + content: '纭鍒犻櫎璇ョ瑪璁板悧锛�',//editable濡傛灉涓簍rue锛岃繖灏辨槸杈撳叆妗嗙殑鍐呭 + editable: false,//鏄惁鏄剧ず杈撳叆妗� + placeholderText: '璇疯緭鍏ュ唴瀹瑰惂',//杈撳叆妗嗙殑榛樿鍐呭 + success: (res) => { + if (res.confirm) { + app.MG.ugc + .delTopicMessage({ messageIds }) + .then((res) => { + wx.showToast({ + title: '鍒犻櫎鎴愬姛', + }) + // if ((notePage.value.total % 3) - 1 == 0) { + // notePage.value.page -= 1 + // } + this.getNoteList() + }) + } else if (res.cancel) { + console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷') + } + } + }) + }, + // 鏍囬鏀瑰彉 + changeTitle(e) { + this.setData({ + flag: e.currentTarget.dataset.value + }) + }, + // 缂栬緫鎸夐挳 + editNote(e) { + const note = e.currentTarget.dataset.note + this.setData({ + submitType: "edit", + textvalue: note.content, + submitTitle: note.name, + noteId: note.id + }) + this.openDialog() + }, + // 缂栬緫绗旇鎺ュ彛 + updateNote() { + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + if (!this.data.submitTitle) { + return wx.showToast({ + icon: 'error', + title: '璇峰~鍐欑瑪璁版爣棰�', + }) + } else if (!this.data.textvalue) { + return wx.showToast({ + icon: 'error', + title: '璇峰~鍐欑瑪璁板唴瀹�', + }) + } + let query = { + id: this.data.noteId, + name: this.data.submitTitle, + description: 'string', + icon: 'string', + type: 'note', + content: this.data.textvalue, + newDataRequests: [], + updateDataRequests: [] + } + app.MG.ugc.updateTopicMessage(query).then((res) => { + wx.showToast({ + title: '缂栬緫鎴愬姛', + }) + this.closeDialog() + this.getNoteList() + }) + this.setData({ + submitType: "new" + }) + } + } +}) diff --git a/pages/bookServices/detail/components/note/note.json b/pages/bookServices/detail/components/note/note.json new file mode 100644 index 0000000..598afe7 --- /dev/null +++ b/pages/bookServices/detail/components/note/note.json @@ -0,0 +1,15 @@ +{ + "component": true, + "usingComponents": { + "t-image": "tdesign-miniprogram/image/image", + "t-button": "tdesign-miniprogram/button/button", + "t-collapse": "tdesign-miniprogram/collapse/collapse", + "t-collapse-panel": "tdesign-miniprogram/collapse-panel/collapse-panel", + "t-dialog": "tdesign-miniprogram/dialog/dialog", + "t-textarea": "tdesign-miniprogram/textarea/textarea", + "t-input": "tdesign-miniprogram/input/input", + "t-loading": "tdesign-miniprogram/loading/loading", + "t-popup": "tdesign-miniprogram/popup/popup", + "t-icon": "tdesign-miniprogram/icon/icon" + } +} \ No newline at end of file diff --git a/pages/bookServices/detail/components/note/note.wxml b/pages/bookServices/detail/components/note/note.wxml new file mode 100644 index 0000000..19eb4cf --- /dev/null +++ b/pages/bookServices/detail/components/note/note.wxml @@ -0,0 +1,63 @@ +<!--pages/bookServices/detail/components/note/note.wxml--> +<view class="note" wx:if="{{!loading && noteList.length}}"> + <view class="note-btn"> + <t-button theme="primary" class="make-note" bind:tap="openDialog" style="width: 240rpx;"> + <view slot="content"> + <t-image src="/static/images/bookService/detail/makeNote.png"></t-image> + 璁扮瑪璁� + </view> + </t-button> + </view> + <view class="note-content"> + + <t-collapse value="{{activeValues}}" bind:change="handleChange"> + <t-collapse-panel value="{{item.id}}" expandIcon wx:for="{{noteList}}"> + <view slot="header" class="collapse-header"> + <t-image class="note-icon" src="/static/images/bookService/detail/note-icon.png"></t-image> + <view class="header-name">{{item.name}}</view> + </view> + <view> + <view class="note-content">{{item.content}}</view> + <view class="note-bottom"> + <view class="note-time">{{item.createDate}}</view> + <view class="bottom-btn"> + <t-image src="/static/images/bookService/detail/compliceHover.png" class="complice" bind:tap="editNote" data-note="{{item}}"></t-image> + <t-image src="/static/images/bookService/detail/deleteHover.png" class="delete" bind:tap="deleteNote" data-id="{{item.id}}"></t-image> + </view> + </view> + </view> + </t-collapse-panel> + </t-collapse> + + </view> + <view class="bottom-box"> + <t-loading wx:if="{{isMore == true}}"></t-loading> + <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> + </view> +</view> +<view class="loading-box" wx:if="{{loading}}"> + <t-loading loading="{{loading}}" size="60rpx"></t-loading> +</view> + + +<!-- 璁扮瑪璁板脊绐� --> +<t-popup visible="{{showNoteDialog}}" bind:visible-change="onVisibleChange" placement="center"> + <view class="popup"> + <view slot="title"> + <view class="title-text" wx:if="{{!flag}}"> + <text class="note-title">{{submitTitle}}</text> + <t-image src="/static/images/bookService/detail/edit.png" class="edit-icon" bind:tap="changeTitle" data-value="{{true}}"></t-image> + </view> + <view wx:else> + <t-input value="{{submitTitle}}" data-value="{{false}}" bind:enter="changeTitle" bind:blur="changeTitle" bind:change="inputChange" maxlength="{{50}}" style="{{inputStyle}}"></t-input> + </view> + </view> + <view slot="content" class="content"> + <t-textarea value="{{textvalue}}" t-class="external-class" label="" placeholder="璇疯緭鍏ョ瑪璁板唴瀹�" maxcharacter="500" disableDefaultPadding="{{true}}" indicator bind:change="textareaChange" bind:blur="" style="{{inputStyle}}" placeholder-style="{{placeholderstyle}}" /> + </view> + <view class="submit-btn"> + <t-button theme="primary" size="large" block bind:tap="confirmSuggest">鎻愪氦</t-button> + </view> + </view> + <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="closeDialog" /> +</t-popup> \ No newline at end of file diff --git a/pages/bookServices/detail/components/note/note.wxss b/pages/bookServices/detail/components/note/note.wxss new file mode 100644 index 0000000..959c6d2 --- /dev/null +++ b/pages/bookServices/detail/components/note/note.wxss @@ -0,0 +1,146 @@ +/* pages/bookServices/detail/components/note/note.wxss */ + +.popup { + padding: 40rpx; + width: 600rpx; +} + +.note-btn { + height: 140rpx; + display: flex; + justify-content: flex-end; + align-items: center; + border-bottom: 1px solid #EFF0F1; + --td-button-primary-bg-color: #fff; + --td-button-primary-border-color: #ff6c00; + --td-button-primary-color: #ff6c00; + --td-button-primary-active-bg-color: #fff0e6; +} + +.note-btn image { + width: 28rpx; + height: 32rpx; + margin-top: 24rpx; +} + + + +.note-title { + width: 90%; + height: 84rpx; + line-height: 84rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.make-note { + margin: 0; + margin-right: 40rpx; +} + +.title-text { + display: flex; + align-items: center; +} + +.edit-icon { + margin-left: 10rpx; + width: 30rpx; + height: 30rpx; +} + +.header { + display: flex; +} + +.note-icon { + width: 44rpx; + height: 48rpx; + margin-right: 20rpx; +} + +.collapse-header { + display: flex; +} + +.collapse-header .header-name { + font-size: 32rpx; + width: 500rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.note-content { + height: min-content; + font-size: 28rpx; + color: #949494; + margin-bottom: 20rpx; + max-height: 600rpx; + text-align: justify; + /* padding-bottom: 200rpx; */ +} + +.wrapper { + height: 100%; +} + +.note-bottom { + display: flex; + justify-content: space-between; + align-items: center; +} + +.bottom-btn { + height: 40rpx; + display: flex; + align-items: center; +} + +.note-time { + color: #D9D9D9; +} + +.complice, +.delete { + width: 30rpx; + height: 30rpx; +} + +.delete { + margin-left: 40rpx; +} + +.loading-box { + width: 100%; + min-height: 550rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.content { + margin-top: 20rpx; +} + +.close-btn { + position: absolute; + left: 50%; + margin-left: -32rpx; + bottom: calc(-1 * (48rpx + 64rpx)); +} + +.submit-btn { + padding: 40rpx; + --td-button-border-radius: 60rpx; + --td-button-primary-bg-color: #ff6c00; + --td-button-primary-border-color: #ff6c00; + --td-button-primary-active-bg-color: #ff984d; + --td-button-primary-active-border-color: #ff984d; +} + +.bottom-box { + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/pages/bookServices/detail/components/suggest/suggest.js b/pages/bookServices/detail/components/suggest/suggest.js index d74c397..b79c95e 100644 --- a/pages/bookServices/detail/components/suggest/suggest.js +++ b/pages/bookServices/detail/components/suggest/suggest.js @@ -1,19 +1,30 @@ // pages/bookServices/detail/components/suggest/suggest.js +const app = getApp() Component({ /** * 缁勪欢鐨勫睘鎬у垪琛� */ properties: { - + bookIcon: { + type: String, + value: '' + }, + bookName: { + type: String, + value: '' + } }, data: { + inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx', + placeholderstyle: 'font-size:28rpx', dialogKey: '', showWithInput: false, showTextAndTitleWithInput: false, inputvalue: '', textvalue: '', ratevalue: 0, + textError: false, }, methods: { showDialog(e) { @@ -24,15 +35,90 @@ closeDialog() { this.setData({ - showWithInput: false + showWithInput: false, + ratevalue: 0, + inputvalue: '', + textvalue: '' }) }, // 璇勫垎鏀瑰彉 onChangeRate(e) { - const { value } = e.detail; + console.log(e.detail); this.setData({ - ratevalue: value + ratevalue: e.detail.value }); }, + // 杈撳叆妗嗘敼鍙� + inputChange(e) { + this.setData({ + inputvalue: e.detail.value + }) + }, + // 鏂囨湰妗嗘敼鍙� + textareaChange(e) { + this.setData({ + textvalue: e.detail.value + }) + }, + feedBack() { + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + this.closeDialog() + let content = { + source: this.data.ratevalue, + phone: this.data.inputvalue, + content: this.data.textvalue, + icon: this.properties.bookIcon + } + let query = { + topicIdOrRefCode: 'bookOpinion', + name: this.properties.bookName, + content: JSON.stringify(content), + type: 'ProductComment', + cmsTypeRefCode: '', + newDataListRequest: [] + } + + app.MG.ugc.newTopicMessage(query).then((res) => { + wx.showToast({ + title: '鎻愪氦鎴愬姛', + icon: 'success', + duration: 2000 + }) + }) + }, + // 纭畾 + confirmSuggest() { + const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(this.data.inputvalue); + if (!this.data.ratevalue) { + return wx.showToast({ + icon: "error", + title: '璇烽�夋嫨璇勫垎', + }) + } else if (!this.data.inputvalue) { + return wx.showToast({ + icon: "error", + title: '璇峰~鍐欒仈绯绘柟寮�', + }) + } else if (!isPhoneNumber) { + return wx.showToast({ + icon: "error", + title: '璇疯緭鍏ユ纭仈绯绘柟寮�', + }) + } else if (!this.data.textvalue) { + return wx.showToast({ + icon: 'error', + title: '璇疯緭鍏ュ弽棣堝弽棣堝唴瀹�', + }) + } + this.feedBack() + } }, }) diff --git a/pages/bookServices/detail/components/suggest/suggest.json b/pages/bookServices/detail/components/suggest/suggest.json index 941c25a..20935c7 100644 --- a/pages/bookServices/detail/components/suggest/suggest.json +++ b/pages/bookServices/detail/components/suggest/suggest.json @@ -4,6 +4,10 @@ "t-dialog": "tdesign-miniprogram/dialog/dialog", "t-input": "tdesign-miniprogram/input/input", "t-textarea": "tdesign-miniprogram/textarea/textarea", - "t-rate": "tdesign-miniprogram/rate/rate" + "t-rate": "tdesign-miniprogram/rate/rate", + "t-popup": "tdesign-miniprogram/popup/popup", + "t-icon": "tdesign-miniprogram/icon/icon", + "t-button": "tdesign-miniprogram/button/button", + "t-image": "tdesign-miniprogram/image/image" } } \ No newline at end of file diff --git a/pages/bookServices/detail/components/suggest/suggest.wxml b/pages/bookServices/detail/components/suggest/suggest.wxml index c567a62..335097d 100644 --- a/pages/bookServices/detail/components/suggest/suggest.wxml +++ b/pages/bookServices/detail/components/suggest/suggest.wxml @@ -1,10 +1,31 @@ -<t-dialog visible="{{showWithInput}}" title="鎴戣寤鸿" confirm-btn="纭畾" cancel-btn="鍙栨秷" bind:confirm="closeDialog" bind:cancel="closeDialog" class="suggest-dialog"> +<!-- <t-dialog visible="{{showWithInput}}" title="鎴戣寤鸿" confirm-btn="纭畾" cancel-btn="鍙栨秷" bind:confirm="confirmSuggest" bind:cancel="closeDialog" class="suggest-dialog"> <view slot="content"> <view class="demo-rate"> - <view class="demo-rate__title">瀹炲績璇勫垎</view> - <t-rate value="{{ratevalue}}" bind:change="onChangeRate" /> + <view class="demo-rate__title">璇勫垎</view> + <t-rate value="{{ratevalue}}" catch:change="onChangeRate" /> </view> - <t-input clearable value="{{inputvalue}}" slot="content" label="鑱旂郴鏂瑰紡" placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" placeholder-class="placeholder" /> - <t-textarea value="{{textvalue}}" t-class="external-class" label="鏍囩鏂囧瓧" placeholder="璁剧疆鏈�澶у瓧绗︿釜鏁帮紝涓�涓眽瀛楄〃绀轰袱涓瓧绗�" maxcharacter="200" disableDefaultPadding="{{true}}" indicator /> + <t-input clearable value="{{inputvalue}}" slot="content" label="鑱旂郴鏂瑰紡" placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" placeholder-class="placeholder" bind:change="inputChange" type="number" maxlength="{{11}}" tips="{{phoneError ? '鎵嬫満鍙疯緭鍏ヤ笉姝g‘' : ''}}" /> + <t-textarea value="{{textvalue}}" t-class="external-class" label="鎰忚鍙嶉" placeholder="璇疯緭鍏ュ唴瀹�" maxcharacter="200" disableDefaultPadding="{{true}}" indicator bind:change="textareaChange" /> </view> -</t-dialog> \ No newline at end of file +</t-dialog> --> +<!-- <view class="suggest"> --> +<t-popup visible="{{showWithInput}}" bind:visible-change="onVisibleChange" placement="center"> + <view class="top-icon"> + <t-image src="/static/images/bookService/detail/feedback.png"></t-image> + </view> + <view slot="content" class="content"> + <view class="top-title">鎴戣寤鸿</view> + <view class="demo-rate"> + <t-rate value="{{ratevalue}}" catch:change="onChangeRate" size="{{30}}" color="#FFB400" /> + </view> + <view class="phone-input"> + <t-input clearable value="{{inputvalue}}" slot="content" label="" placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" placeholder-class="placeholder" bind:change="inputChange" type="number" maxlength="{{11}}" class="phone" style="{{inputStyle}}" placeholder-style="{{placeholderstyle}}" /> + </view> + <t-textarea value="{{textvalue}}" t-class="external-class" label="" placeholder="璇疯緭鍏ュ弽棣堝唴瀹�" maxcharacter="200" disableDefaultPadding="{{true}}" indicator bind:change="textareaChange" style="{{inputStyle}}" placeholder-style="{{placeholderstyle}}" /> + </view> + <view class="submit-btn"> + <t-button theme="primary" size="large" block bind:tap="confirmSuggest">鎻愪氦</t-button> + </view> + <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="closeDialog" /> +</t-popup> +<!-- </view> --> \ No newline at end of file diff --git a/pages/bookServices/detail/components/suggest/suggest.wxss b/pages/bookServices/detail/components/suggest/suggest.wxss index 0f1b799..ab4504c 100644 --- a/pages/bookServices/detail/components/suggest/suggest.wxss +++ b/pages/bookServices/detail/components/suggest/suggest.wxss @@ -1,16 +1,4 @@ /* pages/bookServices/detail/components/suggest/suggest.wxss */ -.suggest-dialog { - --td-dialog-close-color: #666 -} - -.t-class-content { - height: 400px; -} - - -.wrapper { - margin-bottom: 32rpx; -} .placeholder { color: rgba(0, 0, 0, 0.26); @@ -35,18 +23,7 @@ line-height: 96rpx; } -.demo-rate { - background-color: #fff; - height: 96rpx; - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 32rpx; - border-bottom: solid 1rpx #f0f0f0; - border-top: solid 1rpx #f0f0f0; - margin-top: 32rpx; - margin-bottom: 32rpx; -} + .demo-rate__title { width: 200rpx; @@ -56,4 +33,72 @@ background-color: transparent; padding-left: 32rpx; border: 0; +} + +.block { + position: relative; + width: 240px; + height: 240px; + background: #fff; + border-radius: 16rpx; +} + +.close-btn { + position: absolute; + left: 50%; + margin-left: -32rpx; + bottom: calc(-1 * (48rpx + 64rpx)); +} + +.wrapper { + margin: 32rpx; + display: block; +} + +.content { + position: relative; + border-radius: 40rpx; + padding: 100rpx 40rpx 0rpx 40rpx; + width: 600rpx; + background-image: linear-gradient(to bottom, #FFF8E5, #fffcf5); +} + +.demo-rate { + width: 350rpx; + margin: 20rpx auto 20rpx auto; +} + +.phone { + margin-bottom: 16rpx; + --td-input-border-radius: 20rpx; + border-radius: 20rpx; +} + + +.submit-btn { + padding: 40rpx; + --td-button-border-radius: 60rpx; + --td-button-primary-bg-color: #ff6c00; + --td-button-primary-border-color: #ff6c00; + --td-button-primary-active-bg-color: #ff984d; + --td-button-primary-active-border-color: #ff984d; +} + +.top-icon { + top: -50rpx; + left: 40%; + position: absolute; +} + +.top-icon image { + width: 146rpx; + height: 146rpx; +} + +.top-title { + width: 160rpx; + margin: 0 auto; + color: #0F1214; + font-size: 40rpx; + font-weight: bold; } \ No newline at end of file diff --git a/pages/bookServices/detail/components/teachResource/index.wxml b/pages/bookServices/detail/components/teachResource/index.wxml index 3f589f2..c6e9715 100644 --- a/pages/bookServices/detail/components/teachResource/index.wxml +++ b/pages/bookServices/detail/components/teachResource/index.wxml @@ -1,7 +1,7 @@ -<view class="teach-btn"> - <t-button theme="primary" style="width: 120px; height: 36px;" class="btn-upload"> - <t-image src="/static/images/bookService/detail/upload.png"></t-image> - 涓婁紶璧勬簮 +<view class="teach-btn" wx:if="{{false}}"> + <t-button theme="primary" style="width: 120px; height: 36px;" class="btn-upload" wx:if="{{false}}"> + <t-image src="/static/images/bookService/detail/upload.png" style="margin-top: 20rpx;"></t-image> + <text>涓婁紶璧勬簮</text> </t-button> <t-button theme="primary" style="width: 120px; height: 36px;"> <t-image src="/static/images/bookService/detail/download.png"></t-image> diff --git a/pages/bookServices/detail/components/teachResource/index.wxss b/pages/bookServices/detail/components/teachResource/index.wxss index 42a38a2..e207958 100644 --- a/pages/bookServices/detail/components/teachResource/index.wxss +++ b/pages/bookServices/detail/components/teachResource/index.wxss @@ -1,28 +1,32 @@ .teach-btn { display: flex; - justify-content: flex-end; + justify-content: flex-start; align-items: center; height: 134rpx; --td-button-primary-bg-color: #fff; --td-button-primary-border-color: #FF6C00; --td-button-primary-color: #ff6c00; + --td-button-primary-active-bg-color: #fff0e6; + --td-button-primary-active-border-color: #ff6c00; +} + +.btn-content { + display: flex; + align-items: center; } .teach-btn image { width: 32rpx; height: 32rpx; margin-right: 6rpx; + margin-top: 20rpx; } -.teach-btn .t-button__content { - display: flex; - align-items: center; -} .applyResult { padding: 0 10rpx; - width: 740rpx; - height: 80rpx; + width: 660rpx; + min-height: 80rpx; display: flex; align-items: center; margin: 0 auto; @@ -40,6 +44,7 @@ } .applyPass { + background-color: rgba(0, 128, 0, 0.16); border: 1px solid green; } @@ -47,6 +52,14 @@ .applying { background-color: #fff2e9; border: 1px solid #ff6c00; +} + +.applyNone, +.applyReject, +.applyPass, +.applying { + margin-top: 40rpx; + margin-bottom: 40rpx; } .btn-box { @@ -61,7 +74,8 @@ --td-button-border-radius: 10rpx; --td-button-primary-bg-color: #ff6c00; --td-button-primary-border-color: #FF6C00; - --td-button-primary-text-active-bg-color: #000锛� + --td-button-primary-active-bg-color: #ff984d; + --td-button-primary-active-border-color: #ff984d; } .rejectBtn { diff --git a/pages/bookServices/detail/components/testResource/testResource.js b/pages/bookServices/detail/components/testResource/testResource.js new file mode 100644 index 0000000..10282d4 --- /dev/null +++ b/pages/bookServices/detail/components/testResource/testResource.js @@ -0,0 +1,84 @@ +// pages/bookServices/detail/components/testResource/testResource.js +const app = getApp() +Component({ + /** + * 缁勪欢鐨勫睘鎬у垪琛� + */ + properties: { + list: { + type: Array, + value: [] + }, + bookInfo: { + type: Object, + value: "", + } + }, + + /** + * 缁勪欢鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 缁勪欢鐨勬柟娉曞垪琛� + */ + methods: { + async goTest(e) { + const value = e.currentTarget.dataset.value + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + // 鑾峰彇绔犺妭涓嬫槸鍚︽湁棰樼洰 + let idPathList = [] + let query = { + path: '*', + queryType: '*', + productId: this.properties.bookInfo.id, + cmsPath: value.productLinkPath, + pading: { + start: 0, + size: 999 + } + } + if (value.childrenFolderCount == 0) { + return wx.showToast({ + icon: "error", + title: '鏆傛棤鏁版嵁', + }) + } else { + const res = await app.MG.store.getProductDetail(query) + debugger + res.datas.cmsDatas[0].datas.forEach((item) => { + idPathList.push({ + id: item.id, + name: item.name, + productLinkPath: item.productLinkPath, + type: item.type + }) + }) + } + // query: { + // title: bookData.value.test, + // bookId: route.query.bookId, + // productLinkPath: data.productLinkPath, + // answerTitle: data.name, + // answerType: 'option', + // rootCmsItemId: bookData.value.rootCmsItemId, + // idPathList: JSON.stringify(idPathList) + // } + + wx.navigateTo({ + url: `/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&productLinkPath=${value.productLinkPath}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&idPathList=${JSON.stringify(idPathList)}&answerTitle=${value.name}&answerType=${'option'}`, + }) + } + } +}) diff --git a/pages/bookServices/detail/components/testResource/testResource.json b/pages/bookServices/detail/components/testResource/testResource.json new file mode 100644 index 0000000..d3520d1 --- /dev/null +++ b/pages/bookServices/detail/components/testResource/testResource.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "t-button": "tdesign-miniprogram/button/button", + "t-image": "tdesign-miniprogram/image/image" + } +} \ No newline at end of file diff --git a/pages/bookServices/detail/components/testResource/testResource.wxml b/pages/bookServices/detail/components/testResource/testResource.wxml new file mode 100644 index 0000000..522eef5 --- /dev/null +++ b/pages/bookServices/detail/components/testResource/testResource.wxml @@ -0,0 +1,39 @@ +<!--pages/bookServices/detail/components/testResource/testResource.wxml--> +<view class="test-resource"> + <view class="top-btn"> + <t-button class="practice-btn" theme="primary" size="medium" style="width: 85px;"> + <view slot="content"> + <t-image src="/static/images/bookService/detail/practice-icon.png"></t-image> + 缁冧範 + </view> + </t-button> + <t-button class="paper-btn" theme="default" size="medium" style="width: 85px;"> + <view slot="content"> + <t-image src="/static/images/bookService/detail/zujuan.png"></t-image> + 缁勫嵎 + </view> + + </t-button> + <t-button class="error-btn" theme="default" size="medium" style="padding: 0 12rpx;"> + <view slot="content"> + <t-image src="/static/images/bookService/detail/cuoti.png"></t-image> + 鎴戠殑閿欓 + </view> + </t-button> + <t-button class="collect-btn" theme="default" size="medium" style="padding: 0 12rpx;"> + <view slot="content"> + <t-image src="/static/images/bookService/detail/wodeshoucang.png"></t-image> + 鎴戠殑鏀惰棌 + </view> + </t-button> + </view> + <view class="resource-list" wx:for="{{list}}" wx:key="item.id"> + <view class="list-title"> + <t-image src="/static/images/bookService/detail/test-icon.png"></t-image> + <text>{{item.name}}</text> + </view> + <view class="practice" bind:tap="goTest" data-value="{{item}}"> + <t-image src="/static/images/bookService/detail/lianxi-icon.png"></t-image> + </view> + </view> +</view> \ No newline at end of file diff --git a/pages/bookServices/detail/components/testResource/testResource.wxss b/pages/bookServices/detail/components/testResource/testResource.wxss new file mode 100644 index 0000000..4342f7d --- /dev/null +++ b/pages/bookServices/detail/components/testResource/testResource.wxss @@ -0,0 +1,56 @@ +/* pages/bookServices/detail/components/testResource/testResource.wxss */ +.test-resource { + padding-top: 20rpx; +} + +.resource-list { + height: 80rpx; + margin: 20rpx; + padding: 0 20rpx; + display: flex; + justify-content: space-between; + align-items: center; + background-color: #FFF6F0; +} + +.list-title image { + width: 34rpx; + height: 38rpx; +} + +.practice image { + width: 26rpx; + height: 30rpx; +} + +.list-title text { + margin-left: 10rpx; + color: #333; +} + +.top-btn { + display: flex; + justify-content: space-evenly; +} + +.top-btn image { + margin-top: 20rpx; + width: 36rpx; + height: 36rpx; +} + +.practice-btn { + --td-button-primary-bg-color: #ff6c00; + --td-button-primary-border-color: #ff6c00; + --td-button-primary-active-bg-color: #ff984d; + --td-button-primary-active-border-color: #ff984d; +} + +.paper-btn, +.error-btn, +.collect-btn { + --td-button-default-bg-color: #fff; + --td-button-default-color: #ff6c00; + --td-button-default-active-bg-color: #fff0e6; + --td-button-medium-font-size: 28rpx +} \ No newline at end of file diff --git a/pages/bookServices/detail/components/tree/index.js b/pages/bookServices/detail/components/tree/index.js index b0107f9..c7c1b33 100644 --- a/pages/bookServices/detail/components/tree/index.js +++ b/pages/bookServices/detail/components/tree/index.js @@ -1,3 +1,4 @@ + import Message from 'tdesign-miniprogram/message/message'; const app = getApp() Component({ @@ -5,6 +6,10 @@ treeList: { type: Array, value: [] + }, + bookInfo: { + type: Object, + value: {} }, buyIds: { type: Array, @@ -17,6 +22,14 @@ applyState: { type: String, value: '' + }, + openTeachids: { + type: Array, + value: '' + }, + openLearnids: { + type: Array, + value: "" } }, data: { @@ -43,7 +56,6 @@ } }, downloadTeach(e) { - console.log('鐐瑰嚮浜�', e); const value = e.currentTarget.dataset.value var myEventDetail = { value, @@ -53,15 +65,128 @@ composed: true } // 瑙﹀彂浜嬩欢鐨勯�夐」 this.triggerEvent('downloadTeach', myEventDetail, myEventOption) + }, // 鍒ゆ柇璧勬簮鏄惁璐拱 -resourceIsBuy (data) { - if (data.saleMethod && data.saleMethod.length) { - const isSHow = buyIdList.value.some((item) => item == data.saleMethod[0].Id) - return !isSHow - } else { - return false - } -} + resourceIsBuy(data) { + if (data.saleMethod && data.saleMethod.length) { + const isSHow = buyIdList.value.some((item) => item == data.saleMethod[0].Id) + return !isSHow + } else { + return false + } + }, + // 璺宠浆闊宠棰戞挱鏀惧櫒 + goPlayer(e) { + const item = e.currentTarget.dataset.item + const parent = e.currentTarget.dataset.parent + // "pages/resourceDetails/myAudio/index", + // "pages/resourceDetails/myVideo/index", + // "pages/resourceDetails/document/index", + let url + if (item.selectType == 'video') { + url = '/pages/resourceDetails/myVideo/index' + } else if (item.selectType == 'audio') { + url = '/pages/resourceDetails/myAudio/index' + } else { + url = '/pages/resourceDetails/document/index' + } + wx.navigateTo({ + url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}`, + }) + }, + // 鎷垮埌鎵�鏈夐」 + getAllChildren(id) { + let result = []; + function findChildren(item) { + if (item.id === id) { + if (item.children && item.children.length > 0) { + item.children.forEach(child => { + findChildren(child); + }); + } + } else { + if (item.children && item.children.length > 0) { + item.children.forEach(child => { + findChildren(child); + }); + } + } + if (item.children && item.children.length > 0) { + result.push(...item.children); + } + } + this.properties.treeList.forEach(item => { + findChildren(item); + }); + return result; + }, + // 鎷垮埌褰撳墠椤瑰瓙椤� + flattenTree(tree) { + let result = []; + function flatten(node) { + result.push(node); + if (node.children && node.children.length > 0) { + node.children.forEach(child => { + flatten(child); + }); + } + } + tree.forEach(node => { + flatten(node); + }); + return result + }, + findAndUpdateItemById(tree, id) { + function findAndUpdate(node) { + if (node.id === id) { + node.check = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true + return true; // 杩斿洖 true 琛ㄧず鎵惧埌浜嗙洰鏍囬」 + } + if (node.children && node.children.length > 0) { + for (let child of node.children) { + if (findAndUpdate(child)) { + return true; // 濡傛灉鍦ㄥ瓙鑺傜偣涓壘鍒颁簡鐩爣椤癸紝鍒欑洿鎺ヨ繑鍥� true + } + } + } + return false; // 琛ㄧず鏈壘鍒扮洰鏍囬」 + } + + for (let node of tree) { + if (findAndUpdate(node)) { + break; // 濡傛灉鍦ㄩ《灞傝妭鐐逛腑鎵惧埌浜嗙洰鏍囬」锛岀洿鎺ラ��鍑哄惊鐜� + } + } + }, + // 鍙樹负true + findAndUpdateItemsByIds(tree, ids) { + function findAndUpdate(node) { + if (ids.includes(node.id)) { + node.checked = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true + } + if (node.children && node.children.length > 0) { + for (let child of node.children) { + findAndUpdate(child); // 閫掑綊澶勭悊瀛愯妭鐐� + } + } + } + + for (let node of tree) { + findAndUpdate(node); // 瀵规瘡涓《灞傝妭鐐规墽琛屾煡鎵惧拰鏇存柊鎿嶄綔 + } + return tree; // 杩斿洖淇敼鍚庣殑瀹屾暣鏁扮粍 + }, + // 绔犺妭鍕鹃�� + checkResourceTitle(e) { + const item = e.currentTarget.dataset.item + let list = this.flattenTree([item]) + let ids = [] + list.forEach(item => { + ids.push(item.id) + }) + const tab = this.findAndUpdateItemsByIds([item], ids) + console.log(ids, tab); + } } }) \ No newline at end of file diff --git a/pages/bookServices/detail/components/tree/index.wxml b/pages/bookServices/detail/components/tree/index.wxml index d58d148..ce30d1f 100644 --- a/pages/bookServices/detail/components/tree/index.wxml +++ b/pages/bookServices/detail/components/tree/index.wxml @@ -1,58 +1,168 @@ <view class="tree"> - <t-collapse defaultValue="{{activeValues}}" bind:change="handleChange"> - <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" value="{{index}}" expandIcon> + <t-collapse default-value="{{activeValues}}" bind:change="handleChange"> + <t-collapse-panel + wx:for="{{treeList}}" + wx:for-item="item" + wx:for-index="index" + wx:key="id" + value="{{index}}" + expandIcon + > <view slot="header" class="header-title"> - <view> - <t-checkbox icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" catch:change="checkResourceTitle" wx:if="{{tab == 'jsek_teachingResources'}}" /> + <view wx:if="{{tab == 'jsek_cloudLearning'}}"> + <t-checkbox + icon="rectangle" + checked="{{item.checked}}" + data-item="{{item}}" + bind:change="checkResourceTitle" + /> </view> <text>{{item.name}}</text> </view> - <view class="list" wx:for="{{item.children}}" wx:for-item="citem" wx:for-index="cindex" wx:key="cindex"> + <view + class="list" + wx:for="{{item.children}}" + wx:for-item="citem" + wx:for-index="cindex" + wx:key="cindex" + > <!-- // 鍒ゆ柇 鏃犲瓙椤� 涓斾负鍟嗗搧item 鐩存帴鏄剧ず --> - <view class="listItems" wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}"> - <view class="itemsInfo" wx:if="{{citem.name}}" data-item="{{citem}}" data-index="{{cindex}}"> - <view class="contentBox"> + <view + class="listItems" + wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}" + > + <view + class="itemsInfo" + wx:if="{{citem.name}}" + data-item="{{citem}}" + data-index="{{cindex}}" + > + <view + class="contentBox" + bind:tap="goPlayer" + data-item="{{citem}}" + data-parent="{{item}}" + > <!-- 鏁欏璧勬簮 浜戝涔� 鍥炬爣 --> - <view class="box-image"> - <view class="checkBox"> - <t-checkbox icon="rectangle" checked="{{citem.checked}}" disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}" bind:change="checkResource" data-item="{{citem}}" wx:if="{{tab == 'jsek_teachingResources'}}" /> + <view + class="box-image" + style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}" + > + <view class="checkBox" wx:if="{{tab == 'jsek_cloudLearning'}}"> + <t-checkbox + icon="rectangle" + checked="{{citem.checked}}" + disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}" + catch:change="checkResource" + data-item="{{citem}}" + /> </view> <!-- 鏁欏璧勬簮鍥炬爣 --> <view class="teach-icon"> - <t-image wx:if="{{citem.selectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" /> - <t-image wx:if="{{citem.selectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" /> - <t-image wx:if="{{citem.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" /> - <t-image wx:if="{{citem.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" /> - <t-image wx:if="{{citem.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" /> - <t-image wx:if="{{citem.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" /> - <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" /> - <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" /> - <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'ppt' || citem.fileMap[citem.file].extension == 'pptx'}}" src="/static/images/bookService/detail/PPT.png" mode="aspectFill" /> + <t-image + wx:if="{{citem.selectType == 'audio'}}" + src="/static/images/bookService/detail/audioIcon.png" + mode="aspectFill" + /> + <t-image + wx:if="{{citem.selectType == 'video'}}" + src="/static/images/bookService/detail/video.png" + mode="aspectFill" + /> + <t-image + wx:if="{{citem.selectType == 'pdf'}}" + src="/static/images/bookService/detail/pdf.png" + mode="aspectFill" + /> + <t-image + wx:if="{{citem.selectType == 'webpage'}}" + src="/static/images/bookService/detail/net.png" + mode="aspectFill" + /> + <t-image + wx:if="{{citem.selectType == 'picture'}}" + src="/static/images/bookService/detail/picture.png" + mode="aspectFill" + /> + <t-image + wx:if="{{citem.selectType == 'zip'}}" + src="/static/images/bookService/detail/zip.png" + mode="aspectFill" + /> + <t-image + wx:if="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" + src="/static/images/bookService/detail/word.png" + mode="aspectFill" + /> + <t-image + wx:if="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" + src="/static/images/bookService/detail/excel.png" + mode="aspectFill" + /> + <t-image + wx:if="{{ citem.fileMap[citem.file].extension == 'ppt' || citem.fileMap[citem.file].extension == 'pptx'}}" + src="/static/images/bookService/detail/PPT.png" + mode="aspectFill" + /> </view> <!-- 浜戝涔犲浘鏍� --> - <view> - - </view> + <view> </view> <!-- 鍚嶇О --> - <text class="name">{{citem.name}}</text> + <text + class="name" + style="{{ tab == 'jsek_teachingResources' ? 'width: 300rpx;' : 'width: 400rpx;'}}" + >{{citem.name}}</text + > </view> <!-- 鏁欏璧勬簮绫诲瀷 --> - <view class="teachClass"> - {{citem.resourceClass}} - </view> - <view class="teach-btn" wx:if="{{tab == 'jsek_teachingResources'}}"> + <view class="teachClass"> {{citem.resourceClass}} </view> + <view + class="teach-btn" + wx:if="{{tab == 'jsek_teachingResources'}}" + > <!-- 涓嬭浇鎸夐挳 --> - <t-image src="/static/images/bookService/detail/download-icon.png" width="16" height="16" class="download" data-value="{{citem}}" bind:tap="downloadTeach"></t-image> + <t-image + src="/static/images/bookService/detail/download-icon.png" + width="16" + height="16" + class="download" + data-value="{{citem}}" + catchtap="downloadTeach" + ></t-image> </view> <view wx:if="{{tab == 'jsek_cloudLearning'}}"> - <t-image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{citem.isuy }}"></t-image> - <t-image src="/static/images/bookService/detail/need-buy.png" class="need-buy"></t-image> + <!-- 浜戝涔犺瘯鐪嬪浘鏍� --> + <t-image + src="/static/images/bookService/detail/shikan.png" + class="testSee" + wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}" + ></t-image> + <!-- 浜戝涔犲姞鍏ヨ喘鐗╄溅鍥炬爣 --> + <t-image + src="/static/images/bookService/detail/cart.png" + wx:if="{{citem.isShopCar}}" + class="shopCar" + ></t-image> + <!-- 浜戝涔犺喘涔板浘鏍� --> + <t-image + src="/static/images/bookService/detail/need-buy.png" + class="need-buy" + wx:if="{{citem.isbuy }}" + ></t-image> </view> </view> </view> </view> <!-- // 鍒ゆ柇 涓嶆槸鍟嗗搧 鏈夊瓙椤� 閫掑綊缁勪欢 --> - <tree wx:else treeList="{{[citem]}}" itemId="{{itemId}}"></tree> + <tree + wx:else + bookInfo="{{bookInfo}}" + treeList="{{[citem]}}" + itemId="{{itemId}}" + tab="{{tab}}" + openTeachids="{{openTeachids}}" + openLearnids="{{openLearnids}}" + ></tree> </view> <view class="listItems" wx:if="{{children.length <= 0 && !loading}}"> 鏆傛棤鏁版嵁 @@ -62,4 +172,4 @@ </view> </t-collapse-panel> </t-collapse> -</view> \ No newline at end of file +</view> diff --git a/pages/bookServices/detail/components/tree/index.wxss b/pages/bookServices/detail/components/tree/index.wxss index 26aebde..6f1e9fb 100644 --- a/pages/bookServices/detail/components/tree/index.wxss +++ b/pages/bookServices/detail/components/tree/index.wxss @@ -1,5 +1,7 @@ .tree { - --td-collapse-content-padding: 32rpx 12rpx 32rpx 32rpx; + --td-collapse-content-padding: 0rpx 12rpx 32rpx 12rpx; + --td-collapse-header-text-color: #ff6C00; + --td-collapse-icon-color: #ff6c00 } .header-title { @@ -8,9 +10,15 @@ --td-checkbox-vertical-padding: 0 } +.t-class { + background-color: #F7F7F7; +} + .t-class-content { padding: 0; } + + .contentBox { padding: 0 26rpx; @@ -55,7 +63,13 @@ } .testSee, -.need-buy { +.need-buy, +.shopCar { width: 38rpx; height: 38rpx; +} + +.testSee, +.shopCar { + margin-right: 20rpx; } \ No newline at end of file diff --git a/pages/bookServices/detail/index.js b/pages/bookServices/detail/index.js index e99bb9c..396240d 100644 --- a/pages/bookServices/detail/index.js +++ b/pages/bookServices/detail/index.js @@ -6,6 +6,7 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + bookId: '', barHeight: '', navBarHeight: '', options: { @@ -26,15 +27,20 @@ teachResources: [], teach: [], learn: [], + test: [], openTeachids: [], openLearnids: [], + openTestids: [], resourceClassList: [], // 璧勬簮鎵�灞炲垎绫� applyState: "", // 鏁欏璧勬簮鐢宠鐘舵�� deadline: "", // 鏁欏璧勬簮鐢宠鏈夋晥鏃ユ湡 rejectCause: "", // 涓嬭浇鎷掔粷鍘熷洜 buyIdList: [], shoppingCartGetId: [], // 宸茶喘涔癷d鍒楄〃 - shoppingList: [] + shoppingList: [], + loading: false, + isShowTeachDownload: false, // 鎻愮ずPC涓嬭浇寮圭獥鐘舵�� + confirmBtn: { content: '鎴戠煡閬撲簡', variant: 'base' }, }, resetTree: function (e) { @@ -51,6 +57,7 @@ const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� this.setData({ + bookId: options.id, barHeight: systInfo.statusBarHeight, navBarHeight: navBarHeight, }); @@ -63,7 +70,8 @@ this.getBookInfo(options.id); this.getResourceClass() // 鑾峰彇璧勬簮鎵�灞炲垎绫� this.getApplyInfo(options.id) - if (wx.getAccountInfoSync('jsek-token')) { + const token = wx.getStorageSync('jsek-token') + if (token) { this.getShoppingCartProductGet() } }, @@ -93,12 +101,20 @@ /** * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 */ - onPullDownRefresh() { }, + onPullDownRefresh() { + + + }, /** * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� */ - onReachBottom() { }, + onReachBottom() { + if (this.data.tabValue == 'jesk_note') { + const child = this.selectComponent('#note') + child.onReachBottom() + } + }, /** * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� @@ -195,7 +211,8 @@ freeEpubPage: [], //epub璇曡鐧惧垎姣� }, }; - app.MG.store.getProductDetail(query).then((res) => { + app.MG.store.getProductDetail(query).then(async (res) => { + this.setData({ bookDetail: res.datas, cmsDatas: res.datas.cmsDatas[0].datas, @@ -204,9 +221,10 @@ // 鑾峰彇鍥句功鍒嗙被 const iconType = JSON.parse(res.datas.bookClassification)[0][0]; const classType = JSON.parse(res.datas.bookClassification)[0][1]; + const className = await this.getBookClass(iconType, classType) this.setData({ 'bookDetail.publicationDate': this.formatDate(this.data.bookDetail.publicationDate), - 'bookDetail.class': this.getBookClass(iconType, classType), + 'bookDetail.class': className, 'bookDetail.price': this.numFormat(this.data.bookDetail.price), 'bookDetail.oldPrice': this.numFormat(this.data.bookDetail.oldPrice), 'bookDetail.paperPrice': this.numFormat(this.data.bookDetail.paperPrice), @@ -214,17 +232,17 @@ }); }, // 鑾峰彇鍥句功鍒嗙被 - getBookClass(iconType, classType) { + async getBookClass(iconType, classType) { let name = ''; const query = { refCodes: ['bookClassification'], }; - app.MG.store.getProductTypeField(query).then((res) => { + await app.MG.store.getProductTypeField(query).then((res) => { JSON.parse(res[0].config).option.forEach((item) => { if (item.value == iconType) { - item.child.forEach((item) => { - if (item.value == classType) { - name = item.name; + item.child.forEach((citem) => { + if (citem.value == classType) { + name = citem.name; } }); } @@ -293,9 +311,18 @@ || (e.detail.value == 'questionBank' && !this.data.test.length)) { this.getResourceData(checkData) } + } + } else if (e.detail.label == '浜戠瑪璁�') { + const token = wx.getStorageSync('jsek-token') + const child = this.selectComponent('#note') + child.handleSubmitTitle() + if (token) { + child.changeLoading() + child.getNoteList() + } + } - console.log('鍒囨崲', this.data.tabValue); }, // 鑾峰彇璧勬簮鎵�灞炲垎绫� getResourceClass() { @@ -310,6 +337,9 @@ }, // 鑾峰彇鏁欏璧勬簮 浜戝涔� 浜戞祴璇� getResourceData(type) { + this.setData({ + loading: true + }) let query = { path: '*', queryType: '*', @@ -340,7 +370,7 @@ const data = res.datas.cmsDatas[0].datas.filter( (item) => item.refCode == 'jsek_questionBank' ) - if (data.length) return getResourceData(data[0]) + if (data.length) return this.getResourceData(data[0]) } //鏁欏璧勬簮 浜戝涔� if (type.refCode == 'jsek_teachingResources' || type.refCode == 'jsek_cloudLearning') { @@ -351,23 +381,27 @@ }) const list = await this.getAllResource(res.datas.cmsDatas[0].datas) this.setData({ - teachResources: list, - teach: list + teach: list, + loading: false }) - this.findChildIds(this.data.teachResources, this.data.openTeachids = []) + this.findChildIds(this.data.teach, this.data.openTeachids = []) } else if (type.refCode == 'jsek_cloudLearning') { const list = await this.getAllResource(res.datas.cmsDatas[0].datas) this.setData({ - learn: list + learn: list, + loading: false }) - console.log('浜戝涔�', this.data.learn); - this.findChildIds(this.data.teachResources, this.data.openLearnids = []) + this.findChildIds(this.data.learn, this.data.openLearnids = []) } } else { // 鏃犳暟鎹� } } else if (type.refCode == 'jsek_questionBank') { - console.log('浜戞祴璇�'); + // const list = await this.getAllResource(res.datas.cmsDatas[0].datas) + this.setData({ + test: res.datas.cmsDatas[0].datas, + loading: false + }) } else { console.log('鍏朵粬'); } @@ -375,7 +409,6 @@ .catch((e) => { console.log(e) }) - console.log('淇℃伅', this.data); }, // 鑾峰彇tag涓嬫墍鏈夎祫婧� async getAllResource(data) { @@ -522,14 +555,14 @@ const endDate = JSON.parse(applyResource.feedBack).endDate // const endDate = new Date(JSON.parse(applyResource.feedBack).endDate + ' 23:59:59').getTime() if (endDate == '姘镐箙') { - // deadline.value = '姘镐箙' this.setData({ applyState: 'Normal', deadline: '姘镐箙', }) + console.log('鏈夋晥鏃ユ湡', this.data.deadline); } else { + let endTime = new Date(endDate + ' 23:59:59').getTime() - // deadline.value = endDate + ' 23:59:59' this.setData({ deadline: endDate + ' 23:59:59' }) @@ -554,9 +587,8 @@ applyState: 'none' }) } - console.log('鐢宠閫氳繃', this.data.applyState); }) - + console.log('鏈夋晥鏃ユ湡', this.data.deadline); }, // 鐢宠鏁欏璧勬簮 applyResource() { @@ -601,92 +633,102 @@ // // logIn() // } }, + // 鏁欏璧勬簮涓嬭浇鍓嶅線PC鎻愮ずDiialog + closeTeachDownload() { + this.setData({ + isShowTeachDownload: false + }) + }, + // 涓嬭浇鍔熻兘 downloadTeach(e) { - - const data = e.detail.value - // const data - // let role = userStore.userInfo ? userStore.userInfo.role : null - // if (role) { - // if (role == 'Teacher') { - if (this.properties.applyState == 'Normal' || this.properties.applyState == 'none') { - // 鏄惁鍏佽涓嬭浇 - if (data.isDownload == 1) { - // 鐢宠閫氳繃 - let url = app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' - if (data.file) { - // 鍒ゆ柇鏄惁绉佹湁 - if (data.fileMap[data.file].protectType == 'Private') - return Message.error({ - context: this, - offset: ['20rpx', '32rpx'], - duration: 5000, - content: '璇ユ枃浠舵棤娉曚笅杞�' - }) - url = url + data.file + '&token=' + wx.getStorageSync('jsek-token') - } else if (data.freeFile) { - url = url + data.freeFile + '&token=' + wx.getStorageSync('jsek-token') - } else { - Message.error({ - context: this, - offset: ['20rpx', '32rpx'], - duration: 5000, - content: '鏆傛棤璧勬簮', - }) - } - this.downloadFile(url) - } else { - Message.error({ - context: this, - offset: ['20rpx', '32rpx'], - duration: 5000, - content: '璇ヨ祫婧愭棤娉曚笅杞�', - }) - } - } else if (this.properties.applyState == 'WaitAudit') { - // ElMessageBox.confirm('璇峰厛鐢宠涓嬭浇锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { - // confirmButtonText: '鐢宠', - // cancelButtonText: '鍙栨秷', - // type: 'warning' - // }) - // .then(() => applyBookInfo()) - // .catch() - Message.error({ - context: this, - offset: ['20rpx', '32rpx'], - duration: 5000, - content: '璇ヨ祫婧愪笅杞界敵璇峰鏍镐腑', - }) - } else if (this.properties.applyState == 'Reject') { - Message.error({ - context: this, - offset: ['20rpx', '32rpx'], - duration: 5000, - content: '璧勬簮涓嬭浇鐢宠鏈�氳繃' - }) - - } else { - // Message.error({ - // context: this, - // offset: ['20rpx', '32rpx'], - // duration: 5000, - // content: '璇峰厛鐢宠涓嬭浇' - // }) - console.log('璇峰厛鐢宠涓嬭浇'); - } - // } else { - // ElMessageBox.confirm('璇峰厛杩涜鏁欏笀璁よ瘉锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { - // confirmButtonText: '鍘昏璇�', - // cancelButtonText: '鍙栨秷', - // type: 'warning' - // }) - // .then(() => { - // isShow.value = true + this.setData({ + isShowTeachDownload: true + }) + console.log('zhuan', this.data.isShowTeachDownload); + // const data = e.detail.value + // // const data + // // let role = userStore.userInfo ? userStore.userInfo.role : null + // // if (role) { + // // if (role == 'Teacher') { + // if (this.properties.applyState == 'Normal' || this.properties.applyState == 'none') { + // // 鏄惁鍏佽涓嬭浇 + // if (data.isDownload == 1) { + // // 鐢宠閫氳繃 + // let url = app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + // if (data.file) { + // // 鍒ゆ柇鏄惁绉佹湁 + // if (data.fileMap[data.file].protectType == 'Private') + // return Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '璇ユ枃浠舵棤娉曚笅杞�' + // }) + // url = url + data.file + '&token=' + wx.getStorageSync('jsek-token') + // } else if (data.freeFile) { + // url = url + data.freeFile + '&token=' + wx.getStorageSync('jsek-token') + // } else { + // Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '鏆傛棤璧勬簮', + // }) + // } + // this.downloadFile(url) + // } else { + // Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '璇ヨ祫婧愭棤娉曚笅杞�', // }) - // .catch(() => { }) + // } + // } else if (this.properties.applyState == 'WaitAudit') { + // // ElMessageBox.confirm('璇峰厛鐢宠涓嬭浇锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { + // // confirmButtonText: '鐢宠', + // // cancelButtonText: '鍙栨秷', + // // type: 'warning' + // // }) + // // .then(() => applyBookInfo()) + // // .catch() + // Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '璇ヨ祫婧愪笅杞界敵璇峰鏍镐腑', + // }) + // } else if (this.properties.applyState == 'Reject') { + // Message.error({ + // context: this, + // offset: ['20rpx', '32rpx'], + // duration: 5000, + // content: '璧勬簮涓嬭浇鐢宠鏈�氳繃' + // }) + + // } else { + // // Message.error({ + // // context: this, + // // offset: ['20rpx', '32rpx'], + // // duration: 5000, + // // content: '璇峰厛鐢宠涓嬭浇' + // // }) + // console.log('璇峰厛鐢宠涓嬭浇'); // } - // } else { - // logIn() - // } + // // } else { + // // ElMessageBox.confirm('璇峰厛杩涜鏁欏笀璁よ瘉锛�', '灏婃暚鐨勭敤鎴凤紝鎮ㄥソ锛�', { + // // confirmButtonText: '鍘昏璇�', + // // cancelButtonText: '鍙栨秷', + // // type: 'warning' + // // }) + // // .then(() => { + // // isShow.value = true + // // }) + // // .catch(() => { }) + // // } + // // } else { + // // logIn() + // // } }, downloadFile(url) { wx.downloadFile({ @@ -726,6 +768,7 @@ return false } }, + // 鑾峰彇宸茶喘涔板晢鍝� getShoppingCartProductGet() { let query = { start: 0, @@ -742,7 +785,6 @@ shoppingList: res.datas, shoppingCartGetId: list }) - console.log('璐拱', this.data); }) }, // 鍒ゆ柇璧勬簮鍔犲叆璐墿杞︽寜閽槸鍚︽樉绀� @@ -762,5 +804,140 @@ } else { return false } - } + }, + // 閬嶅巻鏍戠粨鏋勮浆鎹负鏁扮粍鏂规硶 + handleTreeData(array) { + const flattenedArray = [] + array.forEach((node) => { + // 灏嗗綋鍓嶈妭鐐规坊鍔犲埌灞曞紑鐨勬暟缁勪腑 + flattenedArray.push(node) + // 閫掑綊澶勭悊瀛愯妭鐐� + if (node.children && node.children.length > 0) { + const childrenArray = this.handleTreeData(node.children) + flattenedArray.push(...childrenArray) + } + }) + return flattenedArray.filter((item) => item.sysType == 'CmsItem') + }, + // 浜戝涔犱竴閿鍙� + async getFreeResource() { + const child = this.selectComponent('#learn-resource') + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + let arr = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) + let freeIds = arr.filter((item) => { + return item.saleMethod[0].Price == 0 + }) + if (!freeIds.length) return wx.showToast({ + icon: "error", + title: '鏆傛棤鍏嶈垂璧勬簮', + }) + child.changeReceive(true) + let requests = [] + freeIds.forEach((item, index) => { + if (this.resourceIsBuy(item)) { + requests.push({ + saleMethodId: item.saleMethod[0].Id, + count: 1 + }) + } + }) + + let query = { + remarks: '浜戝涔�', + requests, + } + try { + const initOrderRes = await app.MG.store.initOrder(query) + let parameter = { + orderNum: initOrderRes.orderNumber + } + // 纭璁㈠崟 + const confirmOrderRes = await app.MG.store.confirmOrder(parameter) + if (confirmOrderRes.orderNumber) { + child.changeReceive(false) + wx.showToast({ + title: '棰嗗彇鎴愬姛', + }) + this.getBookInfo(this.data.bookId) + } + } catch (error) { + console.log(error) + } + }, + // 浜戝涔犱竴閿喘涔� + async allAddShoppiingCar() { + const child = this.selectComponent('#learn-resource') + const token = wx.getStorageSync('jsek-token') + if (!token) { + return wx.getUserProfile({ + desc: '鐢ㄦ埛鐧诲綍', + success: (res) => { + console.log(res); + } + }) + } + let shopList = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) + this.getShoppingCartProductGet() + if (!shopList.length) return wx.showToast({ + icon: "error", + title: '宸插叏閮ㄨ喘涔�', + }) + child.changeBuy(true) + let requests = [] + shopList.forEach((item) => { + requests.push({ + saleMethodId: item.saleMethod[0].Id, + count: 1, + }) + }) + let query = { + remarks: '浜戝涔�', + requests, + } + const initOrderRes = await app.MG.store.initOrder(query) + child.changeBuy(false) + // 妫�鏌ヨ鍗曞彿鏄惁瀛樺湪 + if (initOrderRes.orderNumber) { + // bookService: orderNumber.value, 灏戜紶杩欎釜 锛屾殏鏃朵笉鐭ラ亾鏈変粈涔堢敤 + wx.navigateTo({ + url: `/pages/cart/paymentPage/index?&bookId=${this.data.bookDetail.id}&bookName=${this.data.bookDetail.name}&orderNum=${initOrderRes.orderNumber}`, + }) + } else { + // 璁㈠崟鍙蜂笉瀛樺湪锛屾樉绀鸿鍛婃秷鎭� + wx.showToast({ + icon: "error", + title: '璇烽噸璇�', + }) + } + }, + // 鍙樹负鎵�鏈塩heck true + findAndUpdateItemsByIds(tree, ids) { + function findAndUpdate(node) { + if (ids.includes(node.id)) { + node.checked = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true + } + if (node.children && node.children.length > 0) { + for (let child of node.children) { + findAndUpdate(child); // 閫掑綊澶勭悊瀛愯妭鐐� + } + } + } + + for (let node of tree) { + findAndUpdate(node); // 瀵规瘡涓《灞傝妭鐐规墽琛屾煡鎵惧拰鏇存柊鎿嶄綔 + } + return tree; // 杩斿洖淇敼鍚庣殑瀹屾暣鏁扮粍 + }, + handleTrue() { + // findAndUpdateItemsByIds(this.date.) + }, + }) diff --git a/pages/bookServices/detail/index.json b/pages/bookServices/detail/index.json index 7f5888d..72d8522 100644 --- a/pages/bookServices/detail/index.json +++ b/pages/bookServices/detail/index.json @@ -9,9 +9,13 @@ "book-brief": "/pages/bookServices/detail/components/brief/index", "teach-resource": "/pages/bookServices/detail/components/teachResource/index", "learn-resource": "/pages/bookServices/detail/components/learnResource/learnResource", + "test-resource": "/pages/bookServices/detail/components/testResource/testResource", + "note": "/pages/bookServices/detail/components/note/note", "tree": "/pages/bookServices/detail/components/tree/index", "suggest": "/pages/bookServices/detail/components/suggest/suggest", - "t-loading": "tdesign-miniprogram/loading/loading" + "t-loading": "tdesign-miniprogram/loading/loading", + "t-dialog": "tdesign-miniprogram/dialog/dialog" }, - "navigationStyle": "custom" + "navigationStyle": "custom", + "onReachBottomDistance": 200 } \ No newline at end of file diff --git a/pages/bookServices/detail/index.wxml b/pages/bookServices/detail/index.wxml index 9b67d3c..fff1970 100644 --- a/pages/bookServices/detail/index.wxml +++ b/pages/bookServices/detail/index.wxml @@ -3,29 +3,48 @@ <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" /> + <t-icon + name="chevron-left" + size="30" + data-name="{{item}}" + bind:click="goBack" + /> </view> <view class="navbar-title">{{options.name}}</view> </view> -<scroll-view scroll-y="{{true}}" class="book"> +<scroll-view scroll-y="{{true}}" class="book" bindscrolltolower="onReachBottom"> <!-- 鍥句功璇︽儏 --> <view class="book-box"> <view class="book-detail"> <view class="detail-left"> <view class="book-img"> - <t-image src="{{bookDetail.icon}}" mode="aspectFill" width="120" height="170" aria-label="{{bookDetail.name}}" /> + <t-image + src="{{bookDetail.icon}}" + mode="aspectFill" + width="120" + height="170" + aria-label="{{bookDetail.name}}" + /> </view> <view class="book-use"> <view class="collect" bind:tap="setCollect"> <view> - <t-image src="/static/images/bookService/detail/collect.png" wx:if="{{!bookDetail.isFavourite}}"></t-image> - <t-image src="/static/images/bookService/detail/collecting.png" wx:if="{{bookDetail.isFavourite}}"></t-image> + <t-image + src="/static/images/bookService/detail/collect.png" + wx:if="{{!bookDetail.isFavourite}}" + ></t-image> + <t-image + src="/static/images/bookService/detail/collecting.png" + wx:if="{{bookDetail.isFavourite}}" + ></t-image> </view> <view class="use-title">鏀惰棌</view> </view> <view class="suggest" bind:tap="suggestBtn"> <view> - <t-image src="/static/images/bookService/detail/suggest.png"></t-image> + <t-image + src="/static/images/bookService/detail/suggest.png" + ></t-image> </view> <view class="use-title">鎴戣寤鸿</view> </view> @@ -50,9 +69,13 @@ <view class="li-title">鍑虹増鏃堕棿锛�</view> <view class="li-content">{{bookDetail.publicationDate}}</view> </view> - <view class="message-li"> + <view + class="message-li" + wx:if="{{bookDetail.class}}" + style="height: 80rpx" + > <view class="li-title">鍥句功鍒嗙被锛�</view> - <view class="li-content">{{bookDetail.class}}</view> + <view class="class-name showTow">{{bookDetail.class}}</view> </view> </view> </view> @@ -63,11 +86,16 @@ <!-- 鐢靛瓙涔﹀敭浠� --> <view class="electron-price"> <view> - <t-image src="/static/images/bookService/detail/electon-price.png"></t-image> + <t-image + src="/static/images/bookService/detail/electon-price.png" + ></t-image> </view> <view class="price"> - <view class="price-text">楼{{bookDetail.price == '0.00' ? '鍏嶈垂' :bookDetail.price}}</view> - <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}">楼{{bookDetail.oldPrice}} <view class="line"></view> + <view class="price-text" + >楼{{bookDetail.price == '0.00' ? '鍏嶈垂' :bookDetail.price}}</view + > + <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}" + >楼{{bookDetail.oldPrice}} <view class="line"></view> </view> </view> <view> </view> @@ -75,37 +103,132 @@ <!-- 绾歌川涔﹀敭浠� --> <view class="paper-price"> <view> - <t-image src="/static/images/bookService/detail/paper-price.png"></t-image> + <t-image + src="/static/images/bookService/detail/paper-price.png" + ></t-image> </view> - <view class="price">楼{{bookDetail.paperPrice == '0.00' ? '鍏嶈垂' : bookDetail.paperPrice}}</view> + <view class="price" + >楼{{bookDetail.paperPrice == '0.00' ? '鍏嶈垂' : + bookDetail.paperPrice}}</view + > </view> </view> <!-- 缃戝簵 --> <view class="book-web"> - <t-image src="/static/images/bookService/detail/jd.png" wx:if="{{bookDetail.JDLink}}" bind:tap="goShop" data-link="{{bookDetail.tmallLink}}" data-type="jd"></t-image> - <t-image src="/static/images/bookService/detail/tmall.png" width="32" height="22" bind:tap="goShop" data-link="{{bookDetail.tmallLink}}" wx:if="{{bookDetail.tmallLink}}"></t-image> - <t-image src="/static/images/bookService/detail/dangdang.png" bind:tap="goShop" data-link="{{bookDetail.dangdangLink}}" wx:if="{{bookDetail.dangdangLink}}"></t-image> - <t-image src="/static/images/bookService/detail/jd.png" bind:tap="goShop" data-link="{{bookDetail.weidianLink}}" wx:if="{{bookDetail.weidianLink}}"></t-image> + <t-image + src="/static/images/bookService/detail/jd.png" + wx:if="{{bookDetail.JDLink}}" + bind:tap="goShop" + data-link="{{bookDetail.tmallLink}}" + data-type="jd" + ></t-image> + <t-image + src="/static/images/bookService/detail/tmall.png" + width="32" + height="22" + bind:tap="goShop" + data-link="{{bookDetail.tmallLink}}" + wx:if="{{bookDetail.tmallLink}}" + ></t-image> + <t-image + src="/static/images/bookService/detail/dangdang.png" + bind:tap="goShop" + data-link="{{bookDetail.dangdangLink}}" + wx:if="{{bookDetail.dangdangLink}}" + ></t-image> + <t-image + src="/static/images/bookService/detail/jd.png" + bind:tap="goShop" + data-link="{{bookDetail.weidianLink}}" + wx:if="{{bookDetail.weidianLink}}" + ></t-image> </view> </view> </view> <view class="book-resource"> - <t-tabs defaultValue="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" class="tab-class"> + <t-tabs + defaultValue="{{tabValue}}" + bind:change="onTabsChange" + t-class="custom-tabs" + t-class-content="custom-panel" + class="tab-class" + > <t-tab-panel label="鍥句功绠�浠�" value="brief" style="{{tabPanelstyle}}"> - <book-brief content="{{bookDetail.content}}" authorIntroduction="{{bookDetail.authorIntroduction}}"></book-brief> + <book-brief + content="{{bookDetail.content}}" + authorIntroduction="{{bookDetail.authorIntroduction}}" + ></book-brief> </t-tab-panel> <t-tab-panel label="鐢靛瓙涔�" value="1" style="{{tabPanelstyle}}"> 鐢靛瓙涔� </t-tab-panel> - <t-tab-panel label="鏁欏璧勬簮" value="jsek_teachingResources"> - <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" bind:applyResource="applyResource"></teach-resource> - <tree treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" bind:downloadTeach="downloadTeach"></tree> + <t-tab-panel + label="鏁欏璧勬簮" + value="jsek_teachingResources" + class="{{loading ? 'loading': ''}}" + > + <view wx:if="{{!loading && teach.length}}"> + <teach-resource + applyState="{{applyState}}" + rejectCause="{{rejectCause}}" + bind:applyResource="applyResource" + ></teach-resource> + <tree + bookInfo="{{bookDetail}}" + treeList="{{teach}}" + tab="{{tabValue}}" + applyState="{{applyState}}" + bind:downloadTeach="downloadTeach" + openTeachids="{{openTeachids}}" + ></tree> + </view> + <t-loading + theme="circular" + size="60rpx" + class="loading" + loading="{{loading}}" + /> </t-tab-panel> - <t-tab-panel label="浜戝涔�" value="jsek_cloudLearning" style="{{tabPanelstyle}}"> - <learn-resource></learn-resource> - <tree tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}"></tree> + <t-tab-panel + label="浜戝涔�" + value="jsek_cloudLearning" + style="{{tabPanelstyle}}" + > + <view wx:if="{{!loading && learn.length}}"> + <learn-resource + bind:getFreeResource="getFreeResource" + bind:allAddShoppiingCar="allAddShoppiingCar" + id="learn-resource" + ></learn-resource> + <tree + bookInfo="{{bookDetail}}" + tab="{{tabValue}}" + treeList="{{learn}}" + buyIds="{{buyIdList}}" + openLearnids="{{openLearnids}}" + ></tree> + </view> </t-tab-panel> - <t-tab-panel label="浜戞祴璇�" value="questionBank" style="{{tabPanelstyle}}">閫夐」鍥涘唴瀹�</t-tab-panel> + <t-tab-panel + label="浜戞祴璇�" + value="questionBank" + style="{{tabPanelstyle}}" + > + <view wx:if="{{!loading && test.length}}"> + <test-resource + list="{{test}}" + bookInfo="{{bookDetail}}" + ></test-resource> + </view> + </t-tab-panel> + <t-tab-panel label="浜戠瑪璁�" value="jesk_note" style="{{tabPanelstyle}}"> + <note + bookInfo="{{bookDetail}}" + id="note" + class="note-list" + bind:changeLoaidng="changeLoaidng" + ></note> + </t-tab-panel> </t-tabs> </view> <!-- 璐拱鎸夐挳 --> @@ -118,7 +241,9 @@ </view> <view class="bottom-btn"> <view> - <t-image src="/static/images/bookService/detail/paper-book.png"></t-image> + <t-image + src="/static/images/bookService/detail/paper-book.png" + ></t-image> </view> <view class="btn-text">绾歌川鏍蜂功鐢宠</view> </view> @@ -127,4 +252,18 @@ </view> </scroll-view> <!-- 鎴戣寤鸿寮圭獥 --> -<suggest class="suggest-component" id="suggest-component"></suggest> \ No newline at end of file +<suggest + class="suggest-component" + id="suggest-component" + bookIcon="{{bookDetail.icon}}" + bookName="{{bookDetail.name}}" +></suggest> +<!-- 鏁欏璧勬簮涓嬭浇鎻愮ず寮圭獥 --> +<t-dialog +class="teachDownloadDialog" + visible="{{isShowTeachDownload}}" + title="鎻愮ず" + content="璇峰墠寰�PC绔笅杞�" + confirm-btn="{{ confirmBtn }}" + bind:confirm="closeTeachDownload" +/> diff --git a/pages/bookServices/detail/index.wxss b/pages/bookServices/detail/index.wxss index 35cea5c..3fbcf6f 100644 --- a/pages/bookServices/detail/index.wxss +++ b/pages/bookServices/detail/index.wxss @@ -33,9 +33,22 @@ } .detail-right .book-name { + width: 420rpx; font-weight: bold; font-size: 36rpx; color: #000000; + margin-bottom: 30rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.showTow { + word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; } .book-message { @@ -60,6 +73,12 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; +} + +.class-name { + height: 2.5em; + width: 280rpx; + font-size: 28rpx; } .book-use { @@ -153,6 +172,7 @@ .book-web { margin-left: 30rpx; + display: flex; } .book-web image { @@ -239,4 +259,26 @@ .tab-box { min-height: 550rpx; +} + +.note-list { + /* margin-bottom: 80rpx; */ +} + +.tab-class { + --td-loading-color: #ff6c00 +} + +.loading { + min-height: 550rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.teachDownloadDialog { + --td-button-primary-bg-color: #ff6c00; + --td-button-primary-border-color: #ff6c00; + --td-button-primary-active-bg-color: #ff984d; + --td-button-primary-active-border-color: #ff984d; } \ No newline at end of file diff --git a/pages/bookServices/examination/examination.js b/pages/bookServices/examination/examination.js new file mode 100644 index 0000000..a8bc3ce --- /dev/null +++ b/pages/bookServices/examination/examination.js @@ -0,0 +1,339 @@ +const app = getApp() +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + barHeight: "", + navBarHeight: "", + loading: false, + answerTitle: "", // 瀵艰埅鏍忔爣棰� + bookId: "", + productLinkPath: "", + rootCmsItemId: "", + idPathList: [], // 棰樼洰鍒楄〃 + answerType: "", // 绛旈绫诲瀷 + submitStatus: false, // 鎻愪氦鐘舵�� + currentIndex: 0, // 褰撳墠绛旈鏁� + collectList: [], // 鏀惰棌棰樼洰鍒楄〃 + subjectiveNum: 0, // 涓昏棰樺緱鍒� + subjectiveGrade: 0, // 涓昏棰樻�诲垎 + total: 0, // 棰樼洰鎬绘暟 + correctNum: 0, // 姝g‘棰樼洰鏁伴噺 + cardList: [], // 鎻愪氦椤�, + questionDataList: [] + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + this.setData({ + barHeight: systInfo.statusBarHeight, + navBarHeight: navBarHeight, + answerTitle: options.answerTitle, + bookId: options.bookId, + productLinkPath: options.productLinkPath, + rootCmsItemId: options.rootCmsItemId, + idPathList: JSON.parse(options.idPathList), + answerType: options.answerType + }); + this.init() + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + }, + // 杩斿洖 + goBack() { + wx.navigateBack(); + }, + // 鍒濆鍖栧嚱鏁� + async init() { + if (this.data.answerType == 'option') { + // 娴嬭瘯绛旈 + await this.getCollectIdList() // 鑾峰彇鏀惰棌id鍒楄〃 + // await getErrorList() // 鑾峰彇閿欓id鍒楄〃 + } + }, + // 鑾峰彇鏀惰棌棰樼洰鍒楄〃id + getCollectIdList() { + app.MG.identity + .getUserKey({ + domain: 'collectData', + keys: [this.data.rootCmsItemId] + }) + .then(async (res) => { + try { + this.setData({ + collectList: JSON.parse(res[0].value) + }) + } catch (error) { + } + if (this.data.answerType == 'option') { + // 鍏堣幏鍙栫敤鎴风瓟棰樿褰� + await this.getAnswerInfo((res) => { + if (res.length) { + // 鏈夎褰曪紝涓嶈兘绛旈锛岀姸鎬佽涓哄凡鎻愪氦 + this.setData({ + submitStatus: true + }) + let value = JSON.parse(res[0].value) + // console.log('绛旈璁板綍', JSON.parse(res[0].value)) + // 鏈夌瓟棰樿褰曪紝寰楀垎璧嬪�� + if (value) { + value.dataList.forEach((item) => { + if (item.name == '瀹㈣棰樺緱鍒�' && item.path == this.data.productLinkPath) + this.setData({ + subjectiveNum: item.score + }) + }) + } + this.setData({ + currentIndex: value.currentIndex + }) + // 鎼哄甫绛旈璁板綍 鑾峰彇棰樼洰 + this.getQuestionList(value.dataList) + } else { + this.getQuestionList() // 鑾峰彇棰樺簱棰樼洰 + } + }) + } + }) + }, + // 鑾峰彇棰樺簱棰樼洰 + getQuestionList(oldData) { + // 娓呯┖姝g‘棰樻暟璁板綍 + this.setData({ + correctNum: 0 + }) + let flag = 0 + this.data.idPathList.forEach((pathitem) => { + const pathList = this.data.cardList + pathList.push({ + name: pathitem.name, + path: pathitem.productLinkPath, + catalogName: pathitem.type, + infoList: [] + }) + this.setData({ + cardList: pathList + }) + // 鑾峰彇棰樼洰 + let questionArr = [] + let query = { + path: '*', + queryType: '*', + productId: this.data.bookId, + cmsPath: pathitem.productLinkPath, + itemFields: { + // SysType: 'CmsFolder', + Embedded_QuestionBank_Stem: [], + Embedded_QuestionBank_AnalysisCon: [], + Embedded_QuestionBank_Answer: [], + Embedded_QuestionBank_Option: [], + Embedded_QuestionBank_QuestionType: [], + Embedded_QuestionBank_StemStyle: [], + Embedded_QuestionBank_OptionStyle: [], + Embedded_QuestionBank_KnowledgePoint: [], + Embedded_QuestionBank_Difficulty: [] + }, + pading: { + start: 0, + size: 999 + } + } + app.MG.store.getProductDetail(query).then((res) => { + this.setData({ + total: res.datas.cmsDatas[0].datas.length + }) + // total.value += res.datas.cmsDatas[0].datas.length + let oldList + if (oldData) { + // 鎻愪氦杩囷紝瀛樺湪绛旈璁板綍 + oldList = oldData.find((item) => item.path == pathitem.productLinkPath).infoList + this.setData({ + submitStatus: true + }) + } + res.datas.cmsDatas[0].datas.forEach((item, index) => { + let oldObj = '' + if (oldList) oldObj = oldList.find((oldItem) => oldItem.id == item.id) + let questionObj = { + // num: index, // 棰樺彿 + id: item.id, + stem: + item.Embedded_QuestionBank_QuestionType == 'completion' + ? JSON.parse(item.Embedded_QuestionBank_Stem) + .stemTxt.replaceAll('<vacancy>', ',input,') + .split(',') + : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共 + answer: item.Embedded_QuestionBank_Answer, // 绛旀 + option: item.Embedded_QuestionBank_Option + ? JSON.parse(item.Embedded_QuestionBank_Option) + : '', // 閫夋嫨棰橀�夐」 + analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽 + questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷 + optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷 + stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷 + difficulty: item.Embedded_QuestionBank_Difficulty + ? 4 - item.Embedded_QuestionBank_Difficulty + : 0, // 闅惧害绛夌骇 + userAnswer: oldObj + ? oldObj.userAnswer + : item.Embedded_QuestionBank_QuestionType == 'completion' || + item.Embedded_QuestionBank_QuestionType == 'multipleChoice' + ? [] + : '', + isRight: oldObj ? oldObj.isRight : null, + isComplete: oldObj ? oldObj.isComplete : false, + isCollect: this.data.collectList.indexOf(item.id) > -1 ? true : false, + isUnfold: '' // 鎺у埗瑙f瀽鐨勬姌鍙犻潰鏉挎槸鍚﹀睍寮� + } + // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡 + if ( + questionObj.questionType == 'completion' || + questionObj.questionType == 'multipleChoice' + ) { + try { + questionObj.answer = JSON.parse(questionObj.answer) + } catch (error) { + questionObj.answer = item.Embedded_QuestionBank_Answer + } + } + // 濉┖棰樻敼閫� + if (questionObj.questionType == 'completion') { + let index = 0 + for (let i = 0; i < questionObj.stem.length; i++) { + const item = questionObj.stem[i] + if (item == 'input') { + questionObj.stem[i] = { + num: index, + data: 'input' + } + if (!oldObj) questionObj.userAnswer[index] = '' + index++ + } + } + } + questionArr.push(questionObj) + // 鏃ф暟鎹噷 棰樼洰宸茬粡浣滅瓟锛屼慨鏀瑰凡绛旈鐩暟閲� + // if (oldObj && oldObj.userAnswer.length > 0) countDownRef.value.changeAlready() + // 鏃ф暟鎹噷 棰樼洰姝g‘ 璁板綍姝g‘鏁伴噺 + if (questionObj.isRight) { + this.setData({ + correctNum: this.data.correctNum + 1 + }) + } + // if (pathitem.name == '鍒ゆ柇棰�') { + // topicList.value.judge.data = questionArr + // topicList.value.judge.path = pathitem.productLinkPath + // if (oldData) subjectiveTotal.value += 1 // 鏈夋棫鏁版嵁锛岃绠椾富瑙傞鏁� + // } else if (pathitem.name == '濉┖棰�') { + // topicList.value.gap.data = questionArr + // topicList.value.gap.path = pathitem.productLinkPath + // if (oldData) subjectiveTotal.value += 1 + // } else if (pathitem.name == '澶氶�夐') { + // topicList.value.check.data = questionArr + // topicList.value.check.path = pathitem.productLinkPath + // if (oldData) subjectiveTotal.value += 1 + // } else if (pathitem.name == '鍗曢�夐') { + // topicList.value.radio.data = questionArr + // topicList.value.radio.path = pathitem.productLinkPath + // if (oldData) subjectiveTotal.value += 1 + // } else if (pathitem.name == '绠�绛旈') { + // topicList.value.short.data = questionArr + // topicList.value.short.path = pathitem.productLinkPath + // } else if (pathitem.name == '缈昏瘧棰�') { + // topicList.value.translate.data = questionArr + // topicList.value.translate.path = pathitem.productLinkPath + // } else if (pathitem.name == '鍚姏棰�') { + // topicList.value.listen.data = questionArr + // topicList.value.listen.path = pathitem.productLinkPath + // if (oldData) subjectiveTotal.value += 1 + // } + let infoList = + this.data.cardList[this.data.cardList.findIndex((item) => item.path == pathitem.productLinkPath)] + .infoList + infoList.push(questionObj) + flag++; + let questionList = [] + // if (flag == this.data.idPathList.length) { + this.data.cardList.forEach(aitem => { + aitem.infoList.forEach(bitem => { + questionList.push(bitem) + bitem.number = questionList.length + }) + }) + this.setData({ + questionDataList: questionList + }) + // } + }) + }) + }) + this.setData({ + loading: false, + }) + console.log('棰樼洰鍒楄〃', this.data.questionDataList, this.data.cardList); + }, + // 鑾峰彇绛旈鏁版嵁 + getAnswerInfo(callback) { + app.MG.identity + .getUserKey({ + domain: 'answerData', + keys: [this.data.productLinkPath] + }) + .then((res) => { + if (callback) callback(res) + }) + } +}) \ No newline at end of file diff --git a/pages/bookServices/examination/examination.json b/pages/bookServices/examination/examination.json new file mode 100644 index 0000000..2365a43 --- /dev/null +++ b/pages/bookServices/examination/examination.json @@ -0,0 +1,11 @@ +{ + "usingComponents": { + "question-options": "/pages/bookServices/examination/questionOptions/index", + "question-schedule": "/pages/bookServices/examination/questionSchedule/index", + "question-list": "/pages/bookServices/examination/questionList/index", + "t-icon": "tdesign-miniprogram/icon/icon", + "t-image": "tdesign-miniprogram/image/image", + "t-button": "tdesign-miniprogram/button/button" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/bookServices/examination/examination.wxml b/pages/bookServices/examination/examination.wxml new file mode 100644 index 0000000..25d54f3 --- /dev/null +++ b/pages/bookServices/examination/examination.wxml @@ -0,0 +1,24 @@ +<!--pages/examination/examination.wxml--> +<!--瀵艰埅鍖哄煙 --> +<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">{{answerTitle}}</view> +</view> +<view class="page-content"> + <question-schedule></question-schedule> + <question-list questionList="{{questionDataList}}"></question-list> +</view> + +<!-- 搴曢儴鍖哄煙--> + +<view class="page-bottom"> + <question-options></question-options> +</view> diff --git a/pages/bookServices/examination/examination.wxss b/pages/bookServices/examination/examination.wxss new file mode 100644 index 0000000..82abb98 --- /dev/null +++ b/pages/bookServices/examination/examination.wxss @@ -0,0 +1,23 @@ +/* pages/examination/examination.wxss */ + +.nacigationBar { + display: flex; + align-items: center; +} + +.navbar-title { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: #0F1214; + font-size: 40rpx; + font-weight: 600; +} + +.page-content { + box-sizing: border-box; + width: 100%; + height: 78vh; + padding: 20rpx; + background-color: #F2F3F8; +} \ No newline at end of file diff --git a/pages/bookServices/examination/questionList/index.js b/pages/bookServices/examination/questionList/index.js new file mode 100644 index 0000000..75b694a --- /dev/null +++ b/pages/bookServices/examination/questionList/index.js @@ -0,0 +1,44 @@ +// pages/bookServices/examination/questionList/index.js + +const imageCdn = 'https://tdesign.gtimg.com/mobile/demos'; +const swiperList = [ + `${imageCdn}/swiper1.png`, + `${imageCdn}/swiper2.png`, + `${imageCdn}/swiper1.png`, + `${imageCdn}/swiper2.png`, + `${imageCdn}/swiper1.png`, +]; + +Component({ + /** + * 缁勪欢鐨勫睘鎬у垪琛� + */ + properties: { + questionList: { + type: Array, + value: [] + } + }, + created() { + console.log('缁勪欢浼犲弬', this.properties); + }, + /** + * 缁勪欢鐨勫垵濮嬫暟鎹� + */ + data: { + current: 2, + autoplay: true, + duration: 500, + interval: 5000, + paginationPosition: 'bottom-right', + swiperList, + navigation: { type: 'fraction' }, + }, + + /** + * 缁勪欢鐨勬柟娉曞垪琛� + */ + methods: { + + } +}) diff --git a/pages/bookServices/examination/questionList/index.json b/pages/bookServices/examination/questionList/index.json new file mode 100644 index 0000000..e44c80e --- /dev/null +++ b/pages/bookServices/examination/questionList/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "t-swiper": "tdesign-miniprogram/swiper/swiper", + "t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav" + } +} \ No newline at end of file diff --git a/pages/bookServices/examination/questionList/index.wxml b/pages/bookServices/examination/questionList/index.wxml new file mode 100644 index 0000000..91ed472 --- /dev/null +++ b/pages/bookServices/examination/questionList/index.wxml @@ -0,0 +1,13 @@ +<!--pages/bookServices/examination/questionList/index.wxml--> +<view class="question-list"> + <!-- 棰樺瀷title --> + <view class="question-title"> + <text class="title-name">鍗曢�夐</text><text class="title-score">(姣忛2鍒�)</text> + </view> + <!-- 棰樼洰鍒楄〃 --> + <swiper> + <swiper-item wx:for="{{questionList}}"> + <text>{{item.stem.stemTxt}}</text> + </swiper-item> + </swiper> +</view> diff --git a/pages/bookServices/examination/questionList/index.wxss b/pages/bookServices/examination/questionList/index.wxss new file mode 100644 index 0000000..691bc42 --- /dev/null +++ b/pages/bookServices/examination/questionList/index.wxss @@ -0,0 +1,25 @@ +/* pages/bookServices/examination/questionList/index.wxss */ +.question-list { + width: 100%; + height: 90%; + padding: 20rpx; + background-color: #ffffff; + border-radius: 20rpx; + margin-top: 20rpx; +} + +.question-title { + font-size: 28rpx; + margin-bottom: 20rpx; +} + +.title-name { + padding: 6rpx; + background-color: #ff6c00; + color: #ffffff; + margin-right: 10rpx; +} + +.title-score { + color: #000; +} \ No newline at end of file diff --git a/pages/bookServices/examination/questionOptions/index.js b/pages/bookServices/examination/questionOptions/index.js new file mode 100644 index 0000000..d4fb8ec --- /dev/null +++ b/pages/bookServices/examination/questionOptions/index.js @@ -0,0 +1,23 @@ +// pages/bookServices/examination/questionOptions/index.js +Component({ + /** + * 缁勪欢鐨勫睘鎬у垪琛� + */ + properties: { + + }, + + /** + * 缁勪欢鐨勫垵濮嬫暟鎹� + */ + data: { + btnStyle: "width:320rpx;border-radius:60rpx", + }, + + /** + * 缁勪欢鐨勬柟娉曞垪琛� + */ + methods: { + + } +}) diff --git a/pages/bookServices/examination/questionOptions/index.json b/pages/bookServices/examination/questionOptions/index.json new file mode 100644 index 0000000..5a5e332 --- /dev/null +++ b/pages/bookServices/examination/questionOptions/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon", + "t-image": "tdesign-miniprogram/image/image", + "t-button": "tdesign-miniprogram/button/button" + } +} \ No newline at end of file diff --git a/pages/bookServices/examination/questionOptions/index.wxml b/pages/bookServices/examination/questionOptions/index.wxml new file mode 100644 index 0000000..10464c9 --- /dev/null +++ b/pages/bookServices/examination/questionOptions/index.wxml @@ -0,0 +1,24 @@ +<!--pages/bookServices/examination/questionOptions/index.wxml--> +<view class="page-bottom"> + <view class="li-option"> + <t-image src="/static/images/bookService/examination/collect.png"></t-image> + 鏀惰棌 + </view> + <view class="li-option"> + <t-image + src="/static/images/bookService/examination/questionCard.png" + ></t-image> + 绛旈鍗� + </view> + <view class="li-option"> + <t-image src="/static/images/bookService/examination/setting.png"></t-image> + 璁剧疆 + </view> + <view class="li-option"> + <t-image src="/static/images/bookService/examination/reset.png"></t-image> + 閲嶅仛 + </view> + <view class="bottom-submit"> + <t-button theme="primary" size="large" style="{{btnStyle}}">鎻愪氦</t-button> + </view> +</view> diff --git a/pages/bookServices/examination/questionOptions/index.wxss b/pages/bookServices/examination/questionOptions/index.wxss new file mode 100644 index 0000000..baf2e8d --- /dev/null +++ b/pages/bookServices/examination/questionOptions/index.wxss @@ -0,0 +1,31 @@ +/* pages/bookServices/examination/questionOptions/index.wxss */ +.page-bottom { + display: flex; + justify-content: space-evenly; + align-items: center; + position: fixed; + bottom: 30rpx; + width: 100%; + height: 180rpx; + /* background-color: red; */ +} + +.li-option { + display: flex; + flex-direction: column; + align-items: center; + font-size: 24rpx; + color: #010101; +} + +.page-bottom image { + width: 36rpx; + height: 36rpx; +} + +.bottom-submit { + --td-button-primary-bg-color: #ff6c00; + --td-button-primary-border-color: #FF6C00; + --td-button-primary-active-bg-color: #ff984d; + --td-button-primary-active-border-color: #ff984d; +} \ No newline at end of file diff --git a/pages/bookServices/examination/questionSchedule/index.js b/pages/bookServices/examination/questionSchedule/index.js new file mode 100644 index 0000000..04dcf5d --- /dev/null +++ b/pages/bookServices/examination/questionSchedule/index.js @@ -0,0 +1,115 @@ + +// pages/bookServices/examination/questionSchedule/questionSchedule.js +Component({ + /** + * 缁勪欢鐨勫睘鎬у垪琛� + */ + properties: { + + }, + created() { + // if (props.answerType == 'option') { + // this.startCountdown() + this.setData({ + countdownTime: 2 * 60 * 60 * 1000 + }) + // } + }, + detached() { + if (this.data.countdownInterval !== null) { + clearInterval(this.data.countdownInterval) + } + }, + + /** + * 缁勪欢鐨勫垵濮嬫暟鎹� + */ + data: { + countdownInterval: null, // 璁℃椂鍣� + isCountdownRunning: true, // 鏄惁鍊掕鏃� + countdownTime: "", // 鏃堕棿 + showTime: '', + }, + observers: { + 'countdownTime': function (newValue, oldValue) { + const showTime = this.formatTime(this.data.countdownTime) + this.setData({ + showTime: showTime + }) + console.log(this.data.showTime); + } + }, + /** + * 缁勪欢鐨勬柟娉曞垪琛� + */ + methods: { + // 鏍煎紡鍖栨椂闂� + formatTime(ms) { + const hours = Math.floor((ms / (1000 * 60 * 60)) % 24) + .toString() + .padStart(2, '0') + const minutes = Math.floor((ms / (1000 * 60)) % 60) + .toString() + .padStart(2, '0') + const seconds = Math.floor((ms / 1000) % 60) + .toString() + .padStart(2, '0') + return `${hours}:${minutes}:${seconds}` + }, + // 鑾峰彇淇濆瓨鐨勫�掕鏃舵椂闂� + getSavedTime() { + const savedTime = wx.getStorageSync('countdownTime') + return savedTime ? parseInt(savedTime) : null + }, + // 淇濆瓨鍊掕鏃舵椂闂村埌鏈湴瀛樺偍 + saveTime() { + wx.setStorageSync('countdownTime', this.data.countdownTime.toString()) + }, + clearTime() { + this.setData({ + countdownTime: 2 * 60 * 60 * 1000 + }) + }, + // 鏆傚仠鎴栫户缁�掕鏃� + toggleCountdown() { + if (countdownInterval) { + clearInterval(this.data.countdownInterval) + this.setData({ + countdownInterval: null, + isCountdownRunning: false + }) + } else { + this.startCountdown() + this.setData({ + isCountdownRunning: true + }) + } + }, + // 寮�濮嬪�掕鏃� + startCountdown() { + // 濡傛灉璁℃椂鍣ㄥ凡缁忓瓨鍦紝鍏堟竻闄や箣鍓嶇殑璁℃椂鍣� + if (this.data.countdownInterval) { + clearInterval(this.data.countdownInterval) + this.setData({ + countdownInterval: null + }) + } + this.setData({ + countdownInterval: setInterval(() => { + this.setData({ + countdownTime: this.data.countdownTime - 1000 + }) + if (this.data.countdownTime <= 0) { + clearInterval(this.data.countdownInterval) + this.setData({ + countdownTime: 0, + isCountdownRunning: false + }) + } + this.saveTime() + }, 1000) + }) + + } + } +}) diff --git a/pages/bookServices/examination/questionSchedule/index.json b/pages/bookServices/examination/questionSchedule/index.json new file mode 100644 index 0000000..880ce46 --- /dev/null +++ b/pages/bookServices/examination/questionSchedule/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "t-progress": "tdesign-miniprogram/progress/progress" + } +} \ No newline at end of file diff --git a/pages/bookServices/examination/questionSchedule/index.wxml b/pages/bookServices/examination/questionSchedule/index.wxml new file mode 100644 index 0000000..59cd07d --- /dev/null +++ b/pages/bookServices/examination/questionSchedule/index.wxml @@ -0,0 +1,11 @@ +<!--pages/bookServices/examination/questionSchedule/questionSchedule.wxml--> +<view class="schedule"> + <view class="schedule-top"> + <view class="question-schedule">绛旈杩涘害<text class="parimary-color question-num">1</text> <text>/18</text></view> + <view class="remainder">鍓╀綑鏃堕棿 <text class="parimary-color">{{showTime}}</text></view> + </view> + <view class="schedule-progress"> + <t-progress percentage="80" color="#ff6c00" label="" /> + </view> + +</view> \ No newline at end of file diff --git a/pages/bookServices/examination/questionSchedule/index.wxss b/pages/bookServices/examination/questionSchedule/index.wxss new file mode 100644 index 0000000..c806b93 --- /dev/null +++ b/pages/bookServices/examination/questionSchedule/index.wxss @@ -0,0 +1,32 @@ +/* pages/bookServices/examination/questionSchedule/questionSchedule.wxss */ +.schedule { + background-color: #ffffff; + padding: 20rpx; + font-size: 28rpx; + border-radius: 20rpx; +} + +.schedule-top { + display: flex; + justify-content: space-between; +} + +.question-schedule { + color: #000; +} + +.schedule-progress { + margin-top: 20rpx; +} + +.remainder { + color: #545C63; +} + +.parimary-color { + color: #ff6c00; +} + +.question-num { + margin-left: 10rpx; +} \ No newline at end of file diff --git a/pages/bookServices/list/index.js b/pages/bookServices/list/index.js index 890c3b9..ccb63b6 100644 --- a/pages/bookServices/list/index.js +++ b/pages/bookServices/list/index.js @@ -9,7 +9,11 @@ searchValue: '', path: '', pathList: [], - page: 1, + pageCount: { + page: 1, + total: 0, + }, + isMore: null, assortCheck: { name: '', code: '', @@ -135,6 +139,24 @@ */ onReachBottom(e) { console.log('搴曢儴'); + const flag = this.data.bookList.length < this.data.pageCount.total + if (flag) { + this.setData({ + isMore: true, + "pageCount.page": this.data.pageCount.page + 1 + }) + this.getBookList(this.data.path) + } else { + this.setData({ + isMore: true, + }) + setTimeout(() => { + this.setData({ + isMore: false + }) + }, 100) + console.log('娌℃湁鏇村浜�'); + } }, /** @@ -299,8 +321,8 @@ height: 145, }, paging: { - start: (this.data.page - 1) * 16, - size: 16, + start: 0, + size: this.data.pageCount.page * 8, }, fields: { author: [], @@ -313,8 +335,10 @@ app.MG.store.getProductList(query).then((res) => { this.setData({ bookList: res.datas, - enable: false + enable: false, + "pageCount.total": res.total }); + console.log('鍥句功鍒楄〃', res, this.data.pageCount); }); }, // 涓�绾у垎绫诲垏鎹� diff --git a/pages/bookServices/list/index.json b/pages/bookServices/list/index.json index 8b16d4b..32e63d7 100644 --- a/pages/bookServices/list/index.json +++ b/pages/bookServices/list/index.json @@ -5,8 +5,8 @@ "t-icon": "tdesign-miniprogram/icon/icon", "t-image": "tdesign-miniprogram/image/image", "t-search": "tdesign-miniprogram/search/search", - "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh" + "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", + "t-loading": "tdesign-miniprogram/loading/loading" }, - "navigationStyle": "custom", - "onReachBottomDistance": 250 + "navigationStyle": "custom" } \ No newline at end of file diff --git a/pages/bookServices/list/index.wxml b/pages/bookServices/list/index.wxml index 22b1df3..c06275a 100644 --- a/pages/bookServices/list/index.wxml +++ b/pages/bookServices/list/index.wxml @@ -26,7 +26,7 @@ </view> </view> <t-pull-down-refresh value="{{enable}}" loadingProps="{{loadingProps}}" loadingTexts="{{['涓嬫媺鍒锋柊', '鏉炬墜鍒锋柊', '姝e湪鍒锋柊', '鍒锋柊瀹屾垚']}}" bind:refresh="onRefresh"> - <scroll-view scroll-y="{{true}}" class="list-container"> + <scroll-view scroll-y="{{true}}" class="list-container" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom"> <view class="assort-title"> <view class="title-box"></view> <view class="title-name">{{assortCheck.name}}</view> @@ -40,6 +40,10 @@ <view class="book-author book-color">{{item.author}}</view> </view> </view> + <view class="bottom-box"> + <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> + <text wx:if="{{isMore == false}}">娌℃湁鏇村浜�</text> + </view> </scroll-view> </t-pull-down-refresh> </view> \ No newline at end of file diff --git a/pages/bookServices/list/index.wxss b/pages/bookServices/list/index.wxss index 4e86439..f708171 100644 --- a/pages/bookServices/list/index.wxss +++ b/pages/bookServices/list/index.wxss @@ -39,7 +39,7 @@ .list-container { height: 80vh; margin-top: 20rpx; - background-color: #fff; + /* background-color: #fff; */ } .assort-title { @@ -69,7 +69,7 @@ .book-box { box-sizing: border-box; width: 48%; - background-color: #f7f7f7; + background-color: #fff; display: flex; flex-direction: column; align-items: center; @@ -93,6 +93,7 @@ .book-name { margin-top: 24rpx; + color: #333; width: 100%; font-size: 28rpx; font-weight: 700; @@ -101,15 +102,25 @@ -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; - text-align: center; + text-align: left; } .book-author { + color: #333; margin-top: 16rpx; width: 100%; font-size: 24rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - text-align: center; + text-align: left; +} + +.bottom-box { + display: flex; + justify-content: center; + color: #999; + height: 80rpx; + font-size: 28rpx; + --td-loading-color: #ff6c00 } \ No newline at end of file diff --git a/pages/cart/paymentPage/index.wxml b/pages/cart/paymentPage/index.wxml index 3490e0e..6ba3df7 100644 --- a/pages/cart/paymentPage/index.wxml +++ b/pages/cart/paymentPage/index.wxml @@ -17,10 +17,10 @@ - + <!-- <t-button t-class="wrapper" theme="primary" size="large" variant="outline" data-key="showCloseBtn" bind:tap="showDialog" block> 甯﹀叧闂寜閽� - </t-button> + </t-button> --> <t-dialog visible="{{showCloseBtn}}" close-btn bind:confirm="closeDialog" bind:cancel="closeDialog"> <view slot="content" class="slotContent"> <view class="myQrcodeBox"> diff --git a/pages/resourceDetails/document/index.js b/pages/resourceDetails/document/index.js new file mode 100644 index 0000000..6c099d4 --- /dev/null +++ b/pages/resourceDetails/document/index.js @@ -0,0 +1,66 @@ +// pages/resourceDetails/document/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/resourceDetails/document/index.json b/pages/resourceDetails/document/index.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/resourceDetails/document/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/resourceDetails/document/index.wxml b/pages/resourceDetails/document/index.wxml new file mode 100644 index 0000000..ad417e7 --- /dev/null +++ b/pages/resourceDetails/document/index.wxml @@ -0,0 +1,6 @@ +<!--pages/resourceDetails/document/index.wxml--> +<text>pages/resourceDetails/document/index.wxml</text> +<view> + + +</view> \ No newline at end of file diff --git a/pages/resourceDetails/document/index.wxss b/pages/resourceDetails/document/index.wxss new file mode 100644 index 0000000..d156ce8 --- /dev/null +++ b/pages/resourceDetails/document/index.wxss @@ -0,0 +1 @@ +/* pages/resourceDetails/document/index.wxss */ \ No newline at end of file diff --git a/pages/resourceDetails/index.js b/pages/resourceDetails/index.js deleted file mode 100644 index d0aca67..0000000 --- a/pages/resourceDetails/index.js +++ /dev/null @@ -1,76 +0,0 @@ -// pages/resourceDetails/index.js -Page({ - - /** - * 椤甸潰鐨勫垵濮嬫暟鎹� - */ - data: { - navBarHeight: '', - barHeight: '', - vURL: 'http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400' - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - const systInfo = wx.getSystemInfoSync(); - const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 - const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� - this.setData({ - - navBarHeight: navBarHeight, - barHeight: systInfo.statusBarHeight, - - }) - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 - */ - onReady() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず - */ - onShow() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 - */ - onHide() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 - */ - onUnload() { - - }, - - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom() { - - }, - - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/pages/resourceDetails/index.wxml b/pages/resourceDetails/index.wxml deleted file mode 100644 index 240b234..0000000 --- a/pages/resourceDetails/index.wxml +++ /dev/null @@ -1,13 +0,0 @@ -<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="videoBox"> - <video src="{{vURL}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> -</view> \ No newline at end of file diff --git a/pages/resourceDetails/index.wxss b/pages/resourceDetails/index.wxss deleted file mode 100644 index 35232d2..0000000 --- a/pages/resourceDetails/index.wxss +++ /dev/null @@ -1,25 +0,0 @@ -/* pages/resourceDetails/index.wxss */ -.nacigationBar { - background-color: #fff; - display: flex; - align-items: center; - -} - -.navbar-title { - white-space: nowrap; - /* overflow: hidden; */ - text-overflow: ellipsis; - color: #0F1214; - font-size: 40rpx; - font-weight: bold; - margin-bottom: 5rpx; -} - -.videoBox { - width: 100%; -} - -.videoBox video { - width: 100vw; -} \ No newline at end of file diff --git a/pages/resourceDetails/myAudio/index.js b/pages/resourceDetails/myAudio/index.js new file mode 100644 index 0000000..fe06808 --- /dev/null +++ b/pages/resourceDetails/myAudio/index.js @@ -0,0 +1,52 @@ +// audio.js +Page({ + data: { + poster: 'http://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000', + name: '姝ゆ椂姝ゅ埢', + author: '璁稿穽', + src: 'http://182.92.203.7:3001/file/api/ApiDownload?md5=aa72e586dd93b7c2633bee6320bc6c76', + navBarHeight: '', + barHeight: '', + + }, + onLoad(options) { + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + + this.setData({ + navBarHeight: navBarHeight, + barHeight: systInfo.statusBarHeight, + }) + }, + onReady: function (e) { + // 浣跨敤 wx.createAudioContext 鑾峰彇 audio 涓婁笅鏂� context + this.audioCtx = wx.createAudioContext('myAudio') + }, + + audioPlay: function () { + this.audioCtx.play() + }, + audioPause: function () { + this.audioCtx.pause() + }, + audio14: function () { + this.audioCtx.seek(14) + }, + audioStart: function () { + this.audioCtx.seek(0) + }, + goBack() { + wx.navigateBack() + }, + + + MusicStart: function (e) { + var progress = parseInt((e.detail.currentTime / e.detail.duration) * 100) + var that = this + that.setData({ + progress: progress + }) + console.log('闊充箰鎾斁杩涘害涓�' + progress + '%') + }, +}) \ No newline at end of file diff --git a/pages/resourceDetails/index.json b/pages/resourceDetails/myAudio/index.json similarity index 100% rename from pages/resourceDetails/index.json rename to pages/resourceDetails/myAudio/index.json diff --git a/pages/resourceDetails/myAudio/index.wxml b/pages/resourceDetails/myAudio/index.wxml new file mode 100644 index 0000000..4449e6d --- /dev/null +++ b/pages/resourceDetails/myAudio/index.wxml @@ -0,0 +1,39 @@ +<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="audioBox"> + <view class=""> + <image class="imageFront" src="/static/images/resourceDetailsMyAudio/cd.png" mode="aspectFit" /> + <image class=" imageAfter" src="/static/images/resourceDetailsMyAudio/video-bg.png" mode="aspectFit" /> + </view> + <view class="controlBox"> + + <image src="/static/images/resourceDetailsMyAudio/shangyizhang.png" mode="" /> + <image bindtap="audioPlay" src="/static/images/resourceDetailsMyAudio/zanting.png" mode="" /> + <image bindtap="audioPause" src="/static/images/resourceDetailsMyAudio/xiayizhang.png" mode="" /> + + + <image src="/static/images/resourceDetailsMyAudio/Full screen.png" mode="" /> + <!-- <view class="free-MusicProgress"> + <view style="width:{{progress}}%;"></view> + </view> --> + </view> + + +</view> +<audio wx:if="{{false}}" bindtimeupdate="MusicStart" poster="{{poster}}" name="{{name}}" author="{{author}}" src="{{src}}" id="myAudio" controls loop> + + +</audio> +<!-- <button type="primary" >鎾斁</button> +<button type="primary">鏆傚仠</button> +<button type="primary" bindtap="audio14">璁剧疆褰撳墠鎾斁鏃堕棿涓�14绉�</button> +<button type="primary" bindtap="audioStart">鍥炲埌寮�澶�</button> --> \ No newline at end of file diff --git a/pages/resourceDetails/myAudio/index.wxss b/pages/resourceDetails/myAudio/index.wxss new file mode 100644 index 0000000..498b3dc --- /dev/null +++ b/pages/resourceDetails/myAudio/index.wxss @@ -0,0 +1,66 @@ +/* pages/resourceDetails/myAudio/index.wxss */ +.nacigationBar { + background-color: #fff; + display: flex; + align-items: center; + +} + +.navbar-title { + white-space: nowrap; + /* overflow: hidden; */ + text-overflow: ellipsis; + color: #0F1214; + font-size: 40rpx; + font-weight: bold; + margin-bottom: 5rpx; +} + +.audioBox { + width: 100%; + height: 350rpx; +} + +.imageFront { + width: 300rpx; + height: 300rpx; + position: absolute; + top: 150rpx; + left: 250rpx; +} + +.imageAfter { + width: 100%; +} + +.controlBox { + width: 750rpx; + height: 96rpx; + background: #000000; + border-radius: 0rpx 0rpx 0rpx 0rpx; + opacity: 0.6; + position: relative; +} + +.controlBox image { + width: 45rpx; + height: 45rpx; + margin: 20rpx 35rpx; +} + +audio { + position: relative; +} + +.free-MusicProgress { + position: absolute; + width: 78%; + left: 21.7%; + bottom: 1px; + background: #C3C3C3; +} + +.free-MusicProgress>view { + background: #48c23d; + height: 5px; +} \ No newline at end of file diff --git a/pages/resourceDetails/myVideo/index.js b/pages/resourceDetails/myVideo/index.js new file mode 100644 index 0000000..a954285 --- /dev/null +++ b/pages/resourceDetails/myVideo/index.js @@ -0,0 +1,243 @@ +// pages/resourceDetails/index.js +const app = getApp() + +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + navBarHeight: '', + barHeight: '', + + tabPanelstyle: 'display:flex;justify-content:center;align-items:center;', + activeValues: [0], + dialogKey: true, + style: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;', + activeId: '', + bookId: '', + bookName: '', + cmsId: '', + parentName: '', + parentProductLinkPath: '', + productLinkPath: '', + threeLeveData: [], + showData: '', + src: '', + selectedId: null, + topicId: '' + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(this.data.dialogKey, 'dialogKey'); + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + + this.setData({ + navBarHeight: navBarHeight, + barHeight: systInfo.statusBarHeight, + activeId: options.activeId, + bookId: options.bookId, + bookName: options.bookName, + cmsId: options.cmsId, + parentName: options.parentName, + parentProductLinkPath: options.parentProductLinkPath, + productLinkPath: options.productLinkPath + }) + console.log(this.data.parentProductLinkPath, 'parentProductLinkPath'); + this.resourceDetailsData() + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + }, + onTabsChange(event) { + + }, + + onTabsClick(event) { + + }, handleChange(e) { + this.setData({ + activeValues: e.detail.value, + }); + }, + onTakeNotes() { + + }, + showDialog(e) { + const { key } = e.currentTarget.dataset; + this.setData({ [key]: true, dialogKey: key }); + }, + + closeDialog() { + + this.setData({ + dialogKey: false + }); + }, + goBack() { + wx.navigateBack(); + }, + resourceDetailsData() { + + + let query = { + path: '*', + queryType: '*', + productId: this.data.bookId, + cmsPath: this.data.parentProductLinkPath, + itemFields: { + SysType: 'CmsFolder', + // 璧勬簮绫诲瀷锛岃瘯璇绘枃浠讹紝鏄惁鍏佽涓嬭浇绛夊弬鏁� + selectType: [], + freeFile: [], + file: [], + protectedFile: [], + resourcesClassification: [], + isDownload: [], + jsek_resourceBrief: [], + jsek_link: [], + jsek_questionBank: [], + learnSelectType: [] + }, + pading: { + start: 0, + size: 999 + } + } + + app.MG.store.getProductDetail(query).then(res => { + console.log(res, 'res'); + + const list = [] + + res.datas.cmsDatas[0].datas.forEach((item) => { + this.data.threeLeveData.push(item) + list.push(item) + this.setData({ + threeLeveData: list + }) + + if (this.data.productLinkPath == item.productLinkPath) { + console.log(item, 'item'); + this.setData({ + showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file + }) + } + // console.log(this.data.threeLeveData, 'threeLeveData'); + }) + + }) + }, + onVideo(e) { + + this.setData({ + selectedId: e.currentTarget.dataset.index, + }) + + + + // console.log(e); + const item = e.currentTarget.dataset.item + // console.log(item); + if (item.selectType == "video") { + console.log(item.file); + this.setData({ + showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file + }) + console.log(this.data.showData); + } else { + console.log(app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file); + } + }, + + getProductUserSubmitTopicGet() { + app.MG.ugc.getProductUserSubmitTopic({ + productId: this.data.bookId, + appRefCode: app.config.appRefCode + }).then((res) => { + console.log(res); + + this.setData({ + topicId: res.id + }) + }) + }, + + + + newTopicMessageGet() { + let query = { + topicIdOrRefCode: topicId + '', + name: titleText.value, + content: form.value.noteContent, + type: 'note', + cmsTypeRefCode: '', + newDataListRequest: [] + } + app.MG.ugc.newTopicMessage(query).then(res => { + console.log(res); + }) + }, + // currentTarget + onConfirm() { + console.log(1111); + + }, + onCancellation() { + console.log(222); + + this.data.dialogKey = false + + } +}) \ No newline at end of file diff --git a/pages/resourceDetails/myVideo/index.json b/pages/resourceDetails/myVideo/index.json new file mode 100644 index 0000000..c22808e --- /dev/null +++ b/pages/resourceDetails/myVideo/index.json @@ -0,0 +1,14 @@ +{ + "component": true, + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon", + "t-tabs": "tdesign-miniprogram/tabs/tabs", + "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", + "t-collapse": "tdesign-miniprogram/collapse/collapse", + "t-collapse-panel": "tdesign-miniprogram/collapse-panel/collapse-panel", + "t-button": "tdesign-miniprogram/button/button", + "t-dialog": "tdesign-miniprogram/dialog/dialog", + "t-input": "tdesign-miniprogram/input/input" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/resourceDetails/myVideo/index.wxml b/pages/resourceDetails/myVideo/index.wxml new file mode 100644 index 0000000..4986c71 --- /dev/null +++ b/pages/resourceDetails/myVideo/index.wxml @@ -0,0 +1,79 @@ +<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="videoBox"> + <video src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> + +</view> + +<!-- 鏍囬 --> +<view class="titleBox">鍩虹鏁欒偛鐮旂┒鑳屾櫙鎬讳綋璁捐</view> + +<view class="contentBox"> + <t-tabs defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel"> + <!-- 璧勬簮鍒楄〃 --> + <t-tab-panel label="璧勬簮鍒楄〃" value="0" style="{{tabPanelstyle}}" style="width: 750rpx;"> + <view class="wrapper"> + <t-collapse value="{{activeValues}}" bind:change="handleChange"> + <t-collapse-panel header="{{parentName}}" value="{{0}}" expandIcon> + + <view class="detailsName" wx:for="{{threeLeveData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="onVideo" data-item="{{item}}" data-index="{{index}}"> + <view style="color: {{selectedId == index ? '#ff6c00' : '#000'}}">{{item.name}}</view> + </view> + + + </t-collapse-panel> + </t-collapse> + </view> + </t-tab-panel> + <!-- 绗旇灞曠ず --> + <t-tab-panel label="绗旇" value="1" style="{{tabPanelstyle}}"> + <view class="wrapper"> + <t-collapse value="{{activeValues}}" bind:change="handleChange"> + <t-collapse-panel header="绗�1绗�1璇炬椂 璇剧▼瑙嗛" value="{{0}}" expandIcon> + <view> 姝ゅ鍙嚜瀹氫箟鍐呭姝ゅ鍙嚜瀹氫箟鍐呭姝ゅ鍙嚜瀹氫箟鍐呭姝ゅ鍙嚜瀹氫箟鍐呭姝ゅ鍙嚜瀹氫箟鍐呭姝ゅ鍙嚜瀹氫箟鍐呭姝ゅ鍙嚜瀹氫箟鍐呭姝ゅ鍙嚜瀹氫箟鍐呭</view> + <view class="operateBox"> + <view>2023-08-29</view> + <view class="iconBox"> + <image src="/static/images/resourceDetails/jibijiicon2.png" mode="" /> + <image src="/static/images/resourceDetails/jibijiicon3.png" mode="" /> + </view> + </view> + </t-collapse-panel> + </t-collapse> + </view> + </t-tab-panel> + </t-tabs> + + <!-- 璁扮瑪璁� --> + <view class="takeNotes" data-key="showCloseBtn" bind:tap="showDialog"> + <view class="takeNotesLining"> + <image src="/static/images/resourceDetails/jibijii.png" mode="" /> 璁扮瑪璁� + </view> + </view> +</view> + + +<!-- 璁扮瑪璁板脊绐� --> +<t-dialog visible="{{showCloseBtn}}" close-btn bind:confirm="closeDialog" bind:cancel="closeDialog"> + <view slot='title' class="dialogTitleBox">涓�銆侀亾寰蜂笌鍝佸痉鐨勫叧绯�-鏈夎瘯鐪� + <image class="titleImageBox" src="/static/images/resourceDetails/edit.png" alt="" /> + </view> + <view slot='content'> + <view class="input-example"> + <view class="input-example__label"> 鍐呭 </view> + <t-input class="inputBox" placeholder="璇疯緭鍏ユ枃瀛�" borderless="{{true}}" style="{{style}}" /> + </view> + <view class="buttonBox"> + <view> + <t-button bind:tap="onCancellation" style="margin: 20rpx 30rpx;" variant="outline" size="extra-small">鍙栨秷</t-button> + <t-button bind:tap="onConfirm" style="margin: 20rpx 30rpx;" theme="primary" size="extra-small">纭</t-button> + </view> + </view> + </view> +</t-dialog> \ No newline at end of file diff --git a/pages/resourceDetails/myVideo/index.wxss b/pages/resourceDetails/myVideo/index.wxss new file mode 100644 index 0000000..a338176 --- /dev/null +++ b/pages/resourceDetails/myVideo/index.wxss @@ -0,0 +1,162 @@ +/* pages/resourceDetails/index.wxss */ +.nacigationBar { + background-color: #fff; + display: flex; + align-items: center; + +} + +.navbar-title { + white-space: nowrap; + /* overflow: hidden; */ + text-overflow: ellipsis; + color: #0F1214; + font-size: 40rpx; + font-weight: bold; + margin-bottom: 5rpx; +} + +.videoBox { + width: 100%; +} + +.videoBox video { + width: 100vw; +} + +.titleBox { + margin: 30rpx; + border-bottom: 1px #f4f4f4 solid; + padding-bottom: 20rpx; + font-weight: bold; + +} + +.contentBox { + position: relative; +} + +.contentBox .custom-tabs { + /* margin-bottom: 32rpx; */ + width: 400rpx; +} + + +.t-tabs__content { + width: 750rpx !important; + overflow: auto !important; +} + + +.custom-panel { + /* height: 120px; */ + width: 750rpx; + /* height: 200rpx; */ + +} + +.contentBox .takeNotes { + + position: absolute; + top: 5rpx; + right: 0; + width: 350rpx; + border-bottom: 1px solid #f4f4f4; + +} + +.takeNotes image { + width: 30rpx; + height: 30rpx; + margin-top: 10rpx; + margin-right: 10rpx; +} + +.takeNotesLining { + margin: 25rpx; + display: flex; + justify-content: flex-end; +} + +.operateBox { + display: flex; + align-items: flex-end; + justify-content: space-between; + +} + +.iconBox { + display: flex; +} + +.iconBox image { + width: 26rpx; + height: 26rpx; + margin: 0 10rpx; +} + +.t-dialog__content { + padding: 0 !important; +} + +.titleImageBox { + width: 40rpx; + height: 40rpx; + margin-left: 20rpx; +} + +.dialogTitleBox { + margin: 30rpx; + border-bottom: 1px #f4f4f4 solid; + padding-bottom: 20rpx; + font-weight: bold; + display: flex; + align-items: center; +} + +.input-example { + --td-input-vertical-padding: 24rpx; + + background-color: #fff; + padding: 32rpx 32rpx 16rpx; +} + +.input-example__label { + color: rgba(0, 0, 0, 0.9); + font-size: 24rpx; + line-height: 40rpx; + margin: 0 8rpx 16rpx; +} + +.buttonBox { + display: flex; + justify-content: flex-end; + +} + +/* .inputBox { + height: 500rpx; +} */ + + +.detailsName { + margin: 30rpx; + width: 90%; + height: 60rpx; + display: flex; + align-items: center; + background: #F4F4F4; + padding-left: 20rpx; +} + +.detailsName:hover { + background-color: #fff0e6; + width: 90%; + height: 60rpx; + color: #ff6c00; +} + +.audioBox { + width: 750rpx; + height: 200rpx; +} \ No newline at end of file diff --git a/pages/retrievalPage/index.wxml b/pages/retrievalPage/index.wxml index 8e32bfc..bbd2708 100644 --- a/pages/retrievalPage/index.wxml +++ b/pages/retrievalPage/index.wxml @@ -24,7 +24,7 @@ <view class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> <view class="imageBox"> - <image src="{{item.icon}}" mode="" /> + <image src="{{item.icon}}" mode="aspectFill" /> </view> <view class="bookDataNmae"> {{item.name}} diff --git a/static/images/bookService/detail/cart.png b/static/images/bookService/detail/cart.png new file mode 100644 index 0000000..7c47503 --- /dev/null +++ b/static/images/bookService/detail/cart.png Binary files differ diff --git a/static/images/bookService/detail/compliceHover.png b/static/images/bookService/detail/compliceHover.png new file mode 100644 index 0000000..b54b8d1 --- /dev/null +++ b/static/images/bookService/detail/compliceHover.png Binary files differ diff --git a/static/images/bookService/detail/cuoti.png b/static/images/bookService/detail/cuoti.png new file mode 100644 index 0000000..957f39b --- /dev/null +++ b/static/images/bookService/detail/cuoti.png Binary files differ diff --git a/static/images/bookService/detail/deleteHover.png b/static/images/bookService/detail/deleteHover.png new file mode 100644 index 0000000..508a5ca --- /dev/null +++ b/static/images/bookService/detail/deleteHover.png Binary files differ diff --git a/static/images/bookService/detail/edit.png b/static/images/bookService/detail/edit.png new file mode 100644 index 0000000..92eabc6 --- /dev/null +++ b/static/images/bookService/detail/edit.png Binary files differ diff --git a/static/images/bookService/detail/feedback.png b/static/images/bookService/detail/feedback.png new file mode 100644 index 0000000..666e540 --- /dev/null +++ b/static/images/bookService/detail/feedback.png Binary files differ diff --git a/static/images/bookService/detail/lianxi-icon.png b/static/images/bookService/detail/lianxi-icon.png new file mode 100644 index 0000000..26d76fe --- /dev/null +++ b/static/images/bookService/detail/lianxi-icon.png Binary files differ diff --git a/static/images/bookService/detail/makeNote.png b/static/images/bookService/detail/makeNote.png new file mode 100644 index 0000000..a8656d1 --- /dev/null +++ b/static/images/bookService/detail/makeNote.png Binary files differ diff --git a/static/images/bookService/detail/note-icon.png b/static/images/bookService/detail/note-icon.png new file mode 100644 index 0000000..79983be --- /dev/null +++ b/static/images/bookService/detail/note-icon.png Binary files differ diff --git a/static/images/bookService/detail/practice-icon.png b/static/images/bookService/detail/practice-icon.png new file mode 100644 index 0000000..77fd505 --- /dev/null +++ b/static/images/bookService/detail/practice-icon.png Binary files differ diff --git a/static/images/bookService/detail/test-icon.png b/static/images/bookService/detail/test-icon.png new file mode 100644 index 0000000..7d30971 --- /dev/null +++ b/static/images/bookService/detail/test-icon.png Binary files differ diff --git a/static/images/bookService/detail/wodeshoucang.png b/static/images/bookService/detail/wodeshoucang.png new file mode 100644 index 0000000..7b11cda --- /dev/null +++ b/static/images/bookService/detail/wodeshoucang.png Binary files differ diff --git a/static/images/bookService/detail/zujuan.png b/static/images/bookService/detail/zujuan.png new file mode 100644 index 0000000..7105f1b --- /dev/null +++ b/static/images/bookService/detail/zujuan.png Binary files differ diff --git a/static/images/bookService/examination/collect.png b/static/images/bookService/examination/collect.png new file mode 100644 index 0000000..7a94c22 --- /dev/null +++ b/static/images/bookService/examination/collect.png Binary files differ diff --git a/static/images/bookService/examination/questionCard.png b/static/images/bookService/examination/questionCard.png new file mode 100644 index 0000000..3ba2376 --- /dev/null +++ b/static/images/bookService/examination/questionCard.png Binary files differ diff --git a/static/images/bookService/examination/reset.png b/static/images/bookService/examination/reset.png new file mode 100644 index 0000000..8787b21 --- /dev/null +++ b/static/images/bookService/examination/reset.png Binary files differ diff --git a/static/images/bookService/examination/setting.png b/static/images/bookService/examination/setting.png new file mode 100644 index 0000000..457c4f4 --- /dev/null +++ b/static/images/bookService/examination/setting.png Binary files differ diff --git a/static/images/resourceDetails/jibijii.png b/static/images/resourceDetails/jibijii.png new file mode 100644 index 0000000..3254e62 --- /dev/null +++ b/static/images/resourceDetails/jibijii.png Binary files differ diff --git a/static/images/resourceDetails/jibijiicon2.png b/static/images/resourceDetails/jibijiicon2.png new file mode 100644 index 0000000..2474666 --- /dev/null +++ b/static/images/resourceDetails/jibijiicon2.png Binary files differ diff --git a/static/images/resourceDetails/jibijiicon3.png b/static/images/resourceDetails/jibijiicon3.png new file mode 100644 index 0000000..2f29c09 --- /dev/null +++ b/static/images/resourceDetails/jibijiicon3.png Binary files differ diff --git a/static/images/resourceDetailsMyAudio/Full screen.png b/static/images/resourceDetailsMyAudio/Full screen.png new file mode 100644 index 0000000..a02cb37 --- /dev/null +++ b/static/images/resourceDetailsMyAudio/Full screen.png Binary files differ diff --git a/static/images/resourceDetailsMyAudio/cd.png b/static/images/resourceDetailsMyAudio/cd.png new file mode 100644 index 0000000..0a7da9b --- /dev/null +++ b/static/images/resourceDetailsMyAudio/cd.png Binary files differ diff --git "a/static/images/resourceDetailsMyAudio/jibiji\357\274\217icon.png" "b/static/images/resourceDetailsMyAudio/jibiji\357\274\217icon.png" new file mode 100644 index 0000000..3254e62 --- /dev/null +++ "b/static/images/resourceDetailsMyAudio/jibiji\357\274\217icon.png" Binary files differ diff --git a/static/images/resourceDetailsMyAudio/shangyizhang.png b/static/images/resourceDetailsMyAudio/shangyizhang.png new file mode 100644 index 0000000..967175c --- /dev/null +++ b/static/images/resourceDetailsMyAudio/shangyizhang.png Binary files differ diff --git a/static/images/resourceDetailsMyAudio/video-bg.png b/static/images/resourceDetailsMyAudio/video-bg.png new file mode 100644 index 0000000..ef7692f --- /dev/null +++ b/static/images/resourceDetailsMyAudio/video-bg.png Binary files differ diff --git a/static/images/resourceDetailsMyAudio/xiayizhang.png b/static/images/resourceDetailsMyAudio/xiayizhang.png new file mode 100644 index 0000000..f602c12 --- /dev/null +++ b/static/images/resourceDetailsMyAudio/xiayizhang.png Binary files differ diff --git a/static/images/resourceDetailsMyAudio/zanting.png b/static/images/resourceDetailsMyAudio/zanting.png new file mode 100644 index 0000000..ea77a1f --- /dev/null +++ b/static/images/resourceDetailsMyAudio/zanting.png Binary files differ -- Gitblit v1.9.1