class video { constructor() { this.baseUrl = "http://127.0.0.1:3000/api" this.page = 1; this.getVideoMenu(); } getVideoMenu() { $.ajax({ type: "GET", url: this.baseUrl + "/video/list", data:{ page:this.page }, success: function (res) { res.result.items.forEach((v, i) => { console.log( res.result.items); $(".content").append(`
  • ${v.seo_title}

    美食杰
    ${v.click_num}
  • `); }); } }); } } new video();