2024-02-29 09:27:59 +08:00

33 lines
590 B
JavaScript

const { httpRequest } = getApp();
Page({
data: {
historyList: [],
listFlag: false
},
onShow() {
my.showLoading({
content: '加载中...',
});
const paramenter = {
path: '/history',
method: 'GET',
}
httpRequest(paramenter).then(res => {
my.hideLoading()
if (res.status == 1 && Array.isArray(res.data)) {
this.setData({
historyList: res.data,
listFlag: true
})
}
})
},
toGetVideo(event) {
const data = event.target.dataset.item;
my.navigateTo({
url: `/pages/video/video?sid=${data.sid}&id=${data.chapterid || ""}`,
});
}
})