// e:\project\dy_video_all\初晴剧场\pages\recommend\components\mVideoPlayer\mVideoPlayer.ts import { httpRequest } from "../../../../utils/httpReques" Component({ data: { videoInfo: {}, videoList: [], batchList: [] }, properties: { videoCanIUse: { type: Boolean, value: false } }, methods: { inShow() { this.initFn() }, async initFn() { const params = { "uid": 127457025, "platform": "devtools", "is_b": 2, "sid": "2" } const videoreadRes: any = await httpRequest('/videoread', 'POST', params); let videoInfo: any = {} if (videoreadRes.status == 1 && Array.isArray(videoreadRes.data)) { videoInfo = videoreadRes.data[0]; } const batchlistRes: any = await httpRequest('/batchlist', 'POST', params); let batchList: any = []; if (batchlistRes.status == 1 && Array.isArray(batchlistRes.data)) { batchList = batchlistRes.data; } this.setData({ batchList, videoInfo }) } } })