class jigouxiangqing { constructor() { header("机构详情") this.page = 1 this.getjigouxiangqing(); } async getjigouxiangqing() { var that = this var data = { id: query("id"), page: that.page } var res = await indexServe.jigouxiangqing(data) console.log(res); res.data.forEach((value, index) => { console.log(value.tags) $(".gggg").html(`
${value.title}

${value.user}

`) }) // res.data.forEach((v) => { // $(".list").html(` // //
${v.title}
//
${v.id}套
//
// `) // }) // item($(".content .list"), // res.data) // this.principal[this.index].content // console.log("123",res); } //请求更多数据 hotscroll() { console.log("$('.hot')",$('.hot')); $('.hot').onscroll = () => { const {clientHeight, scrollHeight, scrollTop} = $('.hot'); const distance = scrollHeight- scrollTop - clientHeight; console.log(clientHeight, scrollHeight, scrollTop); if(distance <= 10){ console.log("滚动到底部..."); this.getModel() } } } } new jigouxiangqing()