2024-07-29 09:16:58 +08:00

31 lines
772 B
TypeScript

// e:\project\dy_video_all\dy_iaa_new_project\pages\history\history.ts
import { httpRequest } from "../../utils/httpReques";
Page({
data: {
historyList: [],
historyFlag: false
},
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;
tt.navigateTo({
url: `/pages/videoDetail/videoDetail?sid=${sid}&id=${chapterid || ''}`,
});
},
})