// e:\project\dy_video_all\初晴剧场\pages\my\my.ts import { httpRequest } from "../../utils/httpReques"; Page({ myModal: null as any, data: { userInfo: {}, platform: '', historyList: [] }, 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; 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`, }); } })