// e:\project\dy_video_all\初晴剧场\pages\my\my.ts import { httpRequest } from "../../utils/httpReques"; Page({ myModal: null as any, data: { userInfo: {}, platform: '', historyList: [], canUsePlayletExtension: getApp().globalData.canUsePlayletExtension, useVideoByte: getApp().globalData.useVideoByte, }, onLoad() { tt.getSystemInfo({ success: (res: any) => { this.setData({ platform: res.platform }) } }) }, onShow() { httpRequest('/user', 'POST').then((res: any) => { if (res.status == 1) { this.setData({ userInfo: res.data.info, }) } }) const params = { total: 10 } httpRequest('/history', 'POST', params).then((res: any) => { console.log(res, "history") if (res.status == 1 && Array.isArray(res.data)) { this.setData({ historyList: res.data, }) } }) }, handelTipsGold() { this.myModal?.show?.(); }, myModalRef(ref: any) { this.myModal = ref }, 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 || ''}`, // }); }, toPathRechargeRecord() { tt.navigateTo({ url: `/pages/rechargeRecord/rechargeRecord`, }); }, toPathPay() { tt.navigateTo({ url: `/pages/pay/pay`, }); }, toPathSubScribe() { tt.navigateTo({ url: `/pages/collection/collection`, }); }, toPathConsumption() { tt.navigateTo({ url: `/pages/consumption/consumption`, }); }, toPathHistory() { tt.navigateTo({ url: `/pages/history/history`, }); } })