first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
class Index {
constructor() {
this.page = 1
this.getClassList()
this.bindEvent()
}
bindEvent() {
click(".more", () => {
console.log(1);
this.page += 1
this.getClassList()
})
}
async getClassList() {
var res = await ajax.get({
url: 'http://127.0.0.1:3000/api/index/class',
data: {
type: 1,
page: this.page
},
header: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
})
var data = res.result.items
data.forEach(v => {
$("ul").innerHTML += `
<li>
<a href="./info.html?url=${v.path}">
<img src="${v.img}" alt="">
<p>${v.title}</p>
</a>
</li>`
});
//console.log(res.result.items);
}
}
new Index()