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,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>首页</title>
</head>
<body>
<ul>
</ul>
</body>
<script src="ajax.js"></script>
<script>
$ajax.get({
url: 'http://127.0.0.1:3000/api/json/index',
data: {},
success: function (res) {
console.log(res);
res.newest.list.forEach(function (v) {
document.querySelector("ul").innerHTML +=
`
<li>
<a href="./info.html?id=${v.id}">
<img src="${v.preview}" alt="">
<p>${v.title}</p>
</a>
</li>
`
})
},
error: function (err) {
alert(err)
}
})
//
// $ajax.post({
// url: 'http://127.0.0.1:3000/api/json/info2',
// data: {
// id: 1,
// page: 3
// },
// success: function (res) {
// console.log(res)
// },
// error: function (err) {
// console.log(err)
// }
// })
</script>
</html>