class Video {
constructor() {
this.videoType()
}
async videoType() {
var res = await indexServe.video({
page: 0
})
console.log(res);
res.items.forEach(v => {
$(".content").append(`
${v.title}
美食杰
${v.click_num}
`)
});
var videoArr = {};
$(".content li").click(function (v) {
videoArr = {
practice: res.items[$(this).index()].intro,
title: res.items[$(this).index()].seo_title,
video: res.items[$(this).index()].xhz_video_url,
}
localStorage.setItem("videoArr", JSON.stringify(videoArr))
location.href="./videoinfo.html"
})
}
}
new Video()