43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
// e:\project\dy_video_all\dy_iaa_new_project\pages\history\history.ts
|
|
import { httpRequest } from "../../utils/httpReques";
|
|
Page({
|
|
data: {
|
|
historyList: [],
|
|
historyFlag: false,
|
|
canUsePlayletExtension: getApp().globalData.canUsePlayletExtension,
|
|
useVideoByte: getApp().globalData.useVideoByte,
|
|
},
|
|
onLoad: function () {
|
|
// options
|
|
},
|
|
onShow() {
|
|
const params = {
|
|
total: 99999
|
|
}
|
|
httpRequest('/history', 'POST', params).then((res: any) => {
|
|
if (res.status == 1 && Array.isArray(res.data)) {
|
|
this.setData({
|
|
historyList: res.data,
|
|
historyFlag: true
|
|
})
|
|
}
|
|
})
|
|
},
|
|
toPathVideo(ev: any) {
|
|
const sid = ev.currentTarget.dataset.sid;
|
|
const chapterid = ev.currentTarget.dataset.chapterid;
|
|
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}&id=${chapterid || ''}`
|
|
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: url,
|
|
});
|
|
// tt.navigateTo({
|
|
// url: `/pages/videoDetail/videoDetail?sid=${sid}&id=${chapterid || ''}`,
|
|
// });
|
|
},
|
|
}) |