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 || ""}`, }); } })