class Video { constructor() { footer() this.getVideoList(); } async getVideoList() { let res = await indexServe.video({ page: 1 }); res.items.forEach(v => { $(".content_title").innerHTML += `
  • ${v.title}

    美食杰
    103k
  • ` }) _(".content_title li").forEach((v,i) => { v.onclick = function () { localStorage.setItem("videoInfo", JSON.stringify(res.items[i])); location.href = "./video_detailed.html" } }) console.log(res) } } new Video();