2024-05-20 09:36:39 +08:00

47 lines
1.1 KiB
TypeScript

// 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
})
}
}
})