From fc3ef2decfc6bef3ccb6caf92486ee027a721877 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 11 三月 2024 18:30:15 +0800 Subject: [PATCH] feat(he): he --- static/images/resourceDetailsMyAudio/cd.png | 0 pages/resourceDetails/myVideo/index.wxml | 23 pages/resourceDetails/myVideo/index.wxss | 26 + pages/bookExhibitionList/index.js | 89 +++-- pages/bookExhibitionDetails/index.js | 23 + pages/resourceDetails/myVideo/index.json | 0 static/images/resourceDetailsMyAudio/jibiji/icon.png | 0 pages/bookExhibitionDetails/index.wxml | 8 pages/resourceDetails/document/index.js | 66 ++++ pages/resourceDetails/document/index.wxml | 6 static/images/resourceDetailsMyAudio/video-bg.png | 0 pages/bookExhibitionDetails/index.wxss | 17 + pages/resourceDetails/document/index.wxss | 1 pages/resourceDetails/myAudio/index.wxml | 39 ++ pages/cart/paymentPage/index.wxml | 4 pages/bookExhibitionList/index.wxss | 16 + pages/bookExhibitionList/index.wxml | 19 pages/resourceDetails/myVideo/index.js | 243 ++++++++++++++++ pages/resourceDetails/myAudio/index.wxss | 66 ++++ pages/bookExhibitionList/index.json | 3 app.json | 4 /dev/null | 106 ------- static/images/resourceDetailsMyAudio/zanting.png | 0 pages/resourceDetails/myAudio/index.json | 6 static/images/resourceDetailsMyAudio/shangyizhang.png | 0 pages/bookExhibitionDetails/index.json | 5 pages/resourceDetails/myAudio/index.js | 52 +++ static/images/resourceDetailsMyAudio/Full screen.png | 0 pages/bookServices/detail/components/tree/index.js | 16 pages/resourceDetails/document/index.json | 3 static/images/resourceDetailsMyAudio/xiayizhang.png | 0 31 files changed, 663 insertions(+), 178 deletions(-) diff --git a/app.json b/app.json index 7b12d5f..570463c 100644 --- a/app.json +++ b/app.json @@ -1,6 +1,8 @@ { "pages": [ - "pages/resourceDetails/index", + "pages/resourceDetails/myAudio/index", + "pages/resourceDetails/myVideo/index", + "pages/resourceDetails/document/index", "pages/retrievalPage/index", "pages/cart/paymentPage/index", "pages/cart/index", 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 e9a00db..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="璇疯緭鍏ヤ功灞曞悕绉�" 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 6d82580..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 { diff --git a/pages/bookServices/detail/components/tree/index.js b/pages/bookServices/detail/components/tree/index.js index 11f74cb..c7c1b33 100644 --- a/pages/bookServices/detail/components/tree/index.js +++ b/pages/bookServices/detail/components/tree/index.js @@ -80,12 +80,20 @@ goPlayer(e) { const item = e.currentTarget.dataset.item const parent = e.currentTarget.dataset.parent - console.log(item.selectType); - debugger + // "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: `/pages/resourceDetails/index?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}`, + 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}`, }) - console.log(e); }, // 鎷垮埌鎵�鏈夐」 getAllChildren(id) { 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 c244f46..0000000 --- a/pages/resourceDetails/index.js +++ /dev/null @@ -1,106 +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', - tabPanelstyle: 'display:flex;justify-content:center;align-items:center;', - activeValues: [0], - dialogKey: false, - style: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;', - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - 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() { - - }, - onTabsChange(event) { - console.log(`Change tab, tab-panel value is ${event.detail.value}.`); - }, - - onTabsClick(event) { - console.log(`Click tab, tab-panel value is ${event.detail.value}.`); - }, handleChange(e) { - this.setData({ - activeValues: e.detail.value, - }); - }, - onTakeNotes() { - console.log(1111); - }, - showDialog(e) { - const { key } = e.currentTarget.dataset; - this.setData({ [key]: true, dialogKey: key }); - }, - - closeDialog() { - - this.setData({ - dialogKey: false - }); - }, -}) \ 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/myAudio/index.json b/pages/resourceDetails/myAudio/index.json new file mode 100644 index 0000000..02871f3 --- /dev/null +++ b/pages/resourceDetails/myAudio/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon" + }, + "navigationStyle": "custom" +} \ No newline at end of file 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/index.json b/pages/resourceDetails/myVideo/index.json similarity index 100% rename from pages/resourceDetails/index.json rename to pages/resourceDetails/myVideo/index.json diff --git a/pages/resourceDetails/index.wxml b/pages/resourceDetails/myVideo/index.wxml similarity index 76% rename from pages/resourceDetails/index.wxml rename to pages/resourceDetails/myVideo/index.wxml index e169708..4986c71 100644 --- a/pages/resourceDetails/index.wxml +++ b/pages/resourceDetails/myVideo/index.wxml @@ -3,13 +3,12 @@ <view> <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> </view> - <view class="navbar-title">璧勬簮璇︽儏</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> + <video src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> + </view> <!-- 鏍囬 --> @@ -21,13 +20,13 @@ <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="涓�銆佽儗鏅�佹剰涔変笌鎬讳綋璁捐" value="{{0}}" expandIcon> - <view wx:for="{{3}}"> - <view>绗竴璇�</view> - <view>绗簩璇�</view> - <view>绗笁璇�</view> - <view>绗洓璇�</view> + <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> @@ -72,8 +71,8 @@ </view> <view class="buttonBox"> <view> - <t-button style="margin: 20rpx 30rpx;" variant="outline" size="extra-small">鍙栨秷</t-button> - <t-button style="margin: 20rpx 30rpx;" theme="primary" size="extra-small">纭</t-button> + <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> diff --git a/pages/resourceDetails/index.wxss b/pages/resourceDetails/myVideo/index.wxss similarity index 85% rename from pages/resourceDetails/index.wxss rename to pages/resourceDetails/myVideo/index.wxss index cb4efa3..a338176 100644 --- a/pages/resourceDetails/index.wxss +++ b/pages/resourceDetails/myVideo/index.wxss @@ -29,6 +29,7 @@ border-bottom: 1px #f4f4f4 solid; padding-bottom: 20rpx; font-weight: bold; + } .contentBox { @@ -135,4 +136,27 @@ /* .inputBox { height: 500rpx; -} */ \ No newline at end of file +} */ + + +.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/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