diff --git a/app.json b/app.json index 304b5d1..1cb88df 100644 --- a/app.json +++ b/app.json @@ -10,6 +10,7 @@ "pages/consumption/consumption", "pages/rechargeRecord/rechargeRecord", "pages/videoDetail/videoDetail", + "pages/videoByte/videoByte", "pages/pay/pay", "pages/history/history", "pages/collection/collection" diff --git a/app.ts b/app.ts index bfb8fac..0c27c94 100644 --- a/app.ts +++ b/app.ts @@ -7,7 +7,9 @@ App({ }, globalData: { loginPromise: null, - statusBarHeight: 0 + statusBarHeight: 0, + canUsePlayletExtension: tt.canIUse('PlayletExtension'), + useVideoByte: true, }, onLaunch() { const loginPromise: any = new Promise((resolve: any) => { diff --git a/pages/home/home.ts b/pages/home/home.ts index a939af1..6bb856c 100644 --- a/pages/home/home.ts +++ b/pages/home/home.ts @@ -13,7 +13,9 @@ Page({ newModule: [], bookcase: [], bookId: '', - subscribeType: 1 + subscribeType: 1, + canUsePlayletExtension: getApp().globalData.canUsePlayletExtension, + useVideoByte: getApp().globalData.useVideoByte, }, onLoad: function () { @@ -120,9 +122,20 @@ Page({ }, toPathVideo(ev: any) { const sid = ev.currentTarget.dataset.sid; + const album_id = ev.currentTarget.dataset.item.album_id; + const episode_id = ev.currentTarget.dataset.item.episode_id; + let url = `/pages/videoDetail/videoDetail?sid=${sid}`; + if(this.data.canUsePlayletExtension&&this.data.useVideoByte){ + url = `/pages/videoByte/videoByte?is_continue=0&tt_album_id=${album_id}&tt_episode_id=${episode_id}&sid=${sid}`; + } + console.log("url",url); tt.navigateTo({ - url: `/pages/videoDetail/videoDetail?sid=${sid}`, + url: url, }); + + // tt.navigateTo({ + // url: `/pages/videoDetail/videoDetail?sid=${sid}`, + // }); }, onReachBottom() { const page = this.data.page; diff --git a/pages/home/home.ttml b/pages/home/home.ttml index ad8f5b7..3875935 100644 --- a/pages/home/home.ttml +++ b/pages/home/home.ttml @@ -9,9 +9,9 @@ bindchange="handelSwiperChange" autoplay="{{true}}" interval="{{2000}}"> + catchtap="toPathVideo" data-item="{{item}}" > - + @@ -36,7 +36,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -100,7 +100,7 @@ - + @@ -133,7 +133,7 @@ - + @@ -170,7 +170,7 @@ - + diff --git a/pages/recommend/recommend.ts b/pages/recommend/recommend.ts index 2182107..0848692 100644 --- a/pages/recommend/recommend.ts +++ b/pages/recommend/recommend.ts @@ -13,6 +13,8 @@ Page({ videoErrorText: '', page: 1, statusBarHeight: getApp().globalData.statusBarHeight, + canUsePlayletExtension: getApp().globalData.canUsePlayletExtension, + useVideoByte: getApp().globalData.useVideoByte, id: '' }, onLoad() { @@ -150,8 +152,15 @@ Page({ toPathVideo(ev: any) { const sid = ev.currentTarget.dataset.sid; + const album_id = ev.currentTarget.dataset.item.videoinfo.album_id; + const episode_id = ev.currentTarget.dataset.item.videoinfo.episode_id; + let url = `/pages/videoDetail/videoDetail?sid=${sid}`; + if(this.data.canUsePlayletExtension&&this.data.useVideoByte){ + url = `/pages/videoByte/videoByte?is_continue=0&tt_album_id=${album_id}&tt_episode_id=${episode_id}&sid=${sid}`; + } + console.log("url",url); tt.navigateTo({ - url: `/pages/videoDetail/videoDetail?sid=${sid}`, + url: url, }); }, handelCollection(ev: any) { diff --git a/pages/recommend/recommend.ttml b/pages/recommend/recommend.ttml index 8a9f319..33ab075 100644 --- a/pages/recommend/recommend.ttml +++ b/pages/recommend/recommend.ttml @@ -67,7 +67,7 @@ --> - + 进入观看 diff --git a/pages/videoDetail/videoDetail.ttml b/pages/videoDetail/videoDetail.ttml index 6cff000..1f34824 100644 --- a/pages/videoDetail/videoDetail.ttml +++ b/pages/videoDetail/videoDetail.ttml @@ -3,11 +3,13 @@ + + @@ -64,6 +66,7 @@ + @@ -108,6 +111,7 @@ + @@ -141,6 +145,7 @@ + @@ -158,6 +163,7 @@ + @@ -196,7 +202,7 @@ - + @@ -251,7 +257,7 @@ - + \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index e8d4e08..a9287cb 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,7 +1,7 @@ { "condition": { "miniprogram": { - "current": -1, + "current": 1732184262860, "list": [ { "id": 1715845062520, @@ -112,8 +112,19 @@ "launchFrom": "scan", "location": "qr_code", "mockUpdateType": "Noupdate" + }, + { + "id": 1732184262860, + "name": "pages/videoByte/videoByte", + "pathName": "pages/videoByte/videoByte", + "query": "sid=265&id=14265&tid=1234&union_tid=15875&tt_album_id=7336037389002867237&tt_episode_id=7336037720098783759", + "scene": "011002", + "launchFrom": "search_suggest_list_top", + "location": "", + "mockUpdateType": "Noupdate", + "addType": "manual" } ] } } -} +} \ No newline at end of file